MayaMan Help Contents

Fur

MayaMan provides support for Maya Unlimited's Fur module by creating, at rib creation time, a set of data files that represent the hair information. At render time the rib directs the renderer to execute a seperate program which in turn loads the hair files and creates RiCurves primitives at the last possible moment.

This document refers to 'extra attributes', these are added automatically to fur description objects when mayaman first translates the scene, if they need to be set before the first translation they can be created by selecting the fur description (Fur->Edit Fur Description) and then invoking the Add Fur Description Attributes option in the main MayaMan menu.

Setting up MayaManFur

Location of MayaManFur

MayaManFur can either reside in %mayamanroot%\bin (in which case this location has to exist in the %path% environment variable), or it can be copied into %rmantree%\bin

Note on MayaManFur and Entropy

Entropy does not seem to work with the fur plugin unless there is a file (any file will do) called "MayaManFur" in %entropyhome%\bin in addition to the supplied MayaManFur.exe file.

Fur File Reuse

In order to optimize work-flow during certain types of fur tweaking there are some extra attributes that allow control over reuse of the three different types of fur files that mayaman produces and allows selection of directories to store those files in.

Also note that the maya fur globals 'Keep Temp Files' flag is observed. When enabled mayaman will not delete any of the fur files it creates.

Reuse Maps when enabled any baked maps for this fur description will be used as found, turn this off when you're tuning the maps on this fur description.

Map Dir indicates where to store the baked attribute maps, the default is to keep a set of these for each set of ribs, once map tuning is done and a model goes off to be animated in a bunch of different scenes it may be useful to point the MapDir to a single shared location.

Reuse Wig UVN, MayaMan writes data about each hair that will not vary over time into a .wig_uvn file. This data can also can also be shared between scenes. Changing the hair density, equalizer maps, shape of a nurbs surface with no equalizer map, texture reference object, shape of polygonal model with no texture reference object will require regeneration of these files. If the wig_uvn file can't be reused then neither can the wig file.

Wig UVN Dir, where to store the wig_uvn files.

Reuse Wig, MayaMan writes data about each hair that will change over time into a .wig file. This data can also be shared between scenes but this should only be attempted when the only difference between the scenes are camera and lighting related. Invalid attempts to reuse this data will probably result in the hair becoming disconnected from the surface.

NOTE the above reuse flags and cache dirs are for advanced users who are facing performance problems. They should be considered 'rope'... be careful not to hang yourself!

Workflow: How to use MayaMan Fur

Create equalizer maps (optional)

To distribute the hairs evenly over a nurbs surface you should create equalizer maps with Maya's 'Advanced Fur Rendering' panel... you only need to create Equalizer Maps, the other map types are not used by mayaman.

For polygonal surfaces there is no need to create equalizer maps as MayaMan distributes the hair according to the area of each polygon. If the object changes shape over time this would cause the number of hairs per polygon to change which is undesirable, to avoid this problem create a 'texture reference object' for the shape and hairs will be distributed according to the area on the reference object.

Map Baking

Except for equalizer maps, MayaMan will automatically bake any required maps other than the , these maps will only be baked if they don't exist and the Reuse Maps extra attribute is off. MayaMan assumes that maps don't change over time. If they are animated you will need to enable the 'MapsVaryOverTime' extra attribute.

Select a shader

By default MayaMan will put a simple hair shader on the curves which handles the basic parameters. If something else is required then attach a MayaManAttributes node to the fur description then turn on 'Override Shading Group'. From there you can use an arbitrary maya or renderman shader in the normal way. If a fur feedback shape is selected when a the 'add model attributes' operation is invoked MayaMan will automatically connect the attributes node to the active fur description.

If you're using a native renderman shader then you may want to add per-strand variety to the shading. This can be facilitated by turning on the 'hairId' flag in the extra attributes. To use this value in a shader you need to do something like this:

    surface test_hairid(float Ka = 1, Kd = 1; varying float hairId = 0)
    {
        color c = color cellnoise(hairId);
        normal Nf = faceforward (normalize(N),I);
        Ci = c * Cs * (Ka * ambient() + Kd * diffuse(Nf));
        Oi = Os;
	Ci *= Oi;
    }
Note that the shader argument is varying, uniform is not used as that forces per-hair shading rather than batch shading.

Another way to introduce per-strand variation is to get mayaman to attach the underlying surface UV information to each strand. Do this by turning on the 'Use Surface UV' flag which will cause 's/t' information to be associated with each strand.

Lighting

Currently MayaMan turns on all lights for all fur descriptions which is consistent with the way that Maya lights fur, there is no longer a need to enable additional-light-sets on the attributes node.

Shadowing

When the MayaManFur plugin creates the rib for a shadow it uses the so call linguini technique. This involves creating less, but fatter, hairs which generally results in faster and better mapped shadows. The decimation and scale factors can be controlled via extra attributes on the furDescription. The decimation factor dictates how many hairs will be used in the shadow run, a factor of 1 mean all the hairs are used, 2 means half the hairs are used and so on. The scale factor makes the hairs used in the shadow run wider which compensates for the decimation factor. The effect of shadowing can be exaggerated by using a scale factor that is larger than the square root of the decimation factor.

Blur

Fur will only blur when the global blur switches are enabled.

When motion blur is enabled fur will be blurred according to the transformation changes applied to the surface which is carrying it.

When vertex blur is enabled fur will be blurred according to the shape changes that occur through dynamics or IK... this is expensive.

If both vertex and motion blur are enabled then only vertex blur is applied as it's effect also contains the motion based component.

Normals

Normally a curve always faces the camera unless normals are provided. When the 'Normals From Surface UV' or 'Normals From Hair Curvature' extra attribute is enabled a normal will automatically be computed such that the curves become ribbons. The orientation is controlled by the underlying direction of the UV space or the shape of the curve. If using the from-UV option then the basic orientation can also be randomized if 'Normals Randomized' is turned on, this option has no effect on the from-hair-curvature mode.

Limitations

Using animated baldness at the same time as vertex blur is not supported.

Tips

Use a large shading rate, you can override the shading rate just for the fur objects with the Shading Rate control in the MayaMan Attributes Dialog.

When rendering in Entropy you might want to set the bucket size to be much smaller than Entropy's normal default or memory blowouts may occur.