[SOLVED] Why is my SimpleWaterProcessor water opaque?

Why is my SimpleWaterProcessor water opaque?
code:
SimpleWaterProcessor waterProcessor = new SimpleWaterProcessor(assetManager);
waterProcessor.setReflectionScene(rootSkyNode);
waterProcessor.setWaterDepth(0.1f);
waterProcessor.setWaterTransparency(0.1f);
waterProcessor.setWaterColor(new ColorRGBA(1,1,1,0.1f))
viewPort.addProcessor(waterProcessor);

So your issue is about setWaterTransparency(0.1f) but your water is almost 100% reflective?
The thing is: What you currently see is the reflection of the terrain and the sky there.

Also note that 0.1f is the default and means 10% transparent, turn it up to 0.9f and you should see what you want to see.

i did! but still cant see the ground

Also make sure you’re adding a TreanslucentBucketFilter and that it is added last.

1 Like

Does TestSimpleWater work?

If so, then see what you do differently.


not my need! i need see the ground but it only show the sky on water!

also, consider setting this value to be higher. At first glance, the lower the depth value, the foggier the water will be (excepting the reflected part modulated with the inverse fresnel term, performed in the shader)

The javadoc agrees with you.

ok!i find the bug ! i use one node

what do you mean? how one node can be issue here?

1 Like