Rendering Problem...

Started by
10 comments, last by IceSynth 18 years, 5 months ago
I have been trying to add water to a landscape engine I am making, but I am getting a strange effect when I render it. Does anyone have any idea what this is and where I can find information on how to fix it? http://hcmd.no-ip.org/users/chris/HostedImages/EternalLiberty5_1_A2_CMP.jpg
Embedded Systems Hardware Designer / Software DeveloperSylver technologies Inc.
Advertisement
You mean, why does your water look like striped taffy... or why there is a sawtooth shape at the edge?
Why there is a sawtooth at the edge. I put a random texture on the water because the normal one was mostly transparent.

The land is made up of a 32x32 grid, and the water is one large plane.
Embedded Systems Hardware Designer / Software DeveloperSylver technologies Inc.
Looks a bit like a Z buffer precision problem.
Thanks, that was the problem. Increasing the precision from 16-Bit to 24-Bit worked.
Embedded Systems Hardware Designer / Software DeveloperSylver technologies Inc.
-nm
Don't just increase z-buffer precision. It's not ok that this happens with a 16-bit z-buffer. Move the near clipping plane further and this will drastically improve z precision.
How does the near clipping plane affect the precision?
Embedded Systems Hardware Designer / Software DeveloperSylver technologies Inc.
The precision is biased towards the near plane. So moving the far plane closer increases the precision of the z-buffer a bit, while moving the near plane towards the far plane greatly increases the precision of the z-buffer.
It's somewhat complicated but go through the math properly and you will see the problem. In any case, push the near plane as far from the camera as you can before it starts clipping into objects. This will leave more bits for actual Z values instead of wasting them on the air 1mm from the camera. Precision is higher closer to the camera so you can really waste a LOT of bits by putting the near plane too close to 0.

This topic is closed to new replies.

Advertisement