Requirements: AIR 8.17 or later (available to registered users on the SiTex Graphics forum). This note specifically addresses using an instancer shader in the RhinoAir plugin for Rhino. The same method should work in any application (such as AIR Space) that supports AIR’s instancer shaders.
This note describes how to include Massive agents when rendering a Rhino model. This method uses the new MassiveAgents instancer shader to add agents at render time.
Preliminary: Massive uses a small program called runprogram.exe to create agents at render-time. AIR must be able to find the runprogram.exe file at render-time. The easiest way to ensure that is to copy the runprogram.exe file from your Massive installation to the procedurals directory of your AIR installation.
1. Select the terrain object in the scene (or another large object if there is no terrain). Display the AIR Material page for the object. Assign the MassiveAgents shader as the instancer shader.
2. Set the instancer Extent to a value such that the terrain object bounding box incremented by the Extent would encompass all the Massive agents in the scene.
3. Set the Agent archive prefix parameter to the file name of the agent archives exported from Massive minus the frame number and .rib extension.
4. Copy the Massive options string from one of the scene rib files exported by Massive (the options should be the same for every frame). Look in the scene rib for a line that looks like:
Procedural "RunProgram" ["run_program.exe" "options motion_blur on render_pass renderpass_Air air "][-2250.06 2249.94 -262.813 302.097 -2250.36 2249.64]
The string after “runprogram.exe” is the options string. Copy all characters between the quotes and paste them as the value for the Massive options parameter in the AIR Material dialog.
5. Set the Rotate x value to 90 to compensate for the different up directions in Rhino and Massive (the Y axis is up in Massive; the Z axis is up in Rhino).
6. Use the Frame offset value to pick the Massive agent frame that should correspond to the first Rhino frame in an animation.
7. Use the Bound parameter to define a bounding box that encompasses all the agents in the scene. This bound is used in the Procedural call to set the Massive runprogram options. In many cases you may be able to use the bounding values in the Procedural call in the main scene rib described above. The bounding box is defined with six values: minx maxx miny maxz minz maxz.
8. To render an animated sequence, you must enable one of the animation modes in RhinoAir on the Air Animation page of the Rhino options dialog. If your scene does not employ any other animation, set the Animation mode to Turntable with a Max angle of 0.
9. Render to see your Rhino model with Massive agents generated at render-time.