Dylan Lacewell1,2 Brent Burley1 Solomon Boulos3 Peter Shirley4
1Walt Disney Animation Studios 2University of Utah 3Stanford University 4NVIDIA Corporation
Figure 1: Computing shadows using a prefiltered BVH is more efficient than using an ordinary BVH. (a) Using an ordinary BVH with 4 shadow rays per shading point requires 112 seconds for shadow rays, and produces significant visible noise. (b) Using a prefiltered BVH with 9 shadow rays requires 74 seconds, and visible noise is decreased. (c) Reducing noise to a similar level with an ordinary BVH requires 25 shadow rays and 704 seconds (about 9.5 times slower). All images use 5 x 5 samples per pixel. The scene consists of about 2M triangles, each of which is semi-opaque (alpha=0.85) to shadow rays.
Abstract:
We prefilter occlusion of aggregate geometry, e.g., foliage or hair, storing local occlusion as a directional opacity in each node of a bounding volume hierarchy (BVH). During intersection, we terminate rays early at BVH nodes based on ray differential, and composite the stored opacities. This makes intersection cost independent of geometric complexity for rays with large differentials, and simultaneously reduces the variance of occlusion estimates. These two algorithmic improvements result in significant performance gains for soft shadows and ambient occlusion. The prefiltered opacity data depends only on geometry, not lights, and can be computed in linear time based on assumptions about the statistics of aggregate geometry.
The definitive version of this paper appeared in the proceedings of the IEEE Syposium on Interactive Raytracing 2008.
@inproceedings{lacewell08prefilter,
author = {Dylan Lacewell and Brent Burley and Solomon Boulos and Peter Shirley},
title = {Raytracing Prefiltered Occlusion for Aggregate Geometry},
booktitle = {IEEE Symposium on Interactive Raytracing 2008},
year = {2008}
}
The following questions and comments came up in response to our presentation at IRT 2008:
Yes, and it appears that the first 9 coefficients are sufficient, 3 of which are always zero due to the order-independence of opacity. The figure below shows a cubemap with 3x3 resolution per face (top) and the corresponding spherical harmonics reconstruction with 6 coefficients (bottom).
We think the DC approach is the sweet spot; even though the ad-hoc approach results in shorter build times, it may require manual adjustment by an artist on a case by case basis.
Yes, we tried this animation test and saw some pulsing in the shadow, although there were no sudden pops. The problem is that as the BVH rotates the boxes change shape to adapt to the geometry, and the overlap of boxes in depth may also change. Bounding spheres would not have this problem, but would probably be slower to raytrace. We haven't thought of a way to solve the problem for axis aligned boxes, and haven't done any other tests yet with dynamic geometry.
Similar methods could be used for an octree or a multi-res grid. These structures might be even faster to prefilter in bottom-up fashion because of their regular organization. Ray intersections with a BVH are usually faster than with octrees or grids for arbitrary scenes, but we have not measured whether a BVH is actually faster for aggregate geometry.
Point-Based Approximate Color Bleeding
Per H. Christensen
Pixar Technical Memo #08-01
(available at graphics.pixar.com)
Using Annotated KD-Trees to Accelerate Shadow Ray Queries
Peter Djeu and Stan Volchenok
The University of Texas at Austin, Department of Computer Sciences
Technical Report TR-08-36, August 30, 2008
[Project Page]
updated 11/11/2010