Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This documentation is intended to instruct developers in the authoring of custom projections. Developers should also consult the RixProjection.h header file for complete details. The source code for the PxrOrthographic and PxrPerspective projection plugins may be found in the plugins/projection/simple subdirectory of the PixarRenderMan-Examples package.

A projection plugin is used to model camera and lens behavior. These plugins are responsible for taking stratified random samples as input from the renderer and turning these into primary camera rays.

RixProjectionFactory

RixProjectionFactory is a subclass of RixShadingPlugin, and therefore shares the same initialization, synchronization, and parameter table logic as other shading plugins. Projections do not support lightweight instances, and therefore CreateInstanceData() should not be overridden as any created instance data will not be returned to the factory.

The renderer uses the RixProjectionFactory object by invoking RixBxdfFactory::CreateProjection()  to obtain a  RixProjection. A description of various options associated with the current render are provided to the factory via the RixProjectionEnvironment &env. This class includes information about the current format (the width and height of the image in pixels and the pixel aspect ratio), the screen window, the shutter time values, the near and far clipping planes, and the world to camera transform. Developers are expected to use this information, along with the arguments supplied to the plugin via the RixParameterList pList, to create an instance of RixProjection that encapsulates the information necessary to model the desired camera and lens behavior.

...