There's a fly in the ointment

Published May 29, 2011
Advertisement
I found a bunch more small bugs and fixed them, but I haven't posted the changes yet...
I've created a test geometry involving two boxes, one inside the other, with the outer box's normals pointing inwards.
The BSP generator can't handle it. That's not good.

The BSP generator has two big problems.
The first is with this concept of just duplicating partitioned triangle indices that I've been trying out.
We end up passing entire geometries down the tree where they are duplicated endlessly.
The second problem is that I have not implemented some way of marking a splitting plane as having been previously used, and so not a suitable candidate in subsequent selections.

There may be no alternative but to implement a full partitioning of the input geometry.
I was hoping to avoid this because the result is that we generate a LOT more triangles and new vertices.
However I see no way to avoid it.

If anyone wants to comment, now is a good time :)

EDIT:
Having gone most of the way to fully implementing a complete triangle splitting bsp tree generator, I found more fundamental bugs in the implementation - subsequently I discovered that the Triangle Index based scheme probably would have been ok had these bugs not been causing hell.
Oh well, I'll forge ahead.
I have repurposed the global list of planes in the tree container class to record the planes I've actually used as a splitting plane, and implemented a Triangle class which contains indices and the triangle's plane.
Various methods have been adjusted to take a Triangle*
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement