Möller ray/triangle-intersection-problem
Hi!
I have some problem with the Möller ray/triangle intersection test. I have a triangle that''s perpendicular to the xz-plane and one of the edges lies in the xz-plane. Then I have an origin for my ray that''s in the same plane (xz-plane). Now when i shoot a ray (the ray is in xz-plane) towards the triangle it only hits for a few angles, even if it should hit for all my testcases.
Can this be a problem caused by a badly choosen epsilon or can it be that I''ve choosen to use floats when I''ve implement it?
/Fredrik
Probably isn''t a float problem. Did you write your code yourself, based on Moller''s paper? Or did you take existing code from somewhere? If you used somebody else''s code, did you test it using their test cases?
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
June 02, 2003 03:02 PM
I have written the code myself. It''s an implementation of the algoritm that is described in Real-time rendering S.E. I have compared it with Möllers implementation (the one availible from www.realtimerendering.com) and it looks the same. I guess I have to run my project with his code and then maybe I found the error.
The epsilon he uses in his code is not the same as in the book which also makes me a bit confused.
/Fredrik
The epsilon he uses in his code is not the same as in the book which also makes me a bit confused.
/Fredrik
Comparing against another implementation is a really good idea. I actually hate using epsilons. Any code that requires an epsilon is destined to be unreliable, though unfortunately sometimes you have to (when using floating point math).
Have you looked on the www.realtimerendering.com website? Occasionally, books have errors. In fact, there is a specific page for corrections:
http://www.ce.chalmers.se/staff/tomasm/RTR/corrigenda.html
But I don''t see any corrections related to that algorithm.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Have you looked on the www.realtimerendering.com website? Occasionally, books have errors. In fact, there is a specific page for corrections:
http://www.ce.chalmers.se/staff/tomasm/RTR/corrigenda.html
But I don''t see any corrections related to that algorithm.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement