MayaMan provides support for Maya's particle system including the passing of data from the particle system to the shaders so that particleSamplerInfo can be supported, there are however a couple of differences between Maya's and MayaMan's interpretation of the particle data that you should be aware of.
MayaMan makes no distinction between the two, all particle types are converted to the appropriate type and rendered in software.
Maya's default particle shader includes a volume shader inside an opaque surface, the intention is to not see the volume. Unfortunately the way MayaMan handles this causes the volume rather than the surface to be seen. If you're using an opaque surface then there should be no volume shader in the shading group you assign to the surface.
When present, the rgbPP and opacityPP values are placed into the rib and applied as the default color and transparency information for the shader thus resulting in easy to control color and opacity for each particle. Where Maya and MayaMan differ is the case where the surface shader has it's color or transparency information plugged into a shading network, Maya ignores the network and uses the particle values, MayaMan uses the shading network values... if you want the rgbPP and opacityPP to have an effect then the surface shader must not have networked color/transparency plugs.
When MayaMan is using RiPoints to emulate the Points and MultiPoints render types it will depart from Maya's screen space based interpretation of pointSize if, and only if, the particle shape has a radiusPP value in which case the points have a world size which is the product of the particle's entry in the radiusPP array and the current pointSize setting. PointSize is still rolled in so that you have a convenient (if limited in resolution) scale for the size.
Particles will now blur when either vertex blur or motion blur is enabled in the global blur switches. If both are enabled then vertex blur will override unless the permodel attributes are set to exclude the object from vertex blur.
When using custom shaders it may be useful to have access to the per particle attribute values. To do this turn on 'Force Export Of Some Per Particle Attributes' in the MayaManAttributes node attached to the particle shape. The 'Attributes To Export' is a space seperated list of attribute names to export. If the particle shape doesn't have those attributes then no additional data will be placed in the rib.
The data type used in the rib for vector attributes can controlled through the use of decorators on the end of the attribute names. If no decorator is supplied then MayaMan will guess... and usually pick color. To select a specific data type for a specific attribute append the following suffixes to their names (only in this text field, the attribute name itself remains unchanged).
| Suffix | Meaning |
| _C | export the vector as a color |
| _P | export the vector as a point |
| _N | export the vector as a normal |
| _V | export the vector as a vector |
Examples:
foo_P # export the attribute called 'foo' as a point
bar_V # export the attribute called 'bar' as a vector
sev_N # export the attribute called 'sev' as a normal
col_N # export the attribute called 'col' as a color
MayaMan extends the ability of the particleSampler node for use on instanced geometry. For renderers
that support user attributes, MayaMan will insert attributes that indicate the age and particleId for
the instance. Magic shaders can use a particleSampler's particleId and age output to individualize the
look of each instance. Custom renderman shaders can access this data like this:
and then use those values something like this:
float particleId = 0;
attribute("user:particleId", particleId);
float age = 0;
attribute("user:age", age);
which will chose a random color for each instance then fade it in from
black over the first five age units.
color col = color cellnoise(particleId);
col *= clamp(age / 5, 0, 1);
| Per Particle Attribute | Usage |
| rotXPP | an angle (in radians) to rotate about the X axis, default is 0 |
| rotYPP | an angle (in radians) to rotate about the Y axis, default is 0 |
| rotZPP | an angle (in radians) to rotate about the Z axis, default is 0 |
| rotLastXPP | the rotXPP value from the previous frame, used for motion blur |
| rotLastYPP | the rotYPP value from the previous frame, used for motion blur |
| rotLastZPP | the rotZPP value from the previous frame, used for motion blur |
| Per Particle Attribute | Usage |
| radiusXPP | an override for radiusPP but only for the X axis, default is radiusPP or, if missing, radius |
| radiusYPP | an override for radiusPP but only for the Y axis, default is radiusPP or, if missing, radius |
| radiusZPP | an override for radiusPP but only for the Z axis, default is radiusPP or, if missing, radius |
| rotXPP | an angle (in radians) to rotate about the X axis, default is 0 |
| rotYPP | an angle (in radians) to rotate about the Y axis, default is 0 |
| rotZPP | an angle (in radians) to rotate about the Z axis, default is 0 |
| Per Particle Attribute | Usage |
| birthRadiusPP | an override for radiusPP for use in _Pref |
| birthRadiusXPP | an override for bitrthRadiusPP but only for the X axis |
| birthRadiusYPP | an override for bitrthRadiusPP but only for the Y axis |
| birthRadiusZPP | an override for bitrthRadiusPP but only for the Z axis |
| birthRotXPP | an angle (in radians) to rotate about the X axis, default is 0 |
| birthRotYPP | an angle (in radians) to rotate about the Y axis, default is 0 |
| birthRotZPP | an angle (in radians) to rotate about the Z axis, default is 0 |
There is no way to explicitly turn on or off the export of a particular array. MayaMan does attempt to minimize the amount of data that it sends. If you see it sending too much or not enough please let us know.
Unless the particle system is cached the motion blur will only work properly if it's in backward mode.
Cache the particle system, if you're doing distributed rib gen rather than rib gen from start to end on a single machine then you should use a disk cache to avoid large runup penalties.
Don't have more array attributes than you need on the particle system.