Water broken across land

What is this caused by?



private WaterRenderPass makeWater()
    {
        water = new WaterRenderPass(cam, 6, false, true);
        water.setWaterPlane(new Plane(new Vector3f(0f, 3f, 0f), 0f));
        water.setClipBias(-1f);
        water.setReflectionThrottle(0f);
        water.setRefractionThrottle(0f);
       
        myWater = new Quad("myWater", 3, 3);
        FloatBuffer normBuf = myWater.getNormalBuffer(0);
        normBuf.clear();
        normBuf.put(0).put(1).put(0);
        normBuf.put(0).put(1).put(0);
        normBuf.put(0).put(1).put(0);
        normBuf.put(0).put(1).put(0);
       
        water.setWaterEffectOnSpatial(myWater);
       
        rootNode.attachChild(myWater);
       
        water.setReflectedScene(rootNode);
        water.setReflectedScene(skybox);
        water.setSkybox(skybox);
       
        pManager.add(water);
       
        return water;
    }

It means that your waterQuad is just above the terrain at those points

you can set it height with

water.setWaterHeight(height);





Hellmaster.

Hellmaster said:

It means that your waterQuad is just above the terrain at those points
you can set it height with

water.setWaterHeight(height);



Hellmaster.


Interestingly enough I had to change the plane's second variable.


water.setWaterPlane(newVector3f(0f,1f,0f),1f)

is what I have now and it works quite well

screenshot here

Glad you got it working.



I'm not sure what the plane does  i just leave it at its default which is indeed what you have now.



Hellmaster.