Sign in to follow this  
Vexator

OBB vs. frustum intersection test - what's missing?

Recommended Posts

For the past few days I've tried to extend my frustum culling implementation by oriented bounding boxes (OBB) and although there's plenty of material with different implementations on the web, I haven't managed to get it working. I guess my poor math skills are to blame for that. I understand that I have to integrate the OBB's rotation into the intersection tests but how exactly, I'm not sure.

The first link is an excerpt from my AABB vs. frustum intersection code which is working just fine; the second link contains two implementations of OBB vs. frustum intersection tests which do not work as expected; both are inspired by forum or blog posts and have been verified by several people to be working fine. so obviously, I'm missing something. The 2nd implementation, for example, does not seem to consider the box's rotation at all - the visibility test reports the same results as it would with no rotation applied.

I know there have been numerous threads about this already and I read them all and still can't find what's wrong.

I'd be grateful if someone could have a look. Thank you!


AABB vs. frustum (working): [url="http://pastebin.com/PEeDKLET"]http://pastebin.com/PEeDKLET[/url]
OBB vs. frustum (not working): [url="http://pastebin.com/5JGSwE9X"]http://pastebin.com/5JGSwE9X[/url]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this