About Store Forum Documentation Contact



Post Reply 
Solved - Water Class and Shadows ... depth??
Author Message
alkirah Offline
Member

Post: #1
Solved - Water Class and Shadows ... depth??
Hello,

I have a question.

Is there a way to set the depth of the water plane?

Renderer draw shadows on the water surface but also to the bottom of the water (which is kinda not deep enough).

I basicly want only shadows to be drawn on water surface, not to the bottom of the plane.

Any way of doing this? See screenshot

I see Watermesh depth but I'm not using watermesh, only water class and it don't have any depth settings.

Thanks

   
(This post was last modified: 08-16-2013 04:46 PM by alkirah.)
08-16-2013 02:26 PM
Find all posts by this user Quote this message in a reply
Ozmodian Offline
Member

Post: #2
RE: Water Class and Shadows ... depth??
How can you not be using the Watermesh?? Unless you have completely re-written how water works in the engine, you are user Watermesh.

If you created the water in the Editor, Depth is a value in the Water menu, just click on the water and set the depth. If you created it in code, then just set the depth value.
08-16-2013 03:15 PM
Find all posts by this user Quote this message in a reply
alkirah Offline
Member

Post: #3
RE: Water Class and Shadows ... depth??
in init
Water.colorMap(Images.ptrGet("Water/0.gfx")).normalMap(Images.ptrGet("Water/0.n.gfx")).reflectionMap(Images.ptrGet("Water/reflection.gfx"));
Water.color=Vec(0.12, 0.20, 0.28);
Water.draw =true;
Water.plane.set(Vec(0,-50,0),Vec(0,1,0));
Water.wave_scale=0.01f;
Water.scale_normal=100;
Water.scale_bump=1000;

then in update
//update water
Water.update(Vec2(0.02f, 0.02f));
08-16-2013 03:35 PM
Find all posts by this user Quote this message in a reply
Ozmodian Offline
Member

Post: #4
RE: Water Class and Shadows ... depth??
Hmm that is an interesting way to do it. So you just have 1 really big water plane accross the whole world huh? Technically the depth would be controlled by where the HM is at that location then. I changed your plane to Water.plane.set(Vec(0,75,0),Vec(0,1,0)); and as you can see, the water is a lot deeper now smile

[Image: 2uh4k8w.png]
08-16-2013 04:24 PM
Find all posts by this user Quote this message in a reply
alkirah Offline
Member

Post: #5
RE: Water Class and Shadows ... depth??
Yes one big water plane

with Water.plane.set(Vec(0,75,0),Vec(0,1,0));
u just set plane height 75 higher doing so VS my way which goes below the y=0 point.

don't do anything to depth

I don't need a world file, so the water plane can go below y=0 line. I just need to adjust depth not Y position.

Ok seems the straight one is the shadows and the other one reflection ...

If I turn reflection off it just vanish

so Now I need to know why reflection is that dark

Messing with reflection powers did the trick smile
(This post was last modified: 08-16-2013 04:56 PM by alkirah.)
08-16-2013 04:28 PM
Find all posts by this user Quote this message in a reply
Post Reply