XRT 1.1.0 released

Posted: 08 Dec 2010 22:47
Tags: caching downloads irradiance


XRT 1.1.0 major new feature is the support of indirect lighting between diffuse surfaces (also called color bleeding). Indirect lighting is the phenomenon in which objects or surfaces are colored by reflection of light from nearby surfaces. For instance, a red carpet next to a white wall gives a pink tint to the wall.

Computing indirect lighting is really simple: sample the hemisphere centered on the intersection point and oriented according to the surface normal by firing rays, shade each intersection and average the results. Because sampling is a random process, it produces noise which can only be smoothed out by taking many samples: 256 samples at a single location is a common number. Even worse, shading the intersected surfaces may as well spawn a new batch of rays for reflection, refraction, shadows or … indirect lighting, and so on recursively. It only stops when a ray reaches a light source or a perfectly diffuse surface. One can easily figure out that the number of rays can grow out of control.

Fortunately, there are a number of techniques to limit this exponential growth. One of them, irradiance caching, is based on the fact that diffuse lighting varies much more slowly than specular lighting and is a prevalent effect for most scenes (yes, a swimming pool is a perfect counter example). Therefore, there is no need to spawn specular rays when shading a surface hit by a diffuse ray and it is not necessary to compute diffuse lighting at every hit point: interpolating between results from sparsely distributed locations is enough. For that purpose, you need a caching mechanism.

XRT implementation of irradiance caching is based on "Practical Global Illumination with Irradiance Caching" from Jaroslav Krivánek and Pascal Gautron, available here, with (nearly) all bells and whistles1. Some restrictions apply:

  • neighbour clamping is implemented but disabled because it is currently much too slow.
  • last query reuse is not implemented
  • multiple bounces caching is not implemented
  • motion blur is not handled

Finally, XRT is now linked against libtcmalloc, Google replacement for Microsoft memory allocator (link). Without changing a single line of code, I have seen an average 20% performance improvement on rendering times. Not too bad …

As usual, the goods are available in the Downloads section.

Rate this post:

rating: 0+x

Comments: 0