The Maya GUI for Partman


  1. What is Partman?
  2. What is the Interaction Between Maya and Partman?
  3. Overview of the Maya-Partman workflow.
  4. The Partman GUI for Maya.
  5. What happens when you press the Render button?
  6. The contents of the Partman directories in the /js system.
  7. Appendix: The PG Shading Language Applied to Alpha and Z Buffer Import

What is Partman?

Partman is a specialized renderer created for the limited task of rendering particles - LOTS of particles. The design goal was to render them as fast as possible with extremely low RAM footprint so that many particles could be rendered. As an example, a partman render created 470 million "fully 3D" particles in less than 30 MB of RAM, in less than 60 cpu hours (1K image). The record for the number of particles rendered is presently 1,019,700,000, but there is no limit to the number of particles that can be rendered. Partman employs special algorithms which allow an a-buffer and z-buffer to track all of the information necessary to properly hide one particle behind another with only one particle in memory at a time. Hence, the only cost of increasing the number of particles rendered is cpu time.


For reference material on the perl module, and examples of its use, see this page. There is enough information for you to write your own perl code for customized rendering problems.

Although the perl module makes partman highly customizable and flexible, a large number of particle rendering problems follow a generic workflow. To aid these situations, the Maya GUI interface partmanGUI has been built to make it easy to render out a Maya particle system. This document describes that GUI and its usage.

There are two methods of feeding particles into partman. The most typical way is to model a particle system using Maya and write the particle data out to pdb files. In rendering, partman reads the pdb files and generates particles based on the pdb data and a special shader called a particle emission shader (pes). The pes gives the user procedural flexibility to change the properties of the particles, generate more particles, and control exactly which particles are rendered.

The second method of feeding particles to partman is to create a single sphere object within the perl code, and have partman render that sphere. Placing the render call inside a loop, the sphere's properties can be changed any number of times and added to the render. This is relatively slow because it relies heavily on perl to do procedural calculations for particle placement, and so is not the recommended route.

What is the Interaction Between Maya and Partman?

As a particle renderer, partman needs three kinds of information: (1) information about the camera, (2) information about the particles, and (3) information about the lights (if any). The partmanGUI extracts most of this information from a Maya scene, and asks the user for some of the information (mostly the names of shaders). The partmanGUI queries the scene for camera position, orientation, aspect ratio, fov, etc; the name of the particle set for which pdbs will be rendered; the number of lights, their type, position, orientation, color, etc. From this information and additional information supplied by the user, the partmanGUI generates a sequence of perl scripts, each of which renders a single frame, and an rcf file which can be used to submit the renders to the 3d queue. For the advanced user who is comfortable with perl programming, you can freely modify the generated perl scripts to further customize the render for your needs. The perl scripts are typically short, and the reference documentation gives you a complete guide to what is being done in the scripts.

Partman does not generate the pdb files. There are several dynExport utilities at Cinesite, so there is no need for partmanGUI to perform that function. Also, there are many times when you will want to launch a render and use pre-exiting pdb sets.

Overview of the Maya-Partman workflow.

The following steps are a generic sequence of actions to use partman in your rendering project:
  1. Create/animate a particle system and camera in Maya.
  2. (optional) Create/animate lights to illuminating the particles.
  3. Export the particle data to pdb files using one of the dynExport tools. For particles with the node name "name", the particles should be located in a directory maya/particles/pdb_"name"/ .
  4. Bring up the partman GUI via the menu item CineSite -> Particles -> Partman Tool.
  5. Check over the information. Most of it comes from the maya scene and need not be changed. Some of it should be changed. For details, see the section The Partman GUI for Maya.
  6. When you are ready to start rendering particles, hit the "Render" button. For details on what happens then, and how to render single frames or the whole batch, see What happens when you press the Render button?.

The Partman GUI for Maya.

This section is the meat and potatos of this document. Here we examine the various parts of the partman GUI and how to operate them. We begin with a complete screen shot of the full gui:

The section for Lights at the bottom of the window only appears when lights are present in the Maya scene. If no lights have been created, the Lights section of the partman GUI does not appear.


Frame Start, Frame End, Frame Step are pretty self explanatory. When the window first comes up, the values are set using the playback options in maya.

Num Pixels Horz and Num Pixels Vert are the number of pixels the rendered frames will have. Initially set from the render globals.

Output Prefix is used to name several different files: (1) the perl code for rendering each individual frame are placed in the partman/bin directory with the name "Output Prefix", where #### is the four digit frame number. (2) the rendered images are placed in the partman/images directory with the name "Output Prefix".####.img. The default naming, in this example "untitled_partman", is the concatenation of the maya scene file name and "_partman", although anything except a path can be used.

RGB, Particle Alpha, Z Depth, Scene Alpha, and RGB Transparency are various images channels partman can render. The user is given the option of using or not using any of these channels, and the option of writing these channels to the file. The default settings are the minimum requirements for properly rendering and writing out an image of particles with an alpha channel. For the most part, you will not need to alter these settings.

The rendered images are written to files which have a .img suffix, and are in the HDF data format, which holds the images in the full floating point format (32 bits per channel). These files are uncompressed and be quite large, e.g. a 2K image with alpha channel is about 48 MB. The Do Conversion button gives you the option of automatically converting these files to Tiff format, and the Compress .img button then compresses the .img file losslessly using gzip. The buttons work by placing in the perl script system calls which accomplish these steps. The conversion from 32 bit/channel floating point in HDF to 16 bit integer in Tiff can only be accomplished when a mapping relationship is known. The default mapping, shown in the Min Value and Max Value boxes, is the map floating point 0.0 to tiff integer 0, and floating point 1.0 to tiff integer 65535. You can give other mappings in these two boxes.

If you are interested in having an alpha channel in the tiff file, the Convert Alpha Channel turns on that option, and the Alpha Min Value and Alpha Max Value give the mapping from floating point to integer for the alpha channel.


Camera Motion Blur Lets you choose whether to render motion blur due to the camera motion. This is a linear blur between the camera position in the current frame and the position in the next frame. Motion blur due to particle motion is handled independently in the particle emission shader.

When there are several cameras in a scene, the Camera menu lets you select which camera you want to use for particle rendering.

The fields Camera Position, View Direction, Up Direction, Horizantal FOV, Aspect Ratio, Shutter Angle, Near Clipping Dist, and Far Clipping Dist are not meant to be altered here. Their values come from the selected camera node. If you need to alter any of these values, alter them in the camera node directly.

The button Import Scene Alpha and Z Buffer allows you to import rendered alpha channels and z buffers of objects in a scene to properly hide/occlude particles in the partman render. The typical method of using these is to render an alpha channel and a .zfile z depth file from prman for all of the non-particle objects in the scene, and import those files directly. To import them, the fields Scene Alpha and Z Buffer must be set up properly: the fields must give the names of these files, including path, up to but not including the frame number and suffix. So the entries "alphachannel" and "zbufferchannel" look for the files "alphachannel.####.tif" and "zbufferchannel.####.zfile" for frame number ####. NOTE: these entries must include the path.

In addition to importing alpha and z buffers, this data can be altered during the import via a shading file written in the PG (Phil Graham) shading language. See the appendix for a description of the process. The fields Alpha Shader and Z Buffer Shader hold the names of the shader files to be applied. A blank field means that no shader is applied. The default setting for the Z Buffer Shader is /hosts/elvisbob/DEV/jerry/proj/Hollywood/ddweston/spray/zdepthfactor.pes because the z depth data that comes from prman is not the true distance between the camera and the visible object, but is the distance from the object to a plane that includes the camera image plane. The default shader computes the correct value for the true distance between camera and object. The calculation depends on the FOV and aspect ratio of the camera, so you should copy this shader, insert the values of FOV and aspect ratio for your camera, and set Z Buffer Shader to the location of your modified shader.

Of course, these shaders can be used for a variety of other effects as well.

Particle Node

The menu Particle set lets you choose among the different particle sets you wish to render. Only one particle set can be used in a render. Partman is capable of rendering any number of particle sets in a single render, the constraint of just one set here is a limitation of the GUI only. To see how to render more sets, consult the reference documents for CineRender.

Partman renders many more particles than are in a pdb file by using an emission shader to procedurally create more particles. The emission shader must be listed in the Emission Shader field. Each particle is rendered as a sphere, with a surface that is shaded using the file in the Surface Shader field.


Lights are an optional item in the GUI. If there are no lights visible in the Maya scene, this portion of the GUI will not appear. If lights are visible, the Use lights button lets you decide whether to use them in the particle render. If you choose to use them, the button Shadows from lights lets you choose to compute a modified shadow map for each light. The modification allows the map to perform volumetric lighting and attenuation and self-shadowing of a cloud of particles. If shadows are being used, the size of the shadow maps for all of the lights is specified in the fields Shadow Pixels Horz and Shadow Pixels Vert.

What happens when you press the Render button?

The GUI goes through the following steps when the Render button is pushed:
  1. For each frame a perl script is created and written to the partman/bin directory. The perl script has the necessary code to render one frame of particles, write the frame to a file, and (optionally) convert the file to tiff and compress the original.
  2. An RCF file is constructed and written to the bin/ directory. This RCF file will submit all of the frames to the 3d queue.
  3. An instructed appears in the Maya Script Editor window on how to submit the RCF file to the queue. The GUI does not automatically launch the RCF file.

If you want to render just one of the frames, the perl file for that frame can be executed in a shell ( just type perl "name-of-file" ) without any other preparation or clean up. If you want to render a short segment, you can edit the RCF file and submit that to the queue. Pushing the Render button does not close the partman GUI window. The Cancel button however, does close it.

The contents of the Partman directories in the /js system.

Appendix: The PG Shading Language Applied to Alpha and Z Buffer Import

In progress.
Written by
Jerry Tessendorf