Friday, December 27, 2013

SDS Paths

Although bidirectional path tracing can efficiently render many types of paths, it has a very difficult time rendering specular–diffuse–specular (SDS) effects (such as reflected and refracted caustics) because they can only be sampled with pure light tracing (t = 0) or pure eye tracing (s = 0). Metropolis light transport can render these types of paths much more efficiently because once it discovers one it can use small path mutations to explore similar paths, all in an unbiased way.

While testing these SDS paths in my renderer, I discovered a few other interesting things. First, when using certain algorithms, infinitesimal changes in primary sample space can result in large jumps in path space. These jumps can cause interesting but undesirable artifacts in parts of MLT renders where small-step mutations are key (such as the lighting of the blue sphere in the images below). Second, because bidirectional path tracing is so bad at rendering SDS images, even tens of millions of bidirectional path tracing samples are not enough to to compute an accurate estimate of the average scalar contribution. This can result in MLT renders that are slightly too bright or slightly too dark.

Below are some equal-time renders of a blue sphere inside an acrylic sphere. The first image was rendered using MLT, the second was rendered using MLT with an alternate method of computing an arbitrary orthonormal basis given a surface normal, and the third image was rendered using standard bidirectional path tracing. Both MLT and BPT make easy work of the caustic, but BPT has a hard time rendering the blue sphere, the caustic reflected from the lower left of the acrylic sphere, and other effects. Click the images to compare them at full resolution.