Short Contents

7.8 Multi-Camera Rendering

3Delight is able to render many camera views in a single run. This feature is commonly called multi-camera rendering and is particularly useful for stereo rendering: both the left and right eye are rendered at once. Rendering many views at once can save a substantial amount of time. The main performance gains come from:

  1. Scene loading is performed only once for all camera views. The gains in this case are significant for large scenes.
  2. Shading is performed only once (in the case of the REYES hider).

7.8.1 Semantics

Multi-camera rendering is enabled by specifying a camera name, previously declared by RiCamera, to the RiDisplay command. Follows a RIB snippet to illustrate this:

FrameBegin
  Projection "perspective" "fov" [60]

  TransformBegin
    # Translate to the left.
    Translate -3 0 0
    Camera "right_eye"
  TransformEnd

  Display "left_eye.tif" "tiff" "rgba"
  Display "+right_eye.tif" "tiff" "rgba" "string camera" ["right_eye"]

  WorldBegin
    ...
  WorldEnd
FrameEnd
Listing 7.12: Example of multi-camera usage.

7.8.2 Limitations

The main limitation of the multi-camera rendering feature is the fast that shading only occurs once(55). This makes the render faster but since the shader is invoked only once all view dependent computations such as specular highlights will be incorrect. To invoque the shader once per camera it is necessary to use a special attribute:

Attribute "shade" "viewdependent" [1]

This will fix the view dependent shading problem mentioned above but will be slower because shading is performed more often. When rendering effects such as occlusion (which is not view dependent) this option should be set to 0.

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