RIB Commands


Latest update: March 30, 2011
Declare "variablename" "type"Declare a variable's type (e.g., "uniform float")
Display "outputimage.tiff" "tiff" "rgb" Specify the output image
Display "outputimage.shd" "shadow" "z" Specify the output shadow image
Imager "background" "color" [r g b] Specify the output image's background color
Clipping znear zfar Specify the near and far clipping planes (>0)
Format 1280 1024 1.0 Specify the resolution of the output image
PixelSamples 2 2 Number of imaging samples in X and Y per pixel
Projection "perspective" "fov" 60. Specify to use a perspective projection and its field-of-view angle
Projection "orthographic" Specify to use an orthographics projection
ScreenWindow xleft xright ybottom ytop Use in place of the field of view angle
Translate tx ty tz Pre-append a translation matrix
Rotate deg rx ry rz Pre-append a rotation matrix
Scale sx sy sz Pre-append a scaling matrix
WorldBegin Start the scene definition
WorldEnd End the scene definition
AttributeBegin Push all atributes on the stack
AttributeEnd Pop all attributes from the stack
TransformBegin Push the current transform on the stack
TransformEnd Pop the current transform from the stack
Color [r g b] Set the current color (passed to shaders as Cs)
Opacity [r g b] Set the current opacity (passed to shaders as Os)
Surface "shadername" "variablename" [variablevale(s)] Specify a surface shader
Displacement "shadername" "variablename" [variablevale(s)] Specify a displacement shader
LightSource "ambientlight" num "intensity" i "lightcolor" [r g b] Specify the ambient light
LightSource "distantlight" num "intensity" I "lightcolor" [r g b] "from" [x y z] "to" [x y z] Specify a distant (parallel) light
Polygon "P" [x0 y0 z0 x1 y1 z1 . . .] "st" [s0 t0 s1 t1 . . .] Draw a polygon
Points "P" [x0 y0 z0 x1 y1 z1 . . .] "constantwidth" w Draw a series of points
Points "P" [x0 y0 z0 x1 y1 z1 . . .] "width" [w0 w1 . . .] Draw a series of points
Sphere radius zmin zmax sweepAngle Draw a sphere
Cylinder radius zmin zmax sweepAngle Draw a cylinder
Cone height radius sweepDegrees Draw a cone
Torus majorRadius minorRadius startAngle endAngle sweepAngle Draw a torus
Hyperboloid x0 y0 z0 x1 y1 z1 sweep_Angle Draw a hyperboloid
Paraboloid zmaxRadius zmin zmax sweepAngle Draw a paraboloid
Disk xHeight radius sweepAngle Draw a disk
Basis "Bezier" 3 Set the basis for a parametric curve
Curves "cubic" [4] "nonperiodic" "P" [x0 y0 z0 x1 y1 z1 . . .] "constantwidth" [w] Draw a parametric curve
Patch "bilinear" "P" [x0 y0 z0 x1 y1 z1 x2 y2 z2 x3 y3 z3] Draw a bilinear surface
Basis "Bezier" 3 "Bezier" 3 Set the basis for a parametric surface
Patch "bicubic" "P" [x00 y00 z00 x01 y01 z01 ... x33 y33 z33] Draw a parametric surface
SolidBegin "operation" Begin collection geometry for a CSG operation (union, intersection, difference)
SolidBegin "primitive" Begin defining geometry for a single CSG primitive
SolidEnd End a primitive definition or an operator collection