![]() Together, this provides enough information for a blurred lookup into the brick map. Where theta is the cone angle of the reflection, h is the hit distance projected onto the reflection vector and s is the number of tracing samples. The equation looks like this: Filter radius = sqrt(h*tan(theta)/s) ![]() For this a small bit of mathematics must be done. We use the point and normal to index into the brick map, using the ray info to calculate the filter width. However, instead of evaluating the reflected object’s shader, we query the impact position and normal, as well as the length and direction of the ray. So for our blurred reflection shader, we find the reflection direction and cast reflection rays along it using standard ray tracing techniques (SL’s gather construct). But for someone conversant in RenderMan shader authoring, the details below should be enough to implement the technique. The construction of this shader is beyond the scope of this production example. But, instead of evaluating the shader at the hit surface, it looks up our illumination data from the brick map. Once we have our brick map, we need to develop a shader that ray traces reflections. This pre-pass creates a point cloud with radiance data, which is then processed into a brick map using the brickmake utility. This is an obvious necessity, as first bounce reflections could easily find faces that are backfacing or hidden to the final render camera. Also remember that backface, and hidden, culling must be turned off in the radiance pre-pass. ![]() Remember that RenderMan culls everything off-screen, so if you have objects reflecting from outside your final camera, the reference camera needs to be pulled back to see them. For more information on brick maps, see brick map fundamentalsĪs the brick map generation requires a pre-pass, we first need to set up a reference camera. If the arbitrary data you write into this 3d structure is surface illumination color (radiance), then you have a multi-resolution version of your shaded, lit object. How do brick maps fit into the equation? First, remember what a brick map is: a cache of data written into a multi-resolution 3d voxel structure (like a MIP mapped texture, but in 3d). Essentially, you are taking the full, high-resolution geometry then sampling it many times to make it appear LESS high-resolution (i.e. Anyone who has ray traced reflections before knows that glossy, blurred reflections are expensive due to the number of sampling rays required to smoothly blur the ‘high-frequency’ details in reflections. ![]()
0 Comments
Leave a Reply. |