MayaMan Help Contents

# MayaMan Material Attributes Dialog

TheMayaMan Material Attributes dialog allows you to control various material-specific parameters that only apply to MayaMan renders.

### Adding and Accessing the MayaMan Material Attributes

Before you can modify the MayaMan Material Attributes, you will have to add the attributes to the materials. You do this by selecting the material(s) you want to add the attributes to, then select "Add Material Attributes" from the MayaMan menu. All attributes are stored on a separate node, so several materials can easily share the same set of attributes.
By default, "Add Material Attributes" will add one shared/common attribute node for all the materials 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 material etc.
Once a material has a MayaMan Model Attribute node, you can simply access all attribute parameters in their own panel in the Maya Attribute Editor.

### Embedded Material Attributes

In addition to the material attributes available through the above mentioned mechanism, MayaMan also adds a variety of additional attributes to some node types.

Node Type | MayaMan Attribute Name | Function
node directly connected to displacement slot of shadingEngine | Displacement Bound | sets the displacement bound for objects with this material
node directly connected to displacement slot of shadingEngine | Bypass Maya Disp | skip the manipulation of P/N that mayaman would write for this node, typically only used if an SLCodeNode is connected to a displacement node rather than directly to the shadingEngine
node directly connected to displacement slot of shadingEngine | Trace Displacement | will objects with this material run the displacement shader to decide where a ray hit point is? (attribute/trace/displacement)
node directly connected to displacement slot of shadingEngine | True Displacement | will objects with this material actually displacement or will they just bump? (attribute/render/truedisplacement), this is only applicable to certain renderers, check your documentation
node directly connected to surface slot of shadingEngine | MayaManOs | set rib opacity (Os) for this material, first created when an object has a connection to it's transparency or outTranparency attribute
node directly connected to surface slot of shadingEngine | MayaManCs | set rib color (Cs) for this material, first created when an object has a connection to it's color or outColor attribute
file node | MayaManTexture | the name of a texture to use instead of the one you've told maya about, among other things, it's a handy way to use a highrez texture at render time and just tell maya about a low rez version

### Reflections/Refractions

#### Cube Face Env

This parameter allows you to generate cube face environment reflection maps for the objects that have this material attached to them.

#### Flat Mirror

When this parameter is enabled, MayaMan will generate a flat mirror reflection map for all objects that have this material attached to them.

#### Reflection Blur

Increase the value of this parameter to increase the blur in raytraced reflections.

#### Reflection Samples

This parameter determines the number of samples that will be used when evaluating raytraced reflections. You will need to increase this value to reduce noise in blurred reflections.

#### Refraction Blur

Increase the value of this parameter to increase the blur in raytraced refractions.

#### Refraction Samples

This parameter determines the number of samples that will be used when evaluating raytraced refractions. You will need to increase this value to reduce noise in blurred refractions

#### ReflectionSet/RefractionSet

When connected to an appropriately configured set will cause ray traced reflections/refractions to only see the objects mentioned in the set. To create an appropriately configured set click on the checkboard icon and one will be created. The set's trace name (as represented by the MayaManAddGroup attribute on the set) is derived from the material name, this is OK even if the materials change name but there should not be duplicates, if material renaming and re-organization then creation of new sets causes mayaman to use the same name again then it's up to the user to uniquify these names (should be rare at worst).

A set can be used by more than one material, the same set can be used as both the reflection and refraction set, sets can be drag-and-dropped from the outliner onto the attribute editor and the correct connection will be made.

A set can be placed inside a set, this lets you build a set of really common elements and easily include them in all the more specialized sets.

Note, the set, at birth will contain the wrong things... a trip to the set membership editor is unavoidable.

### 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.

### Indirect Lighting

When you are using MayaMan's material emulations you can use these controls to specify a different shading network to be used for indirect lighting probes. This can be advantageous when the surface shader is complex (and therefore expensive).

#### Filter Scale

This option scales the size of all filters that will be used in the shader code written to emulate the shading network connected to Surface Shader. In general you want the indirect shader to be blurry so this provides a convenient control over all the filtering done on this sub-network.

#### Surface Shader

Connect a 'Surface Shader' to this input (the checker icon will create one for you). The outColor and outTransparency attributes of the surface shader will be used when the object is being sampled by an indirect illumination probe ray.

### Sub-Surface Scattering

When enabled the objects with this material will produce subsurface scattering effects. In some renderers (or modes) this is a multi-pass effect much like a shadow map... ie: when a cache has to be generated and a cache has been requested then a separate rib is created and rendered and the beauty pass uses that data to fill in the subsurface scattering in the magic shaders and this light will appear as ambient light.

If a prepass is required then mayaman will automatically generate and render the required ribs, no need to invoke two passes manually or to switch on the 'bake' version of the renderer.

There are two cases where a prepass will not be generated, both related to Air. The first case is when a custom renderman shader (like Air's VSkin) is used, this shader handles all aspects of subsurface scattering internally through the subsurfacescatter() SL call. The second case is when both 'reuse cache' is off and 'delete cache after use' is on. Under these circumstances it will be as if the cache never existed anyway and the intermediate step would be wasteful.

#### How To Use an Air shader like VSkin

- apply the VSkin shader like any other custom surface shader
- add a material attributes node
- enable subsurface scattering
- set an appropriate group name
- none of the other values will influence the render

#### Enabled

Will the objects with this material exhibit subsurface scattering effects?

#### Reuse Cache

If a cache file already exists should it be reused?

#### Delete Cache After Use

After the beauty pass should the cache file be deleted?.

#### Constant

The subsurface data will only be computed once for the whole render or once per frame. If the lights or the geometry are moving then you'll probably need to create a cache per frame. If a light is shadow mapped and the map hasn't been set to 'constant' with a mayaman light attributes node then it will be computed after the subsurface data cache, resulting in subsurface data that does not correctly take shadowing into account... so basically, only use 'constant' mode here if everything in the scene except for the camera.

#### Group

Objects that share a group will transfer light from one to the other. All filenames used subsurface mechanism will be derived from this string so it must not be left empty.

#### Albedo/DiffuseMeanFreePath/IOR

Parameters that determine how the surface transfers light.

#### MaxError

For PRman this is the maxerror setting passed to the brickmake program.

For Air this is the maxerror factor used by the irradiancecache mechanism and is used during both the bake and beauty phase... usually a larger value is used during beauty passes, especially when the beauty pass is higher resolution than the bake pass.

#### MaxPixelDist

Only used by Air, this is a quality control used by the irradiancecache mechanism that mayaman uses to store the subsurface light, it is used during both the bake and beauty phase.

#### MaxSolidAngle

Only used by PRman12, this is a time/quality knob that governs the conversion of the radiance point cloud to the subsurface point cloud, larger values are faster/fuzzier.

#### ShadingRateScale

Used to generate less dense point cloud files, larger numbers should speed up cache generation.

#### Controlling which lights contribute to subsurface scattering

As the rib for each subsurface group is created the light list can be whittled down by creating a light set called "SubSurface_group" where group should be replaced with the name of the group. MayaMan Help Contents