Jump to content
  • Advertisement


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



This topic is 6081 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''m using an Octree for raytracing. When the ray intersects a cube, I check the ray against the children or if there''s no children, against the triangles in it. The problem is that I don''t know how to figure out(efficiently) which cubes inbetween the veticies of the triangle contain the triangle. For example, if there is a few small triangles in front of a big one, when I create new children for the small one, I don''t know how to detect if the big one is still in the cube. Hopefully that''s clear. Thanks, tj963

Share this post

Link to post
Share on other sites
I developped a RayTracer one month ago with an octree. I had somme problem correctly to detect the face in the cube. The real difficulty was to detect a face inside a cube when no vertex are inside it.
Find the pdf called:

Fast 3D Triangle-Box Overlap Testing
Tomas Akenine-Möller
Chalmers University

It seems hard to understand but in fact the mathematics used are quite simple. However you could program the algorithms without understand everything. Finally the test is quick and the code is available online.

Good luck !

Edited by - ArnoAtWork on February 25, 2002 4:34:08 AM

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!