Jump to content
  • Advertisement

Archived

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

Spencer

frustum aabb intersection from Real-time rendering...(SOLVED)

This topic is 5203 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

Hi, i was just implementing the frustumAABBIntersects() function from the book "Real-time rendering" 2nd ed. p.612 and i have some questions. It is supposed to return one of {OUTSIDE,INSIDE,INTERSECTS} but from what i experience the aabb gets clipped away as soon as any part of it is outside the view frustum...anyone know anything about this? thanks in advance [EDIT The problem was that when i extracted the planes from opengls matrices i got the normals the "wrong" way..however i KNEW this so i swapped some inequalities, however, there were som more inequalities that needed to be swapped. The strange thing was that with these inequalities in the wrong way, the method _almost_ worked....but now it works...thanks ppl [/edit] --Spencer "All in accordance with the prophecy..." [edited by - spencer on May 11, 2004 9:49:58 AM]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I am not sure what the method is called but the ide is to test only teo points of the box. These points are the points wich form the diagonal that is most alligned to the plane.
This is done for all planes in the frustum...Hope this helps
Anyone have any links to this Woo''s method?

thanks

Share this post


Link to post
Share on other sites
woops...for some reason i was not logged in in the above post :/

--Spencer

"All in accordance with the prophecy..."

Share this post


Link to post
Share on other sites
Most aligned?? You sure it''s not the most perpendicular diagonal that you need to be testing?

Michael K.,
Co-designer and Graphics Programmer of "The Keepers"



We come in peace... surrender or die!

Share this post


Link to post
Share on other sites
hmm..yes that is true....it is supposed to be most aligned to the planes normal...unfortunately it was just a writing mistake so it doesnt change anything



--Spencer

"All in accordance with the prophecy..."

Share this post


Link to post
Share on other sites
Make sure that the normals of the frustum planes point the right way. I don''t know what the convention used in real time rendering is, but personally I think using planes where the normals points out from the frustum is most logical. I also posted code that does AABB-frustum intersection thread in this thread in the Math forum:
http://www.gamedev.net/community/forums/topic.asp?topic_id=224424

Share this post


Link to post
Share on other sites
Here is quite a cool way to do aabb/frustum checks... and it doesnt require any frustum plane extraction from the projection matrix...

Im not sure if this method is faster, but it looks like it could be... maby someone could clear that up for me?

http://rafb.net/paste/results/L2271362.html

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!