Major z-ordering problem.

Blitz3D Forums/Blitz3D Programming/Major z-ordering problem.

poopla(Posted 2003) [#1]
I know there must be a decent way arround this. I have a plane with a mesh terrain protruding up through it. Where the plane, meets the mesh, it can't decide what to draw first, this is causing problems, and I was curious about any tips ya's may have.


Bouncer(Posted 2003) [#2]
Have you tried turning on W-buffering?


Rob(Posted 2003) [#3]
in 16bit I think wbuffering gets turned on as standard, but in 32 bit it may be off. I can't quite remember so you'll need to check.
Since this plane will be behind everything always, will entityorder help? It doesn mean nothing can "sink" into it though.


Al Mackey(Posted 2003) [#4]
Z-buffering can't apply to textures that are transparent (either by a partially transparent texture or an Alpha set to less than 1.0), so B3D orders these entities by the distance of their origins to the camera. Assuming for a moment that your plane is the water level and the mesh is the ground, be sure you're using a solid texture on the ground and it should look fine.


poopla(Posted 2003) [#5]
Both entities have their alpha set to 1. I don't have WBuffer on yet, will try that.


Mustang(Posted 2003) [#6]
You may have to check your Cameraranges too:

http://www.blitzbasic.com/b3ddocs/command.php?name=CameraRange&ref=3d_cat

...Especially if you have really big or small objects (measured using Blitz units).


jhocking(Posted 2003) [#7]
Improperly set camera range is the most common problem with inexperienced Blitz developers. I'm especially sensitive to the problem since I have an older graphics card with a coarse Z-buffer; even with improperly set camera range the game might look fine on a newer graphics card with a really accurate Z-buffer, but on older hardware like mine it'll be all ugly flashing, popping polygons. The rule with camera range is that you want the far clipping plane to be as near as possible while still being far enough. If for example you want the entire level to render all the time, the camera range should be the size of the level and nothing more. Anything beyond that is a wasted part of the Z-buffer.