Cinema - Maxwell Hair Tag

The Maxwell Hair tag, when applied to a Cinema hair object, exports hair using the MaxwellHair extension (or optionally, one of the Maxwell Grass extensions, rendering grass blades instead of hair).

Primitive

These parameters control the size and type of hair strands (or grass blades) that will be rendered.

ParameterDescription
Root Width

Sets the width, in mm, of the root of each hair (or blade).

Tip Width

Sets the width, in mm, of the tip of each hair (or blade). The value used should be smaller than the Root Width value.

Type

This controls the type of hair primitive rendered. The Cylinder type is the standard round hair primitive. The Flat type uses the Maxwell MGrassP grass extension, which renders segmented grass blades, and is the fastest-rendering blade type. The Curve type uses the Maxwell MGrassH extension, which renders blades as analytical curves; this produces the highest-quality blades, which are curved smoothly regardless of the distance from which they are viewed, but which take somewhat longer to render.

Export Options

The only options, currently, are concerned with hair root UVs, which can be exported according to the domain of the hair bounding box, or based on the UVs of a certain object.


Raytrace UVs

Enables or disables the tracing of hair root UVs based on the object linked in the UV Source object. Note that it can take considerable time to trace UVs for hair, and that the time taken will increase, the more polygons that the UV Source object has. If root UVs are not required, it is recommended to disable this option.


Max. Distance

This controls the maximum distance for the ray test, in model units. For example, here is hair being generated on a plane, but tracing its UVs from a tilted disc:



Setup



Max. Distance = 65 cm



Max. Distance = 100 cm


UV Source

When the Raytrace UVs option is enabled, the object linked here will be used to generate root UVs for the exported hair. For example, here are 100K hairs, with UV Source linked to a texture-mapped plane, with Raytrace UVs disabled and enabled:



Viewport



Raytrace UVs Disabled



Raytrace UVs Enabled


The object hierarchy being rendered above is this:


     


As shown in the above images, with Raytrace UVs disabled, hair root UV coordinates are generated based on the bounding box of the hair. With it enabled, the first segment of each hair is traced backward to the UV Source object in order to find UV coordinates for the hair.

The images also demonstrate how UVs for hair are mapped. In Maxwell, textures are mapped to hair length and root by assigning them to texture Channel 0 and 1. The material being used above consists of two layers, each with two BSDFs. Each layer uses the same black-to-white gradient texture, on texture Channel 0, and inverted in one of the layers. Each pair of BSDFs is identical, with the Reflectance 0° color of one being set to red and the other to blue. Using a checkerboard texture in each BSDF's Weight map, mapped on texture Channel 1, the above pattern is produced.

Here is an example file (R15) that demonstrates the above-described scenario.