Manta Interactive Ray Tracer Development Mailing List

Text archives Help


Re: [Manta] Mesh::addTriangle()


Chronological Thread 
  • From: Thiago Ize <thiago@cs.utah.edu>
  • To: ollie@lanl.gov
  • Cc: MANTA <manta@sci.utah.edu>
  • Subject: Re: [Manta] Mesh::addTriangle()
  • Date: Wed, 05 Mar 2008 16:04:10 -0700

Yes, I'm afraid it can be a bit confusing, but you seem to be understanding it. The reason we do this is that there are many kinds of triangle intersection algorithms, and we want to support all of them. We also do this for performance reasons since when traversing an acceleration structure and meeting triangles we can get all the triangle data in one or two contiguous cache lines (all the needed data is packed together in the triangle object) instead of having to do all the indirections required by the mesh class.

WaldTriangle precomputes some information so the triangle intersection test is very fast. It also supports frustum culling if the ray packet has corner rays and a common origin and this can also give a performance improvement. The downside is that for dynamic scenes where triangles change every frame, the precomputation time might result in overall slower time; although in practice that doesn't seem to be a problem. This is also partly why adding -imagetraverser "tiled (-square )" -camera "pinhole(-normalizeRays -createCornerRays)" to the command line can give a performance improvement.

KenslerShirleyTriangle is more of a "standard" triangle intersection which doesn't precompute or store any data aside from it's location in the mesh.

Both of these are very fast and you can't really go wrong with either (try them both and see which works best).

Thiago

Li-Ta Lo wrote:
Hi,

I am confused with the Mesh::addTriangle() method (well actually the Mesh class). It looks like the triangles are created implicitly when
we do vertex_indices.push_back() three vertex indices at a time and
the only purpose of addTriangle is to define which kind of triangle
it is. Am I right? Can someone also explain to me what these tree
kinds of triangles are? Thanks.

Ollie






Archive powered by MHonArc 2.6.16.

Top of page