Cutter
Pre-baked Ribs


return to main index


links
maya pre-baked ribs
freeze transforms



i n t r o d u c t i o n
Before attempting to produce a pre-baked RIB (ie. an archive) with Maya it is useful to gain an understanding of what such RIB files are and how they are referenced by another RIB document. This tutorial assumes you are using the Cutter text editor.



w h a t    i s    a n    a r c h i v e ?
An archive, or pre-baked, RIB is similiar to a "regular" file except that it does not contain any camera statements or the statements WorldBegin & WorldEnd. Often an archive also omits shading and lighting statements as well. Generally, archive files only contain the data relating to the geometry of an object. In Maya, using Pixar's plugin mtor, a model can be exported as an archive RIB file using a "Slim archiver appearance".

For the purpose of this tutorial a regular RIB file has been converted into an archive as a result of removing all the text from the beginning of the RIB file down to the first occurance of the statement TransformBegin. The "tail" of the RIB file has also had its concluding WorldEnd statment removed. After inserting AttributeBegin at the head and AttributeEnd at the tail of the document we have effectively created an archive RIB file.

The original RIB and the converted archive can be viewed here and here. The RIB file [view here] that imports the archive does so using a ReadArchive statement.

TransformBegin
    Translate -1 0 0    
    ReadArchive "archive.rib"
TransformEnd
TransformBegin        
    Translate 0 0 0    
    ReadArchive "archive.rib"
TransformEnd
TransformBegin        
    Translate 1 0 0    
    ReadArchive "archive.rib"
TransformEnd

original

figure 1 - original model



3

figure 2 - archive read 3 times



regular rib - text to remove in red

Display "untitled" "framebuffer" "rgb"
Format 427 240 1
Projection "perspective" "fov" 40
ShadingRate 1
LightSource "distantlight" 1 "intensity" 1.5 
            "from" [0 0 0] "to" [0 0 1]
Translate  0 -1  5
Rotate -30 1  0  0
Scale      1  1 -1
WorldBegin
    ReverseOrientation

    Surface "plastic"
    TransformBegin
        Rotate -90 1 0 0
        Cylinder 0.2 0 2 360
    TransformEnd
    TransformBegin
        Translate 0 2 0
        Rotate -90 1 0 0
        Cone 0.5 1 360
    TransformEnd
WorldEnd

archive rib - added text in blue

AttributeBegin
    TransformBegin
        Rotate -90 1 0 0
        Cylinder 0.2 0 2 360
    TransformEnd
    TransformBegin
        Translate 0 2 0
        Rotate -90 1 0 0
        Cone 0.5 1 360
    TransformEnd
AttributeEnd

Although the archive (pre-baked) rib shown above is trivial, it does conform to the format of a correctly structured file. Apart from being much more complicated, archives generated by professional 3D applications such as Maya/mtor or Houdini follow the same format. They also include commented text at the head of their archive files.







© 2002-5 Malcolm Kesson. All rights reserved.