Z-Order problems?

Blitz3D Forums/Blitz3D Programming/Z-Order problems?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

If you want a single mesh with alpha to sort properly among itself then you need to look into how BSP trees are constructed, because you need to order the polygons a certain way to get the draw order to be right, and you may need to split some polygons to achieve this perfect draw order.

Imagine if you will a two sided cube with alpha. To draw it in the correct order, you would put all the inside faces into the mesh first, and then the outside faces. An inside face can never draw on top of an outside face, but the outside faces draw on top of the inside faces if you are outside the cube looking in.

But if you want multiple objects with alpha to sort properly amongst eachother, then you've got a problem which is currently not solveable in a satisfactory way. But give it a couple years and we will have zbuffers that work with transparency. I'm pretty sure they found a way to solve the problem.

Until then, your best bet is to use masking instead, if you're trying to render trees and grass.