RIB Project

This browser cannot play the embedded video file.

RenderMan Scene Description Language

The goal of this assignment is to know and practice the basic of RenderMan Scene Description Language.

The following scene are created using Professor Malcolm Kesson's Cutter text editor.

image.0037

Polygon Plane

This is the basic shape in the scene, a cube made of four Polygon Plane. There's also a shader called "outside red" to help determine the normal orientation of each faces.

This browser cannot play the embedded video file.

    TransformBegin #lower
            Rotate 180 1 0 0
            Polygon "P" [-0.5 0 -0.5  -0.5 0 0.5  0.5 0 0.5  0.5 0 -0.5]
                    "st" [0 0  0 1  1 1  1 0]
    TransformEnd
        
    TransformBegin #right
            Translate 0.5 0.5 0
            Rotate 90 0 0 1
            Rotate 180 1 0 0
            Polygon "P" [-0.5 0 -0.5  -0.5 0 0.5  0.5 0 0.5  0.5 0 -0.5]
                    "st" [0 0  0 1  1 1  1 0]
    TransformEnd
        
    TransformBegin #left
            Translate -0.5 0.5 0
            Rotate 90 0 0 1
            Polygon "P" [-0.5 0 -0.5  -0.5 0 0.5  0.5 0 0.5  0.5 0 -0.5]
                    "st" [0 0  0 1  1 1  1 0]
    TransformEnd
        
    TransformBegin #top
            Translate 0 1 0
            Polygon "P" [-0.5 0 -0.5  -0.5 0 0.5  0.5 0 0.5  0.5 0 -0.5]
                    "st" [0 0  0 1  1 1  1 0]
    TransformEnd

This browser cannot play the embedded video file.

Occlusion Pass of the 3-D scene

WorldBegin
    Attribute "visibility" "trace" [1]
    Attribute "visibility" "int transmission" [1] # or [0]
    Attribute "shade" "transmissionhitmode" "primitive" # or, "shader" 
image.0004

Depth of Field can be assigned to the camera using the following statement:

DepthOfField     5.6     1         10
#                f-stop            focal-dist.
image.0021

Diffuse

image.0020

Specular

image.0022

Normal

image.0023

ST (UV)

To add AOV (additional output variables) channel to the output, we can declare new output channels in the beginning part of RIB file. Notice that some AOV channel, such as tex, can be output using only display command.


Option "user" "string pass_class" ["Final"]
Option "searchpath" "shader"  "@:../shaders"
Option "searchpath" "texture" "@:../textures"
Option "searchpath" "archive" "../archives:Cutter_Help/templates/Rib:custom_templates/Rib"
DisplayChannel "normal N" #normal channel
DisplayChannel "color _specular"
DisplayChannel "color _diffuse"
  
PixelSamples 9 9
  
Display "untitled" "it" "rgba"
Display "+untitled.specular.tif" "it" "_specular"
Display "+untitled.diffuse.tif" "it" "_diffuse"
Display "+untitled.N.tif" "it" "N"
Display "+untitled.tex.tif" "it" "s"
image.0001

The final rendering

Final Thought

When I first heard of the idea of building a 3-D scene using only a text editor, it sounds very difficult to me. But after learning the structure of RenderMan Scene Description Language(RSL), and with help from the text editor Cutter, I was able to create a 3-D scene that has lighting, shader and animation. 

© Ziye Liu,  2012