Page 1 of 2
Correct Water "Sun" Reflect and shadow Angle..
Posted: 07 Feb 2009, 12:51
by R-TEAM
Hi,
its simple :
If i look at the water (see or river) and the sun [if visible or not] make
a shinee bright reflect in front of me, then i know the sun is anywear in
front of me and the shadows falls to back of me.
Not in spring ....
The refelct angle is as example in front and the shadows falls at right ...?!?
Please Fix it
Regards
R-TEAM
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 11 Feb 2009, 14:45
by AF
Isnt this set in the map?
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 11 Feb 2009, 16:15
by R-TEAM
Hi,
AF wrote:Isnt this set in the map?
dont know - have no map design doing.
But it is a little bit silly can you set in the map :
The sun for water-reflect come from East, the sun for shadows come from west .......
Maybe fine for scenarious with "psychadelic" effects .....
R-TEAM
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 11 Feb 2009, 16:59
by R-TEAM
Hi,
oh- and i have no problem can you set TWO suns .. with 2 reflect spots and 2
shadows per unit ...

[but this is ATM IMHO out of scope for the engine]
R-TEAM
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 11 Feb 2009, 20:22
by Argh
There is only one sun light. If that's not working correctly, it's a bug, please demonstrate it in a screenshot.
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 11 Feb 2009, 20:44
by R-TEAM
Hi,
no problem ->
as you can see, the sun-reflect on the water comes from the front.
And if the physics not changed last time i learned realworld light effects
and 3D design this show the sun come from the front...
But look at the shadow from the commander .........
R-TEAM
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 11 Feb 2009, 23:29
by Satirik
water is not flat
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 11 Feb 2009, 23:59
by R-TEAM
Hi,
Satirik wrote:water is not flat
and what would you say with this ? ? ?
Or you mean in front of the picture was a mountain of water that reflect
the light in the way it looks.......
It is not bad cant you think in 3D - but look at pictures from see or a beach
or maybe you can go to an beach...
Regards
R-TEAM
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 12 Feb 2009, 01:03
by Argh
Actually, Satirik, I think he's right. The angle being returned is the opposite of what should be returned. That explains a couple of things that have been bothering me.
The spread of light on the "waves" in that shot should be getting smaller in the distance- that's obvious. Meh, maybe jK will find time to fix it, maybe not, I don't have time to look at the GLSL right now and see if I can repair it atm.
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 12 Feb 2009, 02:09
by R-TEAM
Hi,
Argh wrote:Actually, Satirik, I think he's right. The angle being returned is the opposite of what should be returned. That explains a couple of things that have been bothering me.
The spread of light on the "waves" in that shot should be getting smaller in the distance- that's obvious. Meh, maybe jK will find time to fix it, maybe not, I don't have time to look at the GLSL right now and see if I can repair it atm.
Thanks Argh.
I have just thinked the 20Years i doing now 3D design and modelling,
and the lerning of light effects and realworldsimulation plus the buying
of 3 IBM 3D workstations and Maya unlimited for nearly 20k$ was a waste of Time and Money .....
Regards
R-TEAM
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 12 Feb 2009, 02:47
by jK
there is no bug ...

Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 12 Feb 2009, 03:10
by Argh
Hmm. But his result is obviously different, and doesn't look right. Driver issue?
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 12 Feb 2009, 03:47
by R-TEAM
Hi,
jK wrote:there is no bug ...

sorry to say this - but you are wrong.
Look at the water - it is like a mirror, yes with waves and double
reflect zones - but basicaly and in the summary a mirror.
To make a mirror image from the sun like in your screenshot the sun must stay nearly direct over the commander ..
and would you expect a shadow that you see then ????
Believe me - I KNOW 3D worlds.
Regards
R-TEAM
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 12 Feb 2009, 03:53
by R-TEAM
Hi,
but you are right - it looks better than my example - not perfect realworld but not so much different than my picture.
Maybe an problem with the map?
I use the latest ATI driver 9.1 on IBM Workstation with Win2003Server
EnterpriceEditionR2.
mmh...
Regards
R-TEAM
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 12 Feb 2009, 04:01
by R-TEAM
Hi,
the Map is not the problem.
Have now IMHO tryed the sam map as you and it is still wrong.
Regards
R-TEAM
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 12 Feb 2009, 04:10
by smoth
the lighting is right in jks shot.
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 12 Feb 2009, 04:34
by Argh
Yeah, I agree. But that other shot by R-TEAM is clearly wrong- we shouldn't be seeing that high a level of specular on those fragments- the rays should be bouncing away from the camera, except on the tops of the waves, and we should only be seeing specular on the tops of the waves.
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 12 Feb 2009, 04:36
by R-TEAM
Hi,
smoth wrote:the lighting is right in jks shot.
yes - it looks good.Not 100% but i musst say i was wrong here.
But why look my pictures wrong then ??
The Game runs fine,and i found no other glitches.
Regards
R-TEAM
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 12 Feb 2009, 04:41
by Argh
yes - it looks good.Not 100% but i musst say i was wrong here.
It's not a matter of whether you're "wrong". You're getting different results, it appears.
So... jK... is it just using a cubemap for the sun's point / corona? And is there a way to turn that off, without engine changes? Maybe that's where things aren't quite right. That second shot by R-TEAM, it's pretty obvious that we have a lot of sun on that water, that according to the shadow shouldn't be there at all...
Re: Correct Water "Sun" Reflect and shadow Angle..
Posted: 12 Feb 2009, 04:57
by jK
only possible reason (like always on ATIs?) is a driver bug.
The sun pos is determined in the vertex shader and transmitted via a varying var to the pixel shader which does a dot(N,L).
So it seems this transmission doesn't work.
And like always the only solution for this is to try out different driver versions (even older ones).