Rib
|
Display "jack" "framebuffer" "rgb" Projection "perspective" "fov" 40 Format 320 240 1 Translate 0 0 3 Rotate 0 1 0 0 Rotate 90 0 1 0 Scale 1 1 -1 WorldBegin TransformBegin Cylinder 0.05 -0.5 0.5 360 Translate 0 0 -0.5 Sphere 0.15 -0.15 0.15 360 Translate 0 0 1 Sphere 0.15 -0.15 0.15 360 TransformEnd WorldEnd |
Objects used in a 3D scene are normally modeled with software such as Maya and Houdini. However, simple objects and scenes can be implemented by directly scripting them in a rib file. Although writing a rib file with a text editor can be somewhat confusing a great deal can be learned about coordinate systems, the grouping mechanisms of RenderMan and about the role that a variety of attributes play in the process of rendering a scene. It is highly recommended that anyone intending to fully exploit the benefits of using RenderMan with applications such as Maya and Houdini should devout time to crafting rib files with a text editor. This tutorial outlines the process of modeling the "jack" shown in figure 1. It also shows how the "jack" can be rotated so that it rests on a horizontal surface - figure 2.
|
|
The first thing to notice about the "jack" is that it can be created by duplicating two copies of the bar, shown in figure 3. |
|
Inserting color coded coordinate axes using the Rman Tools->Utilities manu. |
The duplicates will be identical except for the rotations required to align
them with the 'Y' and the 'X' axis. Copying and pasting the transform block
from listing 1 and adding the necessay 90 degree rotations results in the
sequence of rib statements shown in listing 2. The rib statements were saved
as an archive rib file, also known as a pre-baked rib.
Note the archive file does not contain camera information, nor does it
contain the statements Listing 2 - jack.rib (archive or pre-baked rib file)
Referencing the pre-baked rib file with Listing 3
|
Orienting the JackThe images shown below illustrate the effect of applying the following transformations to the archive. Remember the transformations are applied in reverse order. Translate 0 0.15 0 # 4th transformation Rotate 54.73 1 0 0 # 3rd transformation Rotate 45 0 1 0 # 2nd transformation Translate 0 0.5 0 # 1st transformation ReadArchive "jack.rib" |
|
|
|
|||
|
|
|
© 2002- Malcolm Kesson. All rights reserved.