The MayaMan Model Attributes dialog allows you to modify attributes on the models in your scene so that they are rendered differently with MayaMan. Maya's own model attributes (e.g. visibility, motion blur, etc) are used by MayaMan where possible, so the attributes in this dialog are those not already provided by Maya itself.
Note, during a depth mask pass the shaders applied to the objects will
be subject to the 'Consider Surface Shaders' and 'Consider
Displacement Shaders' settings in global shadow options.
Data found on the shape is used in preference to data on the transform
or attribute node, data on the transform is used in preference to data
on the attribute node. This gives the ability to use a single
attributes node to turn a bunch of curves into RiCurves and have that
node provide a default set of data on the attribute node and then
override it on some individual objects.
The data put into these vectors must have the correct number of
elements, MayaMan will print a warning in the Output Window if the
array is the incorrect length and the data will be ignored.
The special name Width is specified then the curve is given
width data that will change over the length of the curve. If you use
the special name Normal then the curve is given normal data.
All other names are passed unfiltered. Vector arrays, other than
Normal, are passed as an array of colors which is convenient
when the data name is Cs, conversion to any other data type is
trivial to handle in the shader.
To set width and normal data on a open nurbs curve with 5 control
points execute a mel script like this:
The 'Replace Hierarchy' option tells MayaMan to replace the object and all children with the substituted RIB file, whereas leaving this option off will still result in the object's children RIBs being generated by MayaMan.
The 'DelayedReadArchive' option causes MayaMan to include the referenced RIB file so that it is only read in by the RenderMan renderer if it is visible in the render. This is a great option for reducing the render times (and memory usage) of rendering sequences where the object may not be visible in all frames. It also helps in rendering single frames where the object may take up a small amount of the image, in which case it will only be read in when rendering the section of the image containing the geometry.
Archives are normally attached to transform nodes and as transform nodes are not light you need to associate a light set with the Additional Light Set.Additional Light Set
This option allows association of an additional set of lights for the
objects modified by this attribute node, these extra lights will not
be used by the Maya renderer. Useful for illuminating archives
that are attached to transform nodes or illuminating curves as
Maya does not allow association of lights with transforms or
curves.Depth Mask Creation
When doing depth mask
hiding you need a way to nominate which objects are to be used to
create the depth stencil. This is it. Objects which are visible to
the depth mask pass are normally hidden from the regular camera but
you can use the control in here to also show the surface to the regular camera.
Curves
Render curve as RiCurve
You can apply this attribute to a curve in your scene to have it rendered through RenderMan as a RiCurve primitive. You must assign your curves a shading group using the 'Override Shading Group' option (see above), as Maya cannot associate shaders with curves, likewise you must assign a light set with the 'Additional Light Set' option (see above), as Maya cannot associate lights with curves.Curve Width
When using the above option to render out curve primitives, you will need to specify the width of the curve.Curve as Cylinder
When rendering curve primitives using MayaMan, you can have MayaMan render your curves so that they appear to be cylindrical. The curves will still be rendered using the RiCurve primitive, but special shading will be performed to make them appear to be cylindrical. Using this dropdown list, you can select to not shade them in this way (the default) or to use bump or displacement shading to make them appear as cylinders. You must assign your curves a shading group using the 'Override Shading Group' option (see above), as Maya cannot associate shaders with curves. If you do not assign a shading group, your curves will not be rendered cylindrically.Curve Data
Use curve data to give a curve non constant width, explicit normals or
any other user named data. Curve data is stored in maya as a regular
scalar or vector array attribute on the shape, the transform which is
the immediate parent of the shape or the attribute node itself.
setAttr MayaManAttributes1.MayaManCurveWidth -type doubleArray 5 1 2 3 2 1
setAttr MayaManAttributes1.MayaManCurveNormal -type vectorArray 5 0 1 0 0 0 1 0 -1 0 0 0 -1 0 1 0
Reflections/Refractions
Override Reflection/Refraction File
MayaMan will automatically generate reflection maps for your objects as necessary, but you may want to override this with your own maps. This is useful for faking reflections by rendering out a reflection map, modifying it and applying it back on to the object.Override Reflection/Refraction Map Resolution
This overrides the resolution of the reflection maps that are rendered for this model. It is often useful to have a low resolution global setting for reflection map resolution, and increase this resolution for close or large objects where the reflection needs more definition.Override Cube Face Env in Material
The "Cube Face Env" parameter can be a property of both materials and models. Enabling this parameter on a model effectively overrides the setting in the material that is applied to the model.
Override Flat Mirror in Material
The "Flat Mirror" parameter can be a property of both materials and models. Enabling this parameter on a model effectively overrides the setting in the material that is applied to the model.
Displacement Bound
The Displacement Bound is an amount added to the geometric bounding box of an object to allow for surface displacement shaders. MayaMan will attempt to calculate a correct bounding box around all objects, however, large displacements can sometimes go outside of this bound, in which case you will need to increase it. You may also need to get the camera very close to a displaced surface, in which case you might need to tighten the bounding box in order to avoid intersection with the camera plane. If you are overriding the displacement bound you should always try to make the value as small as possible for the most efficient rendering.ReadArchive
Using MayaMan you can replace an object in your scene at render-time with the contents of a RIB file. This is most useful for scenes where you have large complex objects that you are not modifying. These objects can take a long time to generate the RIB files for, so you can write them out once (using the 'create archives' option in MayaMan Advanced Options or the 'Generate Object Archive RIBs' option in the main MayaMan menu) and they will be reused in later renders.
| $bound | The bound of the object, in the format "bound=xmin xmax ymin ymax zmin zmax" |
| $frame | The current frame being rendered, in the format "frame=12" |
| #[0-9]f | Alternate way of specifying the frame number, useful for building file names. ie: foo.#4f.dat will turn into foo.0001.dat, etc. |
| $shadow | Originally a flag to indicate that a shadow map is being computed, now a more general run mode flag and a synonym for the #s keyword, some programs may choose to output different geometry in different runs. In the format "shadow=[0|1|2|3]". |
| #s | Mode specification flag, replaced with '0' for a regular rib, '1' for a shadow rib, '2' for a cube-face reflection, '3' for a flat mirror. Some programs may choose to output different geometry depending on which mode is being used. |
| $vblur | Flag to indicate how much vertex blur should be used, in the format "vblur=0.5" |
| $mblur | Flag to indicate how much motion blur should be used, in the format "mblur=0.5" |
| $blurdir | Flag to indicate which direction the blur should occur in, -1=backward, 0=centered, 1=forward, in the format "blurdir=-1". The blurdir state will influence the time values you give to RiMotionBegin. |
| $blursegs | Flag to indicate how many blur segments should be produced, in the format "blursegs=1" |
| $linearblur | Flag to indicate if linear blur is enabled, in the format "linearblur=1". The linearblur on/off state will influence the time values you give to RiMotionBegin and the geometry you emit. When on you need to emit on even frame boundaries, when off you need to emit fractional frames. |
| $renderer | Flag to indicate which renderer is being used, in the format "renderer=prman" |
| $viewname | Flag to indicate which view (light or camera) is being used with mayaman's uniquifying string appended, in the format "viewname=viewname" |
If the attribute has only one value (or is an array of only one value) then it will be inserted into the rib as a 'constant' value. Array attributes with more than one entry will be assumed to be 'vertex' data unless the attribute name has additional type information encoded. This type encoding is accomplished by embedding a special string into the name. ie:
| Attribute Name Contains | Resulting Storage Specifier |
| _c_ | constant |
| _u_ | uniform |
| _vx_ | vertex |
| _vy_ | varying |
| _fv_ | facevarying |
| Attribute Name Contains | Resulting Type |
| _C_ | color |
| _n_ | normal |
MayaMan makes no attept to ensure that you've provided the correct number of elements, you'll have to observe error messages/warnings from the renderer and adjust array lengths appropriately. Basically only two array lengths are valid, one per vertex and one per face per vertex. So for a basic poly cube that means lengths of 8 and 24 make sense.