Random barrie bits

Started by
5 comments, last by fana 20 years, 11 months ago
Situation: I am drawing terrain using _QUADS from a heightmap. This works fine. The next stage: add water. I''ve drawn a massive _quads covering the whole map at a certain level. No problem. The problem: when these meet the terrain kind of breaks down into bars that stay static and kind of build the terrain. really hard to explain. see screenshot. screenshot avaliable from: http://www.fana.co.uk/screenshot.jpg
Advertisement
Could you render it in wireframe for us too?

Use for the water line color a different color then the one for the terrain please! This will probably give us a better view on the problem.
[www.LifeIsDigital.net - My open source projects and articles.
sorry, its a bit late...

If you want to see the problem you can look at it on:
http://www.fana.co.uk/problem.zip (<100kb)

pressing f2 switches to lazy wireframe mode, where instead of gl_quads, i have used gl_lines.

the water is now blended onto the terrain, but as you can see this don''t help.

old screenshot still the same.

terrain is rendered using the quad by quad method.

I simply cannot see what is going wrong to cause this effect...

Thanks so far...

RE: water line color etc.: I think that the screenshot may have been a little misleading (sorry)
Its a Z buffer issue. You need to increase the precision of your Z buffer (to 24-bit for instance) or use your existing Z buffer precision better, probably by moving your near clip plane further out. (Z buffer values are exponential, so that the nearer values have much more precision than the far values. Moving the near clip plane further away gives you a lot more precision at farther distances)

[edited by - benjamin bunny on May 2, 2003 10:52:23 PM]

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

Ok, changed from last post:

Now have working at 24bit depth buffering.

What percentage of people running dx games will support this?



[edited by - fana on May 4, 2003 11:01:35 AM]
[NB: Please look at above post]

quote:Original post by benjamin bunny
Moving the near clip plane further away gives you a lot more precision at farther distances.


What do you mean by this?

Do you mean setting the distance to say 20.0f? (so the terrain dissapears wghen you bget close?
quote:Original post by benjamin bunny
Moving the near clip plane further away gives you a lot more precision at farther distances.

quote:Original post by fana
[NB: Please look at above post]

What do you mean by this?

Do you mean setting the distance to say 20.0f? (so the terrain dissapears wghen you bget close?

No. The units in OpenGL are completely arbitrary, so I didn''t specify the distance. Just move it as far out as you can cope with. Even moving it from 0.5 to 1.0 will make a big difference.

Also, if your far clip plane distance is large, reduce it.

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

This topic is closed to new replies.

Advertisement