Overview

RIB Archive is a RIB file that contains all the data needed to render some scene objects. Once these objects are archived, the RIB Archive can completely replace these objects in a scene. Replacing objects by RIB Archives makes the scene lighter and requires less pre-processing time when rendering.

In this page:

Working with RIB Archives is a two step process (both explained below):

  1. Export the objects to a RIB Archive.
  2. Use the exported RIB Archive in a scene.

3Delight for Maya can create a RIB Archive when the Render Mode render attribute is set to 'Export RIB Archive Only' (see Render Engine). The created RIB Archive can be read into any scene by using a RIB Archive Node.

RIB Archives are designed to be included in a Maya scene (or in a regular RIB file). They are not renderable by themselves.

Exporting a RIB Archive


To create a RIB Archive in 3Delight for Maya, simply set the Render Mode rendering attribute to 'Export RIB Archive Only' (see Render Engine). While that's really all there is to it, there are a few aspects worth considering to make the RIB Archive as useful as possible:

  • Change the default Render Pass name to void confusion later with other render passes that will be used for image rendering.
  • Archive a subset of the scene elements. This can be done in various ways, but the simplest is to create a Maya Set that cointans the scene elements to be archived. Then, select this Maya Set in the Object to Render rendering attribute.
  • When archiving static objects, make sure the RIB Filename rendering attribute does not contain a symbol replaced by the current frame number, such as '#' or '@'.
  • When archiving animated objects, the opposite is true : make sure the RIB Filename rendering attribute does contain a symbol met to be replaced by the current frame number, such as '#' or '@'. There are more sophisticated options to specify a frame number; see File Path Expressions for details.

There are several advanced options in the RIB Archives group of rendering attributes panel that you might want to consider. Refer to Advanced: RIB Archives.

Using a RIB Archive


Existing RIB Archive files can be used in a scene using a RIB Archive Node. This is achieved by doing the following:

  1. Create a RIB Archive Node. This can be done using the 3Delight Shelf's Create RIB Archive Node button, or by using the 3Delight > Create RIB Archive Node menu option.
  2. In the Attribute Editor, set the 'RIB Filename' of the newly created RIB Archive Node to refer to the desired RIB Archive file.

Once the archive file is specified, 3Delight for Maya will look at its first few lines for a line specifying the archive bounding box. The bounding box information is always present if the RIB Archive has been created by 3Delight for Maya. When the bounding box dimensions are known, the RIB Archive Node will be drawn as a box of the correct size in the scene viewport and the 'Archive Read Mode' attribute of the RIB Archive Node will automatically be set to 'Delayed'.

Using a RIB Archive not created by 3Delight for Maya

If the desired RIB Archive was not created by 3Delight for Maya, it may lack the bounding box information 3Delight for Maya looks for. Specifically, the plugin looks in the first few lines of the RIB Archive for a line formatted like this:

 # Bounds minX maxX minY maxY minZ maxZ 

This bounding box information is then used to display the RIB Archive Node box in the scene viewport with a correct size. It is also required when the 'Archive Read Mode' is set to 'Delayed'.

If the archive file does not provide the bounding box info, it is possible to enter a bounding box manually, or simply dismiss it and avoid using setting 'Archive Read Mode' to 'Delayed'.

Archiving Scene Elements while Rendering


Render Pass can create RIB Archives (as explained in the Exporting RIB Archive section above) and RIB Archive Nodes can read them (as explained in the Using RIB Archive above). It is possible to have these two components interconnected so that scene elements can be automatically archived when needed; the archived objects are then excluded from the rendering and the archive file is used instead. Here is an example on how to do this:

Grouping the objects to archive

  • Create a subset of the scene elements that will be archived. This can be done in various ways, such as putting these elements in a separate Maya render layer, or more simply, by creating a Maya set that contains the elements to be archived.

Setting up the RIB Archive Node & connecting the render pass to it

  • Create a RIB Archive Node using the 3Delight > Create RIB Archive Node menu item.
  • Rename this node to something more evocative of the objects that will be archived.
  • In the Attribute Editor, click on the checker button on the right of the 'Archive Pass' option menu. This will create a new render pass, set its 'Render Mode' to ‘Export RIB Archive only’, set its 'RIB Filename' to a decent default value (based on the name of the RIB archive Node), and connect it to this RIB archive Node
  • Note that the 'RIB Filename' attribute of the RIB Archive Node is now connected to the created render pass. Also note that the 'Archive Read Mode' is automatically switched to ‘Delayed’. When the connected render pass will be rendered, the bounding box of the archive will be automatically set.
  • Click on the 'AE' button on the right of the 'Archive Pass' option menu to edit the attributes of the connected render pass.

Adjusting the Archiving Render Pass 

  • While this is optional, it is recommended to rename this render pass to avoid confusion with other similar nodes.
  • In the 'Scene Elements' group, adjust the 'Objects to Render' attribute to the the scene subset created at the first step. If a Maya set was created and it contains objects and lights, remember to choose this Maya set in both the 'Objects to Render' and 'Lights to Render' attributes.
  • Configure the other rendering options to your liking. For instance, you might want to modify the 'RIB Filename' (in the Render Engine group) , or the 'Archive Write Mode' (in the RIB Archives group).

Rendering the scene

  • Create a new render pass using the 3Delight > Create Render Pass menu item. This pass will be used to produce an image.
  • Make sure the 'Generate RIB Archives' rendering attribute in the RIB Archives section is turned on. This will automatically render the Archiving pass before continuing with the regular rendering process, ensuring that the RIB archive exists and is up-to-date.
  • Make sure the 'Ignore Archived Objects' rendering attribute in the RIB Archives section is turned on. This will automatically remove the archived objects from the list of Scene Elements to render, leaving only their replacement RIB Archive Node.
  • Click 'Render This Pass' in the Attribute Editor. The rendering process will do the following:
    1. Render the archiving render pass. This will create the RIB Archive.
    2. Exclude the scene elements of the archiving render pass from the list of scene elements to render. This leaves the RIB Archive Node as a stand-in for the archived objects.
    3. Render the resulting scene.

Miscellaneous RIB Archives tips


Here are few tips regarding RIB Archives:

  • Using the RIB Archive Node, it is easy to add extra instances of objects while keeping the scene very light by simply duplicating that RIB Archive Node.
  • If the RIB Archive Node might be moved to a different position from where the objects were when archived, it is important to turn on the 'Concatenate Geo Transforms' rendering attribute, in the Advanced: RIB Archives group of the render pass used to create the archive. If the archive contains light sources and it is desired that these are also moved, make sure that the 'Concatenate Light Transforms' rendering attribute is also turned on. Those two attributes are on by default.
  • It is possible to attach a geometry attribute node to a RIB Archive Node. If the archive was created with the 'Archive Geometry Attributes' rendering attribute off, then the Geometry Attribute Node attached to the RIB Archive Node will affect all objects inside the archive.

Even when the archive was created with the 'Archive Geometry Attributes' toggle on, it might still be useful to attach a geometry attribute node a RIB Archive Node when the 'Archive Read Mode' RIB Archive Node attribute is set to ‘Delayed’. For instance, it is necessary to set the Subsurface Scattering group attribute to * on a RIB Archive Node if it has its 'Archive Read Mode'" set to ‘Delayed’, else the whole archive will be excluded from any subsurface scattering simulation.

The following tips apply to RIB Archive Nodes that have Render Settings connected to their 'Archive Pass' attribute:

  • When archived objects are still present in the scene, it is possible to either ignore them completely for the rendering and only use the archive, or to keep the objects in the scene and also include the archive. The later could be used to add an extra instance of the objects in the scene, simply by moving the RIB Archive Node elsewhere in the space. Control of the presence of the archived objects is done via the 'Ignore Archived Objects' rendering attribute of the render pass used to render the image.
  • It is possible to avoid constantly re-creating archive files; set the 'Archive Write Mode' of the Render Pass that creates the archive to ‘Reuse Existing Archive’. Or, simply have the rendering process assume that all the required files are there without checking anything by turning off the 'Generate RIB Archives' toggle of the Render Pass that produces the image. Both of these options are in the RIB Archives group of rendering attributes.