Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Frustum Box Intersection (again i know)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 derKai   Members   -  Reputation: 229

Like
0Likes
Like

Posted 04 November 2013 - 09:42 AM

hi,

im currently working on frustum culling and looked for frustum-box intersection tests.

i found a tutorial appearing all the time: http://www.lighthouse3d.com/tutorials/view-frustum-culling/geometric-approach-testing-boxes-ii/

even here in the forum: http://www.gamedev.net/topic/512123-fast--and-correct-frustum---aabb-intersection/

 

during debugging some objects that should be culled were rendered so i looked deeper into it..

i made a picture to visiualize my problem..

 

FrustumBoxTest.png

 

is it possible that the algorithm misses that case?

what is the common solution to address this? I'm fine with AABBs ;)

 

thanks

- Kai



Sponsor:

#2 raigan   Members   -  Reputation: 726

Like
0Likes
Like

Posted 04 November 2013 - 11:57 AM

Here's a pretty great -- and succinct -- article on doing this right: http://www.iquilezles.org/www/articles/frustumcorrect/frustumcorrect.htm



#3 eppo   Crossbones+   -  Reputation: 2508

Like
0Likes
Like

Posted 04 November 2013 - 12:14 PM

Yes, this special case will not be culled. A box needs to be outside one of the clipping planes/lines in its entirety to be able to be culled.

The reason this is not such a big deal is the further away the box from the camera is the larger it needs to be to satisfy the above "unclipable" conditions. 

Likely, in practice only a few objects will fail this way, so it's often not worth it to write a more expensive test.

 

If you do want 100% correct results, the test would essentially become a convex overlap test. A separating-axis test can solve this. 


Edited by eppo, 04 November 2013 - 12:43 PM.


#4 derKai   Members   -  Reputation: 229

Like
0Likes
Like

Posted 06 November 2013 - 03:29 AM

Thanks for the confirmation, eppo ;)

to not increase the computation costs i decided to fit a bounding sphere around the frustum and test agist this first.

 

@raigan these are a lot of tests per box.. maybe there is a more optimized version of that method (i'll look into it if there is time and keep you posted)


Edited by derKai, 06 November 2013 - 03:29 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS