if im go near to the waterplane with the flycam than the water is brightly and if the flycam move away from the plane than the water gets to dark.
how can i disable this? i want the water to have the same color at any flycam position.
Could you post some screen shots please? I don’t really understand the issue
Camera is near water:
Camera a litle bit away from water:
i want the brightness of the water be the same independent of the camera position.
wow…the water should not look like that.
Have you got a sky?
no, im only using a reflection node (quad with an image on it).
I dont need a sky, i just want a light blue water in toon style.
what’s the color of the ground under the water?
The water works like this, the closer you are to the water the more the refraction is visible, maybe the ground is clear.
Try to set the water transparency to 0, and only the reflection map will be displayed
Hi, this is the code without a sky:
[java] Quad quadSky = new Quad(bb.getXExtent() * 2, bb.getZExtent() * 2);
Geometry quadGeo = new Geometry("Sky", quadSky);
quadGeo.setLocalRotation(new Quaternion().fromAngleAxis(-FastMath.HALF_PI, Vector3f.UNIT_X));
quadGeo.setLocalTranslation(-bb.getXExtent(), -1f, bb.getZExtent());
Material matSky = new Material(assetManager, "Common/MatDefs/Misc/SolidColor.j3md");
SimpleWaterProcessor waterProcessor = new SimpleWaterProcessor(assetManager);
// we set the water plane
Vector3f waterLocation = new Vector3f(0, -6, 0);
waterProcessor.setPlane(new Plane(Vector3f.UNIT_Y, waterLocation.dot(Vector3f.UNIT_Y)));
waterProcessor.setWaterColor(new ColorRGBA(0, 0, 1, 1));
// we set wave properties
waterProcessor.setWaterDepth(22f); // transparency of water
waterProcessor.setDistortionScale(4.105f); // strength of waves
waterProcessor.setWaveSpeed(.03f); // speed of waves
// we define the wave size by setting the size of the texture coordinates
Quad quad = new Quad(bb.getXExtent() * 2,bb.getZExtent() * 2);
// we create the water geometry from the quad
Geometry water = new Geometry("water", quad);
water.setLocalRotation(new Quaternion().fromAngleAxis(-FastMath.HALF_PI, Vector3f.UNIT_X));
water.setLocalTranslation(-quad.getWidth() / 2, .0011f, quad.getHeight() / 2);
If im setting the sky, than the water is bright, but i dont need a sky.
After i set [java]matSky.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off);[/java] it worked, but its looking awful.