RenderManArchive QuickStart

RenderManArchive QuickStart

RMS 4 includes a new type of DAG node - RenderManArchive - that draws a bounding box in the viewport to define the scope of an archive file. The archive file is an editable attribute on the node. In the future the node may be made capable of drawing a better preview of the archive, but for now it can be used in conjunction with a GPUCache node if a better preview than the bounding box is desired. When a RenderManArchive is created and parented below an initial selection, an initial file name is generated automatically, based on the name of the selection. If a RenderManArchive is created without an initial selection it's up to you to browse to an archive file via the Attribute Editor. In other words, RenderManArchive nodes can either be used to refer to existing archive files, or to be responsible for writing an archive for the DAG that they've been parented below.

Creating a RenderManArchive

Let's look at how to create a RenderManArchive. Select a transform node that is above everything you wish to include in an archive - maybe it's called "helicopter". Then click the Archive button on the RenderMan shelf, or, from the RenderMan menu, choose either RIB Archives->Create or RIB Archives->Create and Write Archives. The former will create a new RenderManArchive node, which will be parented below the originally selected transform. The latter will create the new node and write the archive containing the RIB representation to disk. To (re)write an archive after the node has been created, one can "update" the archive. Either select the archive node and click on the Update Archive button in the Attribute Editor, or choose RIB Archives->Update Selected Archives from the RenderMan menu.

For an initial selection of a DAG node named "helicopter", the automatic file name would be renderman/ribarchives/helicopterArchive.zip. Notice the default location of this kind of RIB archive is different than the default location for RIB generated for the scene, which would be under renderman/scenename/rib/. There is a separate entry in RMSWorkspace.ini for this new kind of RIB archive, because it's expected they'll want to be shared between scenes within a project. Clearly, this creates the possibility that archives from different scenes could attempt to overwrite each other, so a warning dialog comes up when a file name is chosen that already exists in the /ribarchives directory.

RenderMan Archives and Look Files

Now suppose you're assigning or tweaking shaders for various parts of the helicopter. You can do this while re-rendering, but the changes won't "stick" after the session is over, because the archive's RenderMan Look File data hasn't been updated on disk. To update RLF data for an archive, select the archive node, and either click Update Archive in the Attribute Editor or from the RIB Archives menu, and in the option dialog, select the "Update look files only" checkbox. This update will be significatly faster than the initial writing of the archive.

Override Shading with Dynamic Rules

Suppose you don't have the Maya scene for the helicopter, but do have the .zip archive, with or without associated RLF files. This is comparible to having your geometry in another baked form, like Alembic. (Note, on Linux RenderManArchive nodes can alternatively reference Alembic (abc) files in addition to RIB or zipped RIB files.) The new dynamic binding editor allows you to define new shading rules for objects in the archive, based on identifiers. This is a different approach to shader binding than the familiar select-and-attach, so it takes a bit of getting used to, but it opens up new possibilities.

More information can be found in the Dynamic Shader Binding documentation.

Referencing Archives

There are a couple approaches to referencing archives. You can simply create any number of RenderManArchive nodes in a scene, and have them point to any combination of same or different archive files. This could be called light-weight referencing. The original maya DAG is no longer part of the reference. RenderManArchive nodes can also be part of referenced maya scene files. Maybe the original helicopter exists in a maya scene file called helicopter.ma, and a RenderManArchive has been inserted into its DAG. That scene file can be referenced any number of times (as memory allows) through maya file referencing, and the presence of the RenderManArchive node allows you to avoid incurring RIB generation cost for the helicopter. A RenderManArchive node pointing at an existing archive, can also be parented below a GPUCache node, if you need better visualization than a bounding box.