Fast, Minimum Storage Ray-Triangle Intersection

Tomas Möller
Prosolvia Clarus AB

Ben Trumbore
Cornell University

This paper appears in issue Volume 2, Number 1.
Purchase this issue from the akpeters.com web site.

Abstract

We present a clean algorithm for determining whether a ray intersects a triangle. The algorithm translates the origin of the ray and then changes the base to yield a vector (t u v)T, where t is the distance to the plane in which the triangle lies and (u,v) represents the coordinates inside the triangle.

One advantage of this method is that the plane equation need not be computed on the fly nor be stored, which can amount to significant memory savings for triangle meshes. As we found our method to be comparable in speed to previous methods, we believe it is the fastest ray-triangle intersection routine for triangles that do not have precomputed plane equations.

Author Information

Tomas Möller, Prosolvia Clarus AB, Chalmers University of Technology, Gardavagen, S-41250S-41250 Gothenberg, Sweden tompa@clarus.se

Ben Trumbore, Cornell University, Program of Computer Graphics, Ithaca, NY 14853 wbt@graphics.cornell.edu

Source Code

Downloadable C source code implements the algorithm described in this paper, and for comparison, Badouel’s algorithm.

Statistical Analysis

A report on the efficiency of this algorithm as compared with Baduel’s algorithm.

Images

Car (model courtesy of Nya Perspektiv Design AB)

Errata

  • In the source code on page 24, the definition of the macro DOT(v1,v2)
        #define DOT(v1,v2) v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2]
    is missing enclosing parentheses. The definition should be:
        #define DOT(v1,v2) (v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2])
    This correction has been made in the downloadable source code listed above

BibTeX Entry

@article{MollerTrumbore97,
  author = "Tomas Möller and Ben Trumbore",
  title = "Fast, Minimum Storage Ray-Triangle Intersection",
  journal = "journal of graphics tools",
  volume = "2",
  number = "1",
  pages = "21-28",
  year = "1997",
}