Planetside Software Forums

General => Terragen Discussion => Topic started by: j_petrucci on August 30, 2008, 01:57:21 PM

Title: Too small reflection?
Post by: j_petrucci on August 30, 2008, 01:57:21 PM
hi to everybody... I'm making some attempts in realizing a convinving sunset, and I actually like to have a bigger sun going down onto the horizon; in the lightning/sunlight node I raised the angular diameter of the disc to the value of 8 then I rendered the whole scene simply consisting in a water plane over a flat terrain.

once rendered, I noticed that the reflection of the sun on the water is the same size regardless it current value... I don't know if it is a bug or an intended behaviour, but I think that realistically the reflection should start from the horizon as big as the sun disc.

take a look at the image rendered in TG2...

(http://www.zerog.biz/files/pictures/3D/forum/TG2.jpg)

and an old one made by me with Terragen 0.9...

(http://www.zerog.biz/files/pictures/3D/Tramonto2.jpg)

don't you agree that the reflection should be larger in TG2? :)

PS: I also think that the antialiasing should be applied to the sun disc (note the jagged circle border...)
Title: Re: Too small reflection?
Post by: rcallicotte on August 30, 2008, 03:47:25 PM
No, I think the angle of your sun with the clouds and everything else is doing what it should in TG2.

To show what I'm saying as correct, do the same image in TG2 as your comparison image in TG. 09.
Title: Re: Too small reflection?
Post by: cyphyr on August 30, 2008, 04:14:38 PM
As TG2 works very much with real world values you may want to try not making the sun bigger but rather "zooming" in on it ie making the cameras field of view smaller. This can be done via the camera node or the popup nav window.
Richard

Hmm just did some tests and I'm wrong, the size of the sun disk is the same no matter what zoom I use. Back to the drawing board I guess

Nope I was wrong again hehe the size of the disk dose change but the reflection spread dose not ... see samples
Title: Re: Too small reflection?
Post by: sjefen on August 30, 2008, 06:45:09 PM
You have a slider in the water shader named sunlight spread, or something like that. It should do the trick, but I also feel it's like a fake way to do it. It's funny something like this is not automatic.

- Terje
Title: Re: Too small reflection?
Post by: JimB on August 31, 2008, 06:02:42 AM
I have to say that I'm glad the size of the reflected disk can be overridden. Too many directors can say "Yeahhh. But make that reflected sun smaller, it's distracting."

Truly seriously.
Title: Re: Too small reflection?
Post by: j_petrucci on August 31, 2008, 07:27:22 PM
Quote from: cyphyr on August 30, 2008, 04:14:38 PMNope I was wrong again hehe the size of the disk dose change but the reflection spread dose not ... see samples
yep, that's exactly what I saw in my images... you can simply render a sunset on the water with default sun size, then increase the angular radius and see that the reflection size is always the same.
Title: Re: Too small reflection?
Post by: dandelO on August 31, 2008, 09:13:30 PM
Here's a post I made over a year ago on Terranuts about this exact thing, and Oshyans response to it. Nothing conclusive other than to use a reflective shader on a displaced surface(for waves) as a workaround... Now, that transparency is implemented though, I think you'd need to connect a water shader on to the end anyway (with reflections and waves disabled as they're already coming from the reflective shader ??? I don't think so, that would make the reflections transparent too wouldn't it?)

http://www.terranuts.com/forums/showthread.php?t=8351&highlight=suns+reflection (http://www.terranuts.com/forums/showthread.php?t=8351&highlight=suns+reflection)
Title: Re: Too small reflection?
Post by: dandelO on August 31, 2008, 09:26:24 PM
Doh! Just put the watershader (with reflections disabled) before the reflective shader!
That is, unless the reflective shader blacks out the transparency from the previous water node... ???

Seems like a good'un but, I can't test it just now.
Title: Re: Too small reflection?
Post by: j_petrucci on September 01, 2008, 07:05:06 PM
ok, I did not think that this simple task would require a workaround, however I'll check it out tomorrow, thanks! :-)

PS: compared to the 0.9 version, it also seems that the sun is actually not glowing on the back of the clouds, I really much prefer the 0.9 light effect around the sun   
Title: Re: Too small reflection?
Post by: bigben on September 01, 2008, 09:40:04 PM
The sun most likely behaves as a point source.  Try adding a sphere (planets cast shadows) in the same position, turn cast shadows off and add luminance to taste. Increase the size to what you want (decrease the size of the sun's disc so that you can see what you're doing).  I set this TGD up using the following process:

1: Set camera heading/pitch to match sun's heading/elevation
2: Add planet and resize
3: Add sphere and copy/position size settings from planet (default placement of planet and sphere are centred in camera view, planets have more suitable distance/size as starting points)
4: Delete planet
5: Adjust sphere settings
Title: Re: Too small reflection?
Post by: j_petrucci on September 02, 2008, 11:51:45 AM
woa, very nice! :o
this is exactly the effect I was looking for, I will make some experiment with your setup, many thanks!

in the meanwhile, I made some other tests with the simple water+sunlight scene, and yes, I also think that the standard sunlight is treaten as a point source, the angular disc size is only a matter of visualization, here is the proof:

(http://www.zerog.biz/files/pictures/3D/forum/sun_050.jpg)
Angular Disc Size = 0.5

(http://www.zerog.biz/files/pictures/3D/forum/sun_100.jpg)
Angular Disc Size = 1.0

(http://www.zerog.biz/files/pictures/3D/forum/sun_500.jpg)
Angular Disc Size = 5.0

(http://www.zerog.biz/files/pictures/3D/forum/sun_1000.jpg)
Angular Disc Size = 10.0

(http://www.zerog.biz/files/pictures/3D/forum/sun_2000.jpg)
Angular Disc Size = 20.0

unfortunately changing the sun size also does not affect the refraction of the sun through the clouds, while this behaviour was considered in the previous Terragen version... :(
now I will see what happens with your setup together with clouds and I will post some images.
Title: Re: Too small reflection?
Post by: rcallicotte on September 02, 2008, 01:20:21 PM
Thank, j_petrucci for showing how clearly this piece is missing.  Maybe it will be addressed for the final version of TG2.  Seems very important, doesn't it?  Why have a workaround for something like this...or maybe I just don't get it.
Title: Re: Too small reflection?
Post by: bigben on September 02, 2008, 08:24:41 PM
Just one extra note. Even if you make the sun's disc invisible the sun will still be reflected in the water so you need to balance the settings on the fake sun to matcht the reflections. If it's not bright enough you will see a bright narrow strip in the middle of the reflection which looks unnatural.
Title: Re: Too small reflection?
Post by: j_petrucci on September 02, 2008, 08:36:20 PM
Quote from: bigben on September 02, 2008, 08:24:41 PMIf it's not bright enough you will see a bright narrow strip in the middle of the reflection which looks unnatural.
yep, that's exactly what just happened when I tried to insert some clouds and increase the Red Decay factor! ;)
Title: Re: Too small reflection?
Post by: reck on September 03, 2008, 02:53:33 AM
When I was messing around with sunsets a few weeks ago I noticed this as well. Had a big sun setting over the water and then this thin line of reflection, it ruined the whole image.

Having to mess around with reflective shaders (very slow) and displacement is to much of a workaround for such a simple thing.

Oyshan did say in dandelO post that incorrect reflections will be fixed in the final version though :)
Title: Re: Too small reflection?
Post by: bigben on September 03, 2008, 04:58:52 AM
The only tweak you really need is the luminosity of your fake sun to match the brightness of the reflection of the sun. 
Title: Re: Too small reflection?
Post by: Cyber-Angel on September 03, 2008, 07:14:37 PM
Just a small note that may help the discussion here, the real world technical name for what people are calling a "Reflection" is Glitter Path for the physical phenomena under discussion, even though technically it is a type of reflection.

Regards to you.

Cyber-Angel     
Title: Re: Too small reflection?
Post by: Oshyan on September 06, 2008, 01:01:24 AM
The current implementation of the "sun disc" is quite simplistic and as you have noticed it does not reflect correctly or antialias properly, among other issues. Unfortunately I'm not sure that these things can be fixed before release as we are essentially in "feature lock" at this point, though they will certainly be addressed in the future. For the time being you can work around it as others have said, with reflection spread (or specular roughness if using a reflective shader), or by putting in a luminous sphere for your visible sun.

- Oshyan