Cornell Box: First Results for Pixar’s RenderMan

13 Apr 2015

One of the most basic scenes for Global Illumination (GI) is the Cornell Box. In the download section I provide the scene for several renderers:

But here I want to focus on Pixar's last release of RenderMan (PRMan). You can download a free version of the renderer for non-commercial usage. Pixar's scene description is called RIB (RenderMan Interface Bytestream Protocol). If you download the Cornell Box RIB file and render it with PRMan your resulting image should look like this:

Cornell Box rendered by RenderMan.

For convenience the file is also available from Pixar's Community Resources. I will only point out the details about RIB lines which are new or specific to the latest PRMan release:

...
Hider "raytrace" 
  "constant string integrationmode" ["path"]
  "constant int incremental" [1]
  "int minsamples" [32]
  "int maxsamples" [1032]
Integrator "PxrVCM" "PxrVCM"
  "int maxPathLength" [10]
  "int mergePaths" [1]
  "int connectPaths" [1]
...
WorldBegin
  Attribute "identifier" "name" "Light"
  AttributeBegin
    ...
    AreaLightSource "PxrAreaLight"
      "Light" "string shape" ["rect"]
      "float intensity" [50]
    Bxdf "PxrLightEmission" "Light"
    ...
  AttributeEnd
    ...
    Bxdf "PxrLMDiffuse" "box_Material" "color frontColor" [0.5 0.5 0.5]
    PointsPolygons
    ...
    Bxdf "PxrLMDiffuse" "box_Material" "color frontColor" [0.5 0.5 0.5]
    PointsPolygons
    ...
    Bxdf "PxrLMDiffuse" "cbox_Material0" "color frontColor" [0.4 0.4 0.4]
    PointsPolygons
    ...
    Bxdf "PxrLMDiffuse" "cbox_red1" "color frontColor" [0.5 0.0 0.0]
    PointsPolygons
    ...
    Bxdf "PxrLMDiffuse" "cbox_green2" "color frontColor" [0.0 0.5 0.0]
    PointsPolygons
    ...
WorldEnd

For RIS we need to use the Raytrace Hider with path-tracing. In theory we have the choice between unidirectional and bidirectional path tracing, but in this case we have chosen the bidirectional version by specifiying PxrVCM as our integrator. The remaining RIB file lines are pretty much standard, except the Surface shader lines got replaced by Bxdf material lines. For the Cornell Box we only need diffuse materials which are explained in the LMDiffuse RenderMan 19 Documentation. The one and only light source in the scene is an area light using the PxrAreaLight shader.

Before you start to render your own version of the image above you should set an environment variable called $RMANTREE:

setenv RMANTREE /Applications/Pixar/RenderManProServer-19.0

The syntax above is for tcsh, for bash use the following:

export RMANTREE=/Applications/Pixar/RenderManProServer-19.0

To render use the following command line:

$RMANTREE/bin/prman -progress cornell_box.rib

We will see other scenes later using unidirectional path tracing. I modified the multi_exporter Python script for Blender to use the new PRMan shaders and materials.