Issue with Water on terrain

I am using QuadWater, and as I move the camera the water is annoyingly "bleeding" all the edges of the terrain, where they toutch. Its annoying to see this. Help!

sounds like a z-fighting issue. what's your near/far -plane range?

farPlane = 100000.0f;

I seemed to have used zBuffer twice

in gameInit() - before i called any terrain.skybox building

/** Create a ZBuffer to display pixels closest to the camera above farther ones.  */

      ZBufferState buf = display.getRenderer().createZBufferState();





and again in skyBox()

ZBufferState zState = display.getRenderer().createZBufferState();

zState.setEnabled( false );

skybox.setRenderState( zState );

What can i do?

you can have as many zbufferstates as you wish. the zbufferstate on the skybox is to prevent the skybox from drawing into the zbuffer. otherwise it would get in front of everything else :wink:

what's your nearplane set to? it's the difference between those two that defines the range your poor little zbuffer has to work on, and that farplane seems to be quite far :slight_smile:

hmmm… i dont seem to have a nearPlane, what would that be used for?

My farPlane is far, because my terrain is 513x513 and its scalled hugly, i dont know if this is bad? I'm having trouble scaling my game, im not sure how to scale it for a "first person game." I need my textures to look nice up close, and my farplane was so far, because i was going to try to work on an airplane game, and i had to see far in hugely scaled terrain or it cuts too much grrr…

you can always scale down the player instead :slight_smile:

Hmmm, I just dont know?

Like what is the scale of a game like HalfLife2? A typical first person game?

I know in their map editor a normal wall size is 128 "units." I'm guessing that will be pixels, because I made walls with cubes that were 8x8 etc.

Also Hl2 uses 512x512 textures. I'm not sure, I need my walls to show 512x512 textures and have anything scaled properly, I just dont know lol!!

If I scale down the land, then the gemotry isnt as attractive, then Id have to use 64x64 which is not as good, but if I try like 256x256 then its all "smushed".

Ok, I found out what nearPlane is, its in my cam set frustrium or whatever.

nearPlane = 1;

But the weird part, is that I change it to 1000 for no reason, and well my water is really dark (but i can see the ripples up close), and my skybox is gone. But the good news is, that it doesnt bleed anymore on the land… hrumpgh