Optimization Tips for Massive Scenes


1.  Make agents and terrain invisible to all ray types if the scene does not use raytracing.  When rendering out of Massive, unchecking the Shadow control on the Render page should be sufficient. 

There are two easy ways to see whether objects are being retained for ray tracing:

    In the AIR Show status bar, the 5th section from the left will contain S, R, or I if any objects are visible to shadow, reflection, or indirect rays respectively.

    The statistics generated by AIR report the memory used by objects retained for ray tracing.  Statistics can be enabled with the -stats command line switch.

2.  Render by column instead of by row.  By default AIR renders an image from top to bottom, one row of tiles at a time.  For a typical wide crowd shot peak memory can often be reduced by instead rendering from left to right in columns.  The bucket or tile order can be changed to left-to-right using the -ltor command line switch or the following option:

    Option “render” “string bucketorder” “horizontal”

3.  Use a smaller bucket size to reduce memory use and improve load balancing when rendering with multiple threads.  The bucketsize can be set using the -bs command line switch:

    air -bs 16 scene.rib

or using the following option:

    Option "limits" "bucketsize" [16 16]

The default bucket size is 32 x 32 pixels.  For heavy scenes a bucket size of 16x16 may reduce memory use.  A smaller bucket size will typically increase render time, so use as large a bucket size as feasible.

4.  Convert all texture maps to AIR texture files with mktex or mktexui to optimize memory use and texture quality.

5. Enable mesh data simplification with

    Attribute "render" "integer simplifyfacedata" [1]

This will normally result in lower memory use for Massive agents.

6.  Use multiple instances of the Massive procedural primitive

Massive uses a RunProgram procedural primitive to generate agents at render time. That procedural can often become a bottleneck in multithreaded rendering. You can allow multiple instances of the RunProgram to run concurrently by increasing the maximum number of instances allowed with:

    Attribute “render” "runprogramthreads" [nmax]

Air will automatically send the scene options string to each instance of the Massive procedural primitive.

7.  Enable ray trace memory optimization (Air 10.01 and later)

Air 10.01 introduces a new option to optimize memory use when rendering with ray traced shadows or occlusion:

    Option “render” “optimizetracememory” [1]

Specifically, for objects that are (1) visible to shadow rays with transmissionhitmode "opaque" or "primitive" and (2) NOT visible to reflection or indirect rays, Air will free data such as shading normals and texture coords required for shading but not needed for shadow queries once an object has been rendered by the scanline renderer.

For a typical Massive agent this optimization can reduce ray tracing memory by 1/3 to 1/2.  When rendering with this optimization, you may obtain lower memory use by NOT enabling the mesh simplification option described under #5 above.


© 2001-13 SiTex Graphics, Inc.  All rights reserved.