WaterRenderPass crashes my program

Hi



I have this little test project I use to test jMe. Now I tried to set WaterRenderPass but that somehow crashes java VM:



#

An unexpected error has been detected by HotSpot Virtual Machine:

#

Ok thanks, got it working… However the water loses its reflection and turns to green(the color I set to it) when I get close to the surface. I guess there's something wrong with the following settings or some other.



waterEffectRenderPass.setWaterPlane( new Plane( new Vector3f( 0.0f, 0.0f, 1.0f ), 0.0f ) );
waterEffectRenderPass.setTangent( new Vector3f( 1.0f, 0.0f, 0.0f ) );
waterEffectRenderPass.setBinormal( new Vector3f( 0.0f, 0.0f, 1.0f ) );



Otherwise water surface acts as a mirror and reflects everything which is not nice either..

Here are a couple of screenshots:

http://www.student.oulu.fi/~anmakine/p1.png

http://www.student.oulu.fi/~anmakine/p2.png

Ok well it seems that whenever I go inside the bounding box of my terrain the water bugs. How can this be prevented?

Don't go inside the bounding box of the terrain. :smiley:

Well when I'm on the surface of the terrain I'm inside its bounding box.