This page demonstrates the basics of scripting shapes RenderMan scene
description (rib) protocol. Writing rib files by hand focuses attention on the
use of color, opacity and the fundamental concepts related to xyz coordinate system.

The preliminary renders have been done using basic shading so
that the geometry can be more easily seen.

Basic Lighting And Materials

 

 

I was able to build the entire fire hydrant out of basic Quadrics in Cutter. I first built the basic cylinder with caps, and the cube. I then saved out those shapes out as .rib files and was able to ReadArchive them back in. Through Translating, Rotating and Scaling I was able to get the fire hydrant. For instance:

AttributeBegin

            ReadArchive "cilinder.rib"
 AttributeEnd
Surface + Displacements + Basic Lighting

 

 

I used Displacement to get the casting bumps, the bumps in the dirt, and to rough up the bricks just a bit. For the Dirt which is the most extreme displacement used this code.

Displacement "emboss" "texname" ["dirtdisp.tex"] "Km" 0.8

Textures

 

 

I made several textures in Adobe Photoshop. Then converted them into .tex files in cutter using this piece of code

# txmake -mode periodic ../tiffs/brick.tif ../textures/brick.tex

It is commented out to prevent renderman from reading it. Then I was able to apply the textures in the .rib file using the combo shader.

Surface "combo"
                "Ks" 0.70
                "Kd" 0.50
                "Ka" 1.0
                "roughness" 0.10
                "specularcolor" [1.0 1.0 1.0]
                "texname" ["red.tex"]
Arrangement I

 

 

Now I will show how I arranged the Hydrants to form
a better composition. By using the archive method I was able to make 
changes on the fly with out having to go back and remodel the object.

The Code looks like this

    AttributeBegin
        Translate 0 20 0
        ReadArchive "hydro.rib"
    AttributeEnd
  
    AttributeBegin
        Rotate 45 1 0 1
        Translate 0 20 0
        ReadArchive "hydro.rib"
    AttributeEnd
  
    AttributeBegin
        Rotate 90 1 0 1
        Translate 0 20 0
        ReadArchive "hydro.rib"
    AttributeEnd
  
    AttributeBegin
        Rotate 135 1 0 1
        Translate 0 20 0
        ReadArchive "hydro.rib"
    AttributeEnd

And so on until a circle is achieved.

 

Arrangement II
I then rotated the spheres and commented the Hydrants I didn't want out.
      Like this:
#    AttributeBegin
    #    Translate 0 20 0
    #    ReadArchive "hydro.rib"
#    AttributeEnd
  
    AttributeBegin
        Rotate 45 1 0 1
        Translate 0 20 0
        ReadArchive "hydro.rib"
    AttributeEnd
  
    AttributeBegin
        Rotate 90 1 0 1
        Translate 0 20 0
        ReadArchive "hydro.rib"
    AttributeEnd
  
    AttributeBegin
        Rotate 135 1 0 1
        Translate 0 20 0
        ReadArchive "hydro.rib"
    AttributeEnd
  
    #AttributeBegin
    #    Rotate 180 1 0 1
    #    Translate 0 20 0
    #    ReadArchive "hydro.rib"
#    AttributeEnd
  
    AttributeBegin
        Rotate -45 1 0 1
        Translate 0 20 0
        ReadArchive "hydro.rib"
    AttributeEnd

Three Circles where made and the overlaps where commented out.
Lighting

Three Lights where added one white ambient light, and two colored Distant Shadow lights.

TransformBegin
        LightSource "pointlight" 1 "intensity" 25 "from" [1 4 1]
    TransformEnd
    TransformBegin
        LightSource "shadowdistant" 4
            "intensity" 1.0
            "lightcolor" [0.0 0.658 1.0]
            "from" [1 4 1]
            "to" [0.0 0.0 1.0]
            "shadowname" ["raytrace"]
            "samples" 16.0
            "width" 1.0
    TransformEnd
    TransformBegin
        LightSource "shadowdistant" 4
            "intensity" 2.0
            "lightcolor" [1.0 0.450 0.0]
            "from" [1 -4 1]
            "to" [0.0 0.0 1.0]
    TransformEnd
    TransformBegin
        LightSource "ambientlight" 2
            "intensity" .2
            "lightcolor" [1 1 1]
Arrangement III +Depth Of Field + Atmosphere Fog + Motion Blur

The spheres where Placed in order to get a better composition. Then I added depth of field to the composition with this short code:

DepthOfField 10 2 200

Then I added Atmosphere fog to make the Spheres in the back fade away.

 Atmosphere "fog"
         "distance" 2150.0 
         "background" [0.0 0.0 0.0]

In order to give the close sphere some movement I gave it Motion Blur with these two Pieces of code. Inside the AttributeBegin and the AttributeEnd of the close sphere I added:

MotionBegin[0 1]
            Rotate 0 0 1 0
            Rotate .4 0 1 0
        MotionEnd

and before the world begin I added:

Shutter 0 1

Hierarchy Table

This table shows how the main .rib file was able to reference the other .rib files. Anything changes in the lower level files on the right will automatically update on the higher files to the right. To look at the code click on the file name.

Final Composition

Home