RenderMan

Lego Bricks Simulation

The basic aim of this project was to create a still image of a pile of Lego Bricks. The brick model and rigid body simulations were completed in Maya as well as a MEL script to export the simulation data to a RIB file for rendering.

The main RIB file utilised the RenderMan ReadArchive procedure to load the single brick model RIB file. The RIB code below highlights the use of ReadArchive.

# bricksMain.rib
...
(Standard RIB header information goes here)
...

  AttributeBegin
    ConcatTransform [0.713433622 ... ]
    ReadArchive "brick1.rib"
  AttributeEnd

  AttributeBegin
    ConcatTransform [0.788105459 ... ]
    ReadArchive "brick1.rib"
  AttributeEnd

  ...
WorldEnd

brick1.rib contains the geometry information for a single brick without the standard RIB file header information. The image accessed from the link below shows the ambient occlusion pass of the Lego bricks simulation, rendered in RenderMan.

Ambient occlusion pass of Lego bricks simulation

Ambient occlusion pass of Lego bricks simulation:
View large image

The image accessed from the link below shows the final composite of the Lego bricks simulation. Depth of field was simulated by compositing with a Z Depth image of the scene. Texture and specular passes were also rendered out separately to provide finer control within Shake.

Final composite of Lego bricks simulation

Final composite of Lego bricks simulation:
View large image