Advertisement Jump to content
Sign in to follow this  

CSG unpredictability

This topic is 4888 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've recently been writing a Laidlaw-esque (the details are different to make my life easier) CSG implementation with AABB trees, but the results from the program can vary widely when they shouldn't - I suspected it wasn't working properly so during the phase where you determine which polygons are inside and which outside I cast a ray to the nearest face in a random direction instead of from the polygon normal. I'd expect that to cause some problems but in fact depending on whether I enable of disable bounding box tests, make the AABB tree all in one node and random chance caused by the vector direction I get variations from around 3000-4500 polygons output from my test level. I'm pretty sure I've covered numerical inaccuracy in the code and I can't figure out where the problem is coming from (and I don't think it's bad input data). The trouble is I can only get the problems to show up on large datasets. Does anybody have any really bright ideas of what might be wrong or how I can track this one down?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • 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!