RixProjection

RixProjection

Overview

PRMan 19 introduced a new, RIS-only projection plugin API that opens up the renderer to allow users to create their own projections. The interface for it can be found in include/RixProjection.h. Two sample plugins can be found in $RMANTREE/lib/examples/RIS/plugins/simple/PxrLightProbe.cpp and PxrRollingShutter.cpp.

images/rollingShutter.png

Rolling Shutter

The RiProjection call has been extended to allow plugins. If the name of the requested projection doesn't match any of the built-in ones, then it searches the plugin path for a matching projection plugin to load. Parameters in the RIB file can be passed to it in the usual way through the RiProjection call.

As with the new built-in projections, the more general dicing strategies are recommended for plugins that produce significantly distorted views, e.g.:

Attribute "dice" "int rasterorient" [0]
                 "string strategy" ["sphericalprojection"]
                 "string offscreenstrategy" ["sphericalprojection"]

About Projection Plugins

RixProjection plugins characterize camera and lens projections. They are responsible for turning stratified random samples into rays. These are then traced as the primary camera rays and passed along with any hits to the RixIntegrator. The main job of the plugin is to implement the Project() method.

Note that if your RIB defines an RiProjection using one of the built-in projections before a plugin RiProjection, the built-in one will be applied first. This means that your plugin may act more as a filter over the built-in projection rather than a totally new one. For example, you may choose to alter the time samples to achieve special shutter effects while leaving the ray positions alone.

Projection "perspective" "fov" [30]
Projection "simple/PxrRollingShutter" "float angle" [90]

In this example, the projection plugin will modify the motion blur, but the view will be that of the normal perspective with a 30 degree FOV.

As mentioned above, the full API is documented in include/RixProjection.h.

  • Note:

    Projections may interact poorly with the standard frustum-oriented dicing strategies. As a result, we recommend using a spherical projection raster-oriented dicing strategy.