MayaMan Help Contents

MayaMan Model Attributes Dialog

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.

Adding and Accessing the MayaMan Attributes

Before you can modify the MayaMan Model Attributes, you will have to add the attributes to the models. You do this by selecting the model(s) you want to add the attributes to, then select "Add Model Attributes" from the MayaMan menu. All attributes are stored on a separate node, so several models can easily share the same set of attributes.

By default, "Add Model Attributes" will add one shared/common attribute node for all the models in the selection that do not already have attributes attached to them. In the optionBox of the menu, there are alternative ways in which to add the attributes, eg adding separate nodes to each object etc.

Once a model has a MayaMan Model Attribute node, you can simply access all attribute parameters in their own panel in the Maya Attribute Editor.

When adding attributes to particle systems be sure to attach to the particleShape node rather than an emitter, field, etc.

Misc

Exclude From Vertex Blur

Here you can exclude particular objects from RenderMan's vertex blur. Use Maya's own per-model motion blur attribute for enabling/disabling object motion blur.

Use PRef

This option controls whether MayaMan will output the undeformed geometry data for objects containing a Texture Reference Object.

Render as Primitive

This option causes the model to be written out as a primitive instead of a polygon mesh or NURBs surface if possible. Spheres, Cylinders, Cones and Toruses can be output as their RenderMan primitive equivalents.

Render as Subdiv

This causes a polygon mesh object to be treated as a RenderMan subdiv model. Edge/Vertex sharpness can be specified with the
MayaMan Subdiv Edge/Vertex Tools.

Force Per Frame Shape Sample

If, in a sequence render, a model that should be changing shape over time appears to be frozen try turning on this attribute. To save time and disk space during rib creation MayaMan attempts to avoid sampling the geometry at every frame by examining a shape's inputs, if any can vary over time then the models is sampled every frame. This fails when a model has it's shape manipulated exclusively through expressions or some other back-door mechanism so this attribute has been provided to override MayaMan and have it check the shape of the model at every time sample.

Shading Attributes

Shading Rate

The shading rate value specified in the
MayaMan Basic Options dialog can be overriden on a per-model basis here.

Matte Object

Setting this option on will cause an object to become a hold-out matte object. These objects are not shaded, but hide any objects behind them. Matte objects do not show up in the RGB or alpha channels of the rendered image.

Override Shading Group

Using this option, you can have one material applied to an object in Maya (and used by the Maya renderer) and another material used only by MayaMan. This can be useful if you want a custom RenderMan shader applied to your object for MayaMan, but still want to perform renders using the Maya renderer. It is also necessary to use this functionality when rendering curves with MayaMan, as Maya will not allow you to attach a material to a curve primitive.

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.

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.

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.

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:

	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.

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.

See Using Sequences Of Archives.

RunProgram/DynamicLoad

As well as replacing an object with an external RIB file, you can also replace an object with a program or DLL/DSO that is called by the RenderMan renderer to generate RIB content for that object on-the-fly at render time. This functionality is great for generating masses of procedural geometry such as hair or foliage. In this dialog you can specify the name of the program/DLL/DSO and any necessary arguments to use when calling it at render time.

If the argument contains the doublequote character (") then mayaman will automatically insert a backslash (\) just before it so that the rib parser doesn't doesn't get confused.

If MayaMan sees certain keywords specified here, it will expand them during scene conversion. The keywords that start with a $ can be used with a # instead, in which case the "<identifier>=" prefix is elided from the output. The following keywords and their meanings are currently recognised:

$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"

MayaMan
now has an alternate way of using a procedural that yields easier to use GUIs for the users of your procedural. From the main mayaman menu you can create a procedural object and create parameters for it just like an SLCodeNode. It's possible to control how the argument strings are constructed, ie: "-foo=3" .vs. "foo 3" and so on. This new mechanism also makes it easy to animate parameters for procedurals, something that previously could only be performed with tricky per-frame MEL.

Particle Attributes

Provides a way to get specific per-particle attributes into the rib. See Exporting Specified Attributes.

Motion Blur

Motion Blur Shadows and Reflections

This option will enable/disable motion blurred shadows and reflecions of motion blurred objects. Use the option here if you want to override the setting made in the MayaMan Global Options and/or the MayaMan Material Attributes.

Scanline

These options are all per-model overrides for the Scanline options specified in the MayaMan Scanline Options dialog.

Raytracer Shadowing

Override Shadow Casting

Here you can override on a per-model basis the shadow casting as specified in the MayaMan Raytracing Options dialog.

AreaLighting

Object as Area Light

These options allow you to specify that a model in your scene is to be used as an area light in BMRT. The light parameters (color, intensity, etc) are taken from a Maya light in your scene, which you must specify in the 'Light Node' field here. The 'Area Light Samples' parameter is used to control the quality of the sampling done on the area lights (increase to slow down the render... or reduce shadow noise).

Global Illumination

The options here are per-model overrides for the Radiance and Caustics options found in the MayaMan Global Illumination Options dialog.

User Defined RIB Statements

This option allow you to attach custom RIB statements to individual objects. The statements will be placed into the RIB unedited.

PrimVars

User attributes whose names start with "rman_" and are found on a shape node, transform node that is the immediate parent of a shape, or a mayaman model attributes node will be placed in the rib file as primitive data that can then be interpreted by the shader. This is sort of like switch-nodes-for-custom-shaders. Non-color triples are output as points. This data is only output for nurbs and polygons as both curves and particles already have their own data output mechanisms already.

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

Sometimes a pointarray attribute is to be interpreted as a color or a vectorarray interpreted as a normal. In these cases an additional string can be embedded into the name. ie:

Attribute Name Contains Resulting Type
_C_ color
_n_ normal

Import Notes/Restriction Sometimes MayaMan has to break polygon models (or polygon models being rendered as subdivision surfaces) into more than one model. In this case the array modes don't really work properly as the number of data elements is almost certainly going to be wrong.

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.

MayaMan Help Contents