Scripting representation rendering

 
 
 

You can use a MEL or Python script to specify which representations to activate at render time. You can use a collection of callbacks to analyze the Scene Assembly hierarchy in the scene to determine which Scene representations to render and when.

For example, you can write a Python script that loads high resolution Scene representations for render when they are in the camera view, while unloading the Scene representations that are behind the camera view. This scripted custom traversal set can be called for each frame of the shot to minimize the memory that Maya uses.

Traversal sets can be added by plug-ins or executed as MEL or Python scripts. Typically, your traversal set callbacks would specify that the traversal set is executed before the scene is sent to the render.

This scripted workflow lets you set lighting with lightweight representations using one traversal set for test renders. When you are satisfied with the lighting setup, you can run the script so that Maya uses a different traversal mechanism to activate high-resolution Scene representations for final render.

As an example Python script, refer to adskPrepareRender.py, which is located in the sceneAssembly folder of your Maya installation directory. For example:

C:\Program Files\Autodesk\Maya2014\Python\Lib\site-packages\maya\app\sceneAssembly.

See the prepareRender command in the Maya Technical Documentation or for more information about creating traversal sets for Assembly representation rendering.

Related topics

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License