Short Contents

7.12 Dicing Cameras

As we already know, 3Delight renders geometry by tessellating it into micro-polygons. This way of doing things makes running displacement shaders straightforward and efficient. One potential problem might arise though: when rendering sequences with a moving camera, the renderer might tessellate the geometry slightly differently from frame to frame, leading to displacement shaders to react differently between frames and this in turn may lead to pops in static geometry. This usually happens in displacement shaders that have a high perturbation frequency. Although this problem can be solved using lower shading rates and proper anti-aliasing it is often easier to use a dicing camera.
A dicing camera is a camera that is declared along with the main camera and is usually static in the animation sequence, so that objects are always tessellated the same way from frame to frame. One can declare such a camera using the RiCamera command:

Display "example.tif" "tiff" "rgb"

Format 640 480 1
Projection "perspective" "fov" 60
Translate 0 0 5

TransformBegin
  Translate 0 0 100
  Camera "faraway"
TransformEnd

WorldBegin
  Translate 0 -1.5 0
  Rotate -90 1 0 0
  Attribute "dice" "referencecamera" "faraway"
  Geometry "teapot"
WorldEnd
Listing 7.13: Declaring and using a dicing camera.

In this example, a teapot is diced using a camera named "faraway" that has been placed very far (see dice-referencecamera). So rendering the image will produce a teapot with very rough tessellation. A few notes:

IMPORTANT

Before integrating dicing cameras into your pipeline, make sure the problem has been correctly identified. Dicing cameras will make your pipeline slightly more complicated and many problematic displacement shaders can be healed by proper programming.

3Delight 10.0. Copyright 2000-2011 The 3Delight Team. All Rights Reserved.