[Radiance-general] Mesh Rendering Performance

Greg Ward gregoryjward at gmail.com
Sat Feb 25 02:12:02 CET 2006


Hi Marcus,

It doesn't surprise me that much that the mesh intersection routines  
are slower.  Many more operations are required to compute the ray- 
triangle intersection when the plane equation is unknown.  I chose  
not to store the plane equation because it would approximately triple  
the amount of memory used per triangle during rendering, and the  
whole point of the mesh primitive is to minimize memory use.  It's a  
classic time/space trade-off.  The performance would be even worse if  
it weren't for the edge caching, which takes only a modest amount of  
memory.

The other thing that costs is transforming the ray before and after  
intersection, similar to having an octree instance (which it is).   
Breaking the mesh into smaller pieces may or may not help matters,  
depending on how compact the mesh octree is.  In other words, it's a  
good idea to use multiple object meshes if the combined mesh is  
spread mostly in one or two dimensions, or is very sparsely populated  
by geometry.  That way, you can avoid many of the the voxel  
computations through empty space.  However, just like octree  
instances, it doesn't pay to have many overlapping mesh bounding cubes.

I hope this helps.
-Greg

P.S.  Meshes are faster in any case when you have local (u,v) texture  
coordinates.

> From: "Marcus Jacobs" <marcdevon at hotmail.com>
> Date: February 24, 2006 1:18:58 PM PST
>
> Dear Group
>
> I have been using obj2mesh to convert my 3D scene to the Radiance  
> triangular mesh (rtm) format for the last 6-8 months. Although I do  
> prefer using this method to convert my scenes, a recent test  
> confirmed that the performance suffers greatly when using a mesh  
> when compared to using a scene consisting of polygonal objects  
> (i.e. void polygon triangle1 ......) . Case in point, one rendering  
> took 8.7 for the scene consisting of a mesh primitive and 3.7 hours  
> to render for the scene consisting of triangular polygon  
> primitives. This is with the -n option set to 6, which should yield  
> the best performance (actually, its about the same whether I leave - 
> n to the default or if I use a lower value). A slight performance  
> decrease (5%-10%) would be acceptable but 135% is extreme. On top  
> of that, I have some modified source code for o_face that can yield  
> a 10%-20%+ performance increase without any additional memory cost  
> (It's just an implementation of Moller-Trumbore ray/triangle  
> intersection). What is surprising to me is that I would normally  
> assume that the mesh primitive would be more efficient due to its  
> caching of the ray/edge comparisons during ray tracing but this  
> does not seem to be the case. Out of curiosity, has anyone here  
> experienced the same? Does anyone here know if Radiance sees the  
> rtm file as one huge mesh or as several  smaller meshes? If this is  
> the case, does anyone know if breaking each scene object as a  
> separate mesh primitive would improve performance?
>
> Thanks
>
> Marcus



More information about the Radiance-general mailing list