9.2 ERPT mutation Energy Redistribution Path Tracer (ERPT) 102 (a) (b) (c) (d) (e) (f) Figure 9.5: Original mutation strategy (a),(c),(e) vs. Improved mutation strategy (b),(d),(f). Computation times were similar for both strategies. Our improvement trades structural noise for more uniform noise, reducing visible artifacts. tation strategy proposed by Kelemen also mutate the length of the path. Therefore, it is not trivial to efficiently implement the mutation strategy from Kelemen on the GPU. How-
Energy Redistribution Path Tracer (ERPT) 9.3 GPU ERPT ever, by letting the perturbation size for the outgoing direction of a vertex depend on the incoming direction <strong>and</strong> the local BSDF of a vertex, the acceptance probability may be further increased. This seems especially beneficial for near-specular materials. Furthermore, in our implementation a specular vertex must remain specular after mutation. This results in smaller features, especially when complex caustics are present. Dropping this constraint will increase feature size even further, reducing speckles which are caused by difficult caustic features. 9.2.4 Filter For most mutation strategies, including ours, it is unavoidable that some scenes will contain high energy features with a small image space size. As discussed earlier, this may result in high energy speckles. One cause of speckles that is hard to completely prevent is that of floating point imprecisions. For example, in most ray tracing implementations, it is possible (although unlikely) for a ray to pass through two triangles at their connecting edge due to arithmatic imprecisions in the intersection computations. If the energy on such a path is redistributed, this may result in a feature consisting of only a single path causing a one-pixel sized speckle. In the original ERPT paper, consecutive sample filtering is used to solve this problem. The consecutive sample filter prevents a mutation chain from getting stuck to long at the same pixel. If it has been stuck at the same pixel for some fixed number of consecutive mutations, the mutation chain will stop contributing energy until it has moved away from the pixel. This filter reduces speckles, but makes the sampling method irreversibly biased. We use a simple post-processing filter to remove speckles. We compute an unbiased (progressive) ERPT image, <strong>and</strong> remove speckles if necessary. For each pixel, the filter works on a region of nearby pixels 2 . First, we compute the color intensity average <strong>and</strong> variance within the region. If the distance between the pixel’s intensity <strong>and</strong> the region’s average is at least twice the region’s variance, the pixel belongs to a speckle <strong>and</strong> is ignored. Instead, the region’s average color is used. 9.3 GPU ERPT 9.3.1 Overview In this section, we start with a short overview of our GPU ERPT implementation. The ERPT implementation is an extension of the TPPT implementation from chapter 7. Besides path tracing, an ERPT sampler also performs energy redistribution. Whenever a sampler finds a light transport path during path tracing, its energy is redistributed using a multiple of 32 mutation chains running in parallel. ERPT samplers are run in groups of 32 samplers. Each group maps to one GPU warp. During path tracing, each thread runs its own sampler, similar to the TPPT implementation. However, during energy redistribution, all threads in a warp work together on a single sampler from the sampler group, all other samplers in the group are temporarily suspended until energy redistribution for the one sampler is complete. 2 The region size depends on the maximum speckle size we want to remove. We used a region of 3 × 3 pixels around each pixel. 103