Renderman
Constructive Solid Geometry with Renderman Booleans
Constructive Solid Geometry (CSG) is a modeling technique that forms
a complex object by operating on two or more simple objects. To
demonstrate CSG, let's start with a simple model of a cube that is
partially intersected by a sphere:
There are three types of "Boolean" operations we can perform on
the two objects:
- Union
- Difference
- Intersection
For modeling purposes, Union creates a single solid object by
combining one or more simple objects. Difference creates an object by
subtracting the area of one object from another object. Intersection
creates a solid object in the common areas of two or more
objects.
If we specify a difference operation to subtract the sphere area from
the cube, here is the result:
There are two ways to perform Boolean operations in the VIDI system.
Both methods have advantages and disadvantages:
Modeler Booleans
The Modeler tools for CSG (Punch
and Boolean
) modify the geometry of the objects immediately.
The resulting object can be viewed and worked with in Modeler, it
works with all of the rendering engines, and can be exported.
There are a couple of disadvantages to the Modeler technique: the
complexity of the model is increased, and the parametric surfaces are
converted to polygon meshes. The model will be larger, and, in rare
cases, there might be some loss of smoothness.
Renderman Booleans
The Renderman Boolean method does not show the result of the
operation until the final rendering, and it only works with
Renderman. But Renderman CSG has a couple of advantages: the
parametric surfaces are preserved, and the CSG operation can be
animated using the Renderman controls in Presenter.
(Netscape and Microsoft Internet Explorer users can view an
animated GIF showing what happens when
sphere passes through the cube with the Renderman Difference
operation).
How to setup the Renderman CSG model
This tutorial will demonstrate how to setup the cube and sphere
example shown above.
Modeler Steps
- Create a new folder. For this demonstration, set the folder
title to "csg 1".
- Inside the "csg 1" folder, place a
cube object.
- Also inside "csg 1" folder, place a
sphere that intersects the cube.
- Verify that the objects and folder in the Groups window looks
something like this, then save the model.

Presenter Steps
- Apply the Plastic shader to the "csg 1" folder. Double-click
the Plastic shader icon to set the shader attributes, then click
the "Shader Esoterica" button. Click the "Solid Object" checkbox
on and set the popup menu to "Difference".
- Apply the Plastic shader to the cube object. Double-click the
Plastic shader icon to set the shader attributes, then click the
"Shader Esoterica" button. Click the "Solid Operation" checkbox on
and set the popup menu to "Union".
- Apply the Plastic shader to the sphere object. Double-click
the Plastic shader icon to set the shader attributes, then click
the "Shader Esoterica" button. Click the "Solid Object" checkbox
on and set the popup menu to "Union".
- Render the scene (using Renderman, of course). If everything
works correctly, you should reproduce the CSG effect.
This example was very simple, but it is possible to create more
complex results with additional objects in the folder, and placing
folders within folders. The basic rules are:
- The main Boolean operation is specified in the folder
enclosing the objects.
- The first object in the folder is the main object, and
subsequent objects in the folder will operate against that first
object.
Typically, I set the Difference operation for the folder, then set
the Union operation for each of the objects in the folder. This may
seem redundant, but it is important for certain situations. In
particular, the cube object
is not a
primitive in Renderman, so the Union operation is necessary to make
it a solid object.
Copyright © 1997 by
WebNation
All trademarks are the property of their respective holders