Advertisement Jump to content


This topic is now archived and is closed to further replies.


bsp tree issue

This topic is 5920 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have been working on a project recently that requires building a bsp tree from a list of polys and displaying the scene using OpenGL. I only send through triangles. There are only simple geometric objects in the scene. Of course, there were a lot of bugs when I started, but I fixed all of them... except for one. The objects display fine when using the z-buffer and sending all the polys through in no particular order. But, when I turn z-buffering off, and render the scene by traversing the bsp tree in the correct fashion with just backface culling a minor issue pops up. Everything is fine except there are small black dots (mainly), and tiny black polys (rare) that pop up on the objects as I move the camera around. They pop up and go away as the camera moves. This is my first use of a bsp tree. I have tried to narrow down what the issue is, but I can''t figure this one out at all. I know other people working on the same project with me are having the same issue, and they don''t know what it is either. I''m sure someone on here has run into this, and hopefully figured it out finally. I''d be extremely grateful for any help on this minor bug. Thanks, G

Share this post

Link to post
Share on other sites
An idea... maybe this is your problem...

What happens when you render the polygons by traversing the tree, but with the z-buffer on?

If you are not careful splitting polygons with your BSP you can create gaps between polygons because of numerical precision issues. This can happen when you use BSPs or are doing CSG operations.

Check to see if the black spots occur where two polygons meet. This may be the cause of your problems. If it is, you have 2 options:
1) to be more careful when splitting polygons, or
2) after you made the BSP, loop through all polygons and fix the subpixel gaps.

Good luck!

EDIT - grammar

[edited by - Z01 on November 4, 2002 1:25:32 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!