Preface
The massive agent object is the result of some time spent in developing small pipeline applications for integrating massive into a 3d feature pipeline. The contained python library has been built to address the need to deconstruct a massive simulation into layers which can be distributed across a 3d pipeline or asset management system and re-affected at various stages of look development: A mapping of the massive export data which can be brought into a 3d application through a template interface which exposes the agent attributes and animation data through a set of controls.
Proposal
To create a lightweight scene export parser which will allow easy access to massive data inside a 3d application such as maya or houdini.
To provide a method for parallel look and animation development: easy assembly of data across departments.
To provide TDs with the ability to redefine the look of a simulation on a per agent or scene base using as much of the tools suite available within the external 3d application.
For these tasks the following classes are required:
An agent node which describes a single agent instance and a scene node which parses the export data and loads it onto the agent map instances.
massiveAgentObject
The massiveAgentObject is the parent agent class which stores the agents attributes and their values, as frames or as single values, and organizes them into groups which represent a relationship between their functioning. The class contains a parameter string attribute which sorts the attribute:value pairs into a string formatted as the massive render dso expects. The bones and their initial position, rotation values, and standin geometry are all contained within a datamember class which the agent speaks to to provide the 3d scene with position or display data. The object should (in progress) contain display calls which will allow the agent instance to participate in the active 3d scene in different modes designed for scene interactivity and speed optimization.
massiveSceneObject
The massiveSceneObject is the parent scene class which creates persistent data from the parsing of the massive export and cdl files. The class contains methods for creating, storing, and extracting the data from an assembly of parsing routines which deconstruct the export data. The class contains datamembers for associating the routine with the massive output and 3d project path as well as threaded parsing calls to lightweight possix commands. The scene object also provides routines for writing the data to disk ( as pythons binary pickle format ) or reading it from disk: The methods for extracting the data from binary should be sub classed by application specific child classes of the scene object as per renderer, 3d application, or massive version.
Workflow
The workflow described by the mao suite is based largely on variable prefixing as observed by working alongside massive animators sharing data on large scale projects ( particularly Christina Hsu, James Thornton, Mark Thielen ). The cdl parser searches for tagged variables and maps them by type to a central cdl object: The tags which it uses to do its searching are available within the class for modifying, but they are central to obtaining values for each frame.
Variable prefixes:
material: m_
scale: s_
geometry type: g_
geometry blend: b_
Included are a basic command line exporter with an option for creating massive agent data (-p "pass") as well an executable for creating mao data from an existing export. Both applications and the massiveSceneObject expect a regular/named file structure underwhich to locate the massive simulation data and will fail to initialize should the environment ( or pwd ) fail to provide the directories which it expects . The environment data member has been built to provide hooks which should make integration into a production environment relatively easy.
Massive directories:
archive: rib or mi data
sim: animation data
maoAnimData: directory will be created to store the cached anim data.
Installation
Change directory to the unpacked massiveAgentObject archive and source either the bash or csh setup scritps.
Change directory to the massive simulation data and export or create mao data by specifying to either executable the name of the pass for which you would like to create nodes ( -p "pass_name" ).
In maya's python shell type the following:
from massiveAgentObject import *
maoScene = massiveSceneObject()
maoScene.unpackMassiveSceneData("/path/to/maoAnimData/folder")
At present running python threads is not reliable enough to simply parse the data from inside maya and create massiveAgentObjects from the initial live first parse: The environment calls made initializing the massiveSceneObject require either the environment to be loaded with variables from which the export data can be located, or that the current directory is the base massive directory.
Usage
maya
The maya/plug-ins directory found in the archive contains an example of how to sub class the scene object for creating mentalray renderable agents inside of maya. The attributes are loaded onto string arrays with correspondent values indexed to a float array in the node: The compute function of the node will assemble a new paramString from the values found on the node at export time.
houdini
I have begun a houdini implementation and will release it shortly.
mentalray
The massive_mray.so can be loaded directly into maya where the output paramString and bbox values can be connected from the mao node to it. Maya2008 supports ray 3.6 and should therefore allow direct rendering of the massive agents in the maya viewport should the pass data struct be found within the scene. (Reports indicate at present that an update to the embedded ray would need to be made to maya2008 in order to take advantage of a ray version which massive requires, however exports from inside maya to standalone ray will function).
renderman
The workflow for outputting renderman data is identical to that of mentalray save for the formatting of the paramstring. I would assume that a simple script which attached the output paramString to an riAttributes node would suffice to associate the massive procedural call with piece of scene geometry.
In the case of both renderers should a suitable windows compile of the shader dso become available the massive scene data could be manipulated or rendered in windows: This would be quite a gain in data sharing and farming out of animations particularly when look development could be done offsite and in parallel or post.
python
I will leave the exploring of the python library to you guys but will available to answer questions as they come up. There are some modifications which I have in mind that I will be at work on, in particular cleaning up of the routines which differentiate between sim types and the openGL drawing of agents to the maya viewport.
Limitations
Current
The massive agent objects are brought directly into the scene rather than through the cdl instance as planned.
The parsed animation data is ready for creating skeletons, however I have yet to begin debugging it and so have not passed any of it forward to the 3d scene.
The maya plug in is a generic node which loads string and float arrays with correspondent data, rather than a custom node per new agent with correctly named attributes. I will ask autodesk for a list of available pluginIDs and likely register a new node per cdl.
Version
I need to further debug rendering of the agents to the maya viewport and find a way to write the pass_data struct into the mi file for rendering.
robert.durnin@gmail.com