How does a BSP tree work for Z sorting?

Posted by Jenko on Game Development See other posts from Game Development or by Jenko
Published on 2011-11-17T07:19:19Z Indexed on 2011/11/17 10:14 UTC
Read the original article Hit count: 293

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.

  1. Would using a dynamic BSP-tree ensure "correct Z sorting" of triangles? Why? Because the bounding volumes of triangles would be similar?

  2. 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?

  3. 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?

  4. Is it faster to traverse a BSP tree from any angle, than to sort all tris each draw like the painters algorithm?

© Game Development or respective owner

Related posts about 3d-engines

Related posts about triangles