How does a BSP tree work for Z sorting?
- by Jenko
I'm developing a 3D engine in software, and so I must compute Z sorting manually. I'm currently using the painters algorithm to sort triangles and then drawing them back-to-front. This causes artifacts that I'm trying to correct.
Would using a dynamic BSP-tree ensure "correct Z sorting" of triangles? Why? Because the bounding volumes of triangles would be similar?
Since I would have a single "world" BSP tree, would I have to remove and re-add any moved/scaled/rotated object into the tree?
Is it possible to add triangles into a BSP tree without the expensive cutting process? Why do you need to cut triangles on the axis planes anyway?
Is it faster to traverse a BSP tree from any angle, than to sort all tris each draw like the painters algorithm?