Sun Through Terrain?

Started by Shadriss, May 27, 2011, 08:34:34 PM

Previous topic - Next topic

Shadriss

I ask this, knowing that it's probably been asked before, but my search efforts (or my search skills... take your pick) didnt amount to anything. So...

Was working on an animation sequence of a simple sunrise. The first 24 frames of the animation went as expected... pretty much a blackout. However, when the sun breaks above an angle of -.025, the sun mysteriously starts showing up... THROUGH the terrain. I could see how this could kinda--sorta happen if I were at minimal altitude looking towards the horizon, but when I'm on top of a  mountain looking down onto the fruited plains, I should certainly not see a blazing ball of hydrogen poking through a planet and it's waterforms.

Any suggestions as to what is causing this would be helpful. My skills with this program are somewhere between, "What's Terragen?" and "Ooooh! Pretty Picture!", so I may very well be missing something blatently obvious to you (semi)masters of this.

Thanks in advance

cyphyr

Turn on "Receive shadows from surfaces" in the atmosphere tab, this will slow down the render, but the sun will be hidden by terrain.
Hope this helps.
:)
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

dandelO

The correct way to deal with this is by enabling 'recieve shadows from surfaces' in the quality tab of your atmosphere node(read the text description of that feature within the program when you're in this tab). This will likely add much more render time to your scene, though.

I think I might have stumbled on a workaround so this extra render time isn't necessary while I was animating a scene recently, though.
I haven't actually tested the theory out on a terrain yet(I was working on imported objects when I accidentally figured a solution). I'll repost back here when(if) I work it out.

I think Kadri also found another way some time ago which involved occluding the sun's disc with a secondary planet(and/or)atmosphere while it was behind a terrain that was showing this problem(and that nearly confirms that my idea should work, too) but since this place is like Alice's rabbit hole, at the best of times, I don't recall what thread it was posted to.

I'll do some testing later on and, hopefully, a decent workaround is possible, I'm a little busy right now on something completely unrelated to TG, though, sorry.
In the meantime, enable the above mentioned feature but beware, it will significantly increase your render time doing it the correct way...

dandelO

Doh! Richard already posted in a single line what it takes me around 40,000 lines to type. :D

dandelO

I've tried several things now, none worked. :D

Kadri

#5
Quote from: dandelO on May 27, 2011, 08:52:42 PM
...
I think Kadri also found another way some time ago which involved occluding the sun's disc with a secondary planet(and/or)atmosphere while it was behind a terrain that was showing this problem(and that nearly confirms that my idea should work, too) but since this place is like Alice's rabbit hole, at the best of times, I don't recall what thread it was posted to.
...

I made some things in that way but it was not for this kind of problem - i think  , DandelO ::)
There were a thread (more then ones) about this. But couldn't find anything other then what is mentioned here !
I tried to test it but my sun did what it had to. It didn't show through land , doh !

Tangled-Universe

If you use "recieve shadows from surfaces" I always recommend to only do a crop render of the part where the sun is shining through the terrain...saves you a LOT of rendertime.

Shadriss

Thanks all for the quick replies - I'll give that a shot. Especially the crop render idea... though I have to say, I'm not sure if it ends up saving time in the long run, since I'd have to do it for several frames and then fit them into the original images before then stringing them together into the animation sequence. But, hey... if the option itself doesnt improve the overall picture in any other way, it may be that it's worth it.

Again thanks.

Tangled-Universe

Enabling "receive shadows from surfaces" at least doubles your rendertime, without an exception in my experience so far.

Shadriss

Fair enough... though with one or two changes I've made recently, this problem may have been made moot anyway (Camera positions during the animation changed).

That said, I do have another question, since I've got you all here.

The scene I mentioned also involves a moonset as the sun rises. The opening frames are actually supposed to be moonlit, with the moon in view. So, of course, now I have to figure that out. I tried several methods mentioned in these forums, including placing a sun behind the Planet 02 object, but for some reason it doesnt block the second sun I placed behind it for illumination purposes.

Now, I found a method posted in another thread that had this to say:

Quote from: Mohawk20If you just want a realistic moon lighting your landscape, you have to take a bit of a detour. You can create a 2nd planet, and set that in the view. You can also set the sun below the horizon, behind the camera, and move it around for the right lighting on the moon.

But for the light that should come from the moon, you have to create a lightsource that you should place between the earth and the moon (about in the middle, a bit more toward the earth). Then maneuver it exactly in front of the moon, from camera perspective, and enlarge the radius until it seems to be as big as the moon. Now increase the strengt of the light to rediculous big numbers, like 1e8, or even 1e9...

If it works correctly, the light has allmost no noticable effect on the moon (because the moon is also lighted by the sun), an your landscape should be lit like moonlight.

Ok, most of that, I can actually follow, but since it kinda made the assumption that I knew what I was doing (WRONG!) I'm kinda lost on how to do a few of these things.

Creation of second planet, check. In view, check. Sun position, check. Create Light Source, Check.

Place source between Moon and Planet. Yeah... Uh... I can move the position itself around, sorta, but with no way to set altitude (that I've found in the Light Source node), I know of no way to do this reliably. The Planet node is helpful enough to include an altitude slider, so I know exactly where IT is... but no so much the light source.

Maneuver light to exact center (from camera perspective) of moon, can do. Enlarge radius.... yeah... the radius doesnt appear to change in the preview, so again, I have no way to do this reliably.

Increase light strength, check.

So, in short, there are two things there I have no clue how to do with any degree of certainty. Assistance would be good. :)