Chapter 7 Geometric transformations and hierarchical modeling

Previous chapters looked at modeling primitives (Chpt. 4: quadrics, Chpt. 5: polygons, and Chpt. 6: parametric patches) which are combined by hierarchical modeling methods into more complex objects.

Definitions: An object is a group of geometric primitives. A primitive object is a single primitive and an aggregate object contains more than one primitive.

Renderman's block structure supports hierarchical modeling. For example:

RiAttribute begin ... end => all objects have the same set of attributes.
RiTransform begin -- end => all objects have the same set of transforms.

You can have nested blocks to support model hierarchy. You can think of it as an object tree. The root is the entire scene being described: RiWorld Begin ... End Note: This can't be nested since there is only one world.

The modeling transformation has the concept of a Current Transformation (CT). Then:

RiTransform Begin -> saves a copy of CT
RiTransform End -> restores CT

So this allows hierarchical modeling for transformations. The CT is like a stack in that the last declared transformation is the first applied transformation.

Modeling transformations

The default Renderman coordinate system is left handed but can be set by the command: RiOrientation (orientation) where orientation is "lh" for left handed and "rh" for right handed. This can be changed in the program so some objects may be defined in a left handed coordinate system and some in a right handed coordinate system. Note that the following transformations continue to affect all declared objects in the attribute block, unless a new value is declared.

Translation: RiTranslate (dx, dy, dz)
The objects are moved by dx, dy, dz.

Rotation: RiRotate ( q, dx, dy, dz )
The objects are rotated by an angle q about the axis from the origin through dx, dy, dz.

Scale: RiScale (sx, sy, sz)
The objects are scaled by sx, sy, sz.

Skew: RiSkew(q,dx1,dy1,dz1,dx2,dy2,dz2)
Transforms points in the world by an angle q between two orthogonal direction vectors V1(dx1,dy1,dz1) and V2(dx2,dy2,dz2).

Perspective: RiPerspective(fov)
Create perspective image with a field of view fov.

(usually done in camera but can also be done here)

Can create special transformation by Riconcat transform

Can write an arbitrary deformation as a shader then call by RiDeformation ( shader name, Parameters)

Renderman allows users to declare surface as 1 -sided or 2 -sided: Risides (1 or 2)

A 1-sided surface is visible only on the outside so can perform a back face cull. You must define the surface correctly so Renderman knows what is " outside", i.e., the normal faces outside. So for a surface defined as polygon mesh, define the polygons vertices counter clockwise for a right handed coordinate system and clockwise for a left handed coordinate system.

There are 5 named coordinate systems in Renderman.

object space --> Coordinate system in which object is defined
world space --> Coordinate system in effect after Riworld Begin
camera space (Viewing Coordinate System) --> Left handed by default
screen space (Normalized Device Coordinates) --> image plane after perspective projection with X, Y in range +1, - 1
raster space (Physical Device Coordinates) --> image being rendered in pixels with 0, 0 at top left

Constructive Solid Geometry (CSG)

Objects can be defined as boolean combinations of other objects. Renderman uses Boundary reprsentation to define a solid as a set of surfaces that completely encloses a space. There should be no way to get inside a solid without passing through a surface.

Renderman defines solids by:
Ri Solid Begin ( type )
Ri Solid End

The type can be Ri_Primitive which forms a solid CSG object from a set of surface primitives. This can be used to create a solid from other partial solids.

Examples:

7 -- 1 Close bowling pin with disks

intersection (and): points in common
union (or): points in either
7 -- 2 for example of union, intersection

difference: points in one object minus the points in the other object)
7 -- 3 for example of difference -- bowling ball is sphere minus pins

Object Instancing

We may have one object and many instances of the object and we don't want to completely redefine the object each time. Also, for animation, most of scene may be unchanged. So use a retained model to store. Instances have can have a different color or geometry, but no transformation, and only 1 type of primitive or surface, eg. quadric. polygon mesh, or patch.

RiObject Handle RiObject Begin
RiObject End

All declarations inside this block defines the retained model, which is referred to by RiObject Handle. Note: this only valid within a frame or world so create the object before RiFrame Begin then is is valid for all. However, after -- only for that frame (same for Riworld Begion - End ) hen create instance of object by RiObjectInstance (handle ) Note : CT & attributes are assigned during instancing, notdefinition

Ex. 7 -- 4 for placing bowling pins


Go back to previous screen
HyperGraph Table of Contents.
HyperGraph Home page.

Last changed February 09, 1997, G. Scott Owen, owen@siggraph.org