Basic Concepts 

 

Overview 

In this guide, we will explore the fundamental concepts of Ornatrix to help you begin creating grooms. By the end of this guide, you will have a solid grasp of the Ornatrix hair stack, operators, hair interpolation, hair distribution, and a better understanding of common hair workflows in production. Following the exploration of these basic concepts, we will proceed to create our first groom, animate it, render it, and then delve into some best practices and recommendations to enhance your hair creation experience in production.

Note: Throughout this guide, the terms "Modifier" and "Operator" will be used interchangeably.

 

The Hair Stack 

Ornatrix hair is often composed of one or more operators, represented as 3ds Max modifiers, applying changes one after another to create procedural effects. Selecting a hair object in the scene will reveal its hair stack in the modifier stack:

A Hair Object is composed of multiple operators/modifier and each operator is connected to the next to create the final groom. An operator generates or modifies some data, passes this data to the next operator for modification and so on, until the data flow reaches the final output, generating the final hair object. At any point in the stack, you can add, delete and reorganize the operators. Changing any parameter will trigger a recompute in the stack, propagating the new data across the stack, going through each operator from the point of modification to the top. New operators can be added using the Ornatrix menu on the main 3ds Max menu.

 

Guides From Mesh 

In this example, Guides from Surface is the first operator inside the hair object stack. This is hair object was created by selecting a polygon mesh and using the Add Hair To Selection command from the Ornatrix menu and choosing the default Fur Ball preset. Usually this is the point where you start making your groom, but we will see other methods in this introductory guide.

The Guides from Surface operator in this example is responsible for generating root data using one of the available root distribution methods, creating guides and scattering them on a mesh. FInally, this data (the generated guides) is passed to the next operator to perform further modifications.

Besides the Distribution Methods, several parameters are available to tweak the final result. For example, the Guide Length parameter determines the length of the hair guide, or you can connect a texture map to the Distribution Map slot to determine the distribution area, where black values equal to 0 guides.

 

Edit Guides 

Edit Guides is the grooming operator for guides/strands. It allows you to tweak the guides generated by Guides From Mesh by brushing, creating and deleting guides, grouping, painting and perform other operations which are done by hand instead of parametrically.

[Edit Guides Video]

Edit Guides provides three different editing modes that allows you to interact with the guides in different ways:

Root mode
Allows you to select and manipulate the guides based on their roots.

[Root Mode]

Strand mode
Allows you to select and manipulate the guides as a whole based on the guide vertices.

[Strand Mode]

Brushing mode
Brushing mode is where you perform all the brushing. This method provides a set of brushes that allow you edit the hair in different ways using brushes and other tools like Strand Groups and Strand Channels. The the brushes can be found in Edit Guides. The available brushes are:

[Brush Types]

  • Selection Brush
    Use it for strand selection.
  • Move Brush
    Use it comb the hair.
  • Rotate Brush
    A rotation is applied to the strand in the opposite direction of the brush stroke and using the first vertex point that is inside the brush radius as pivot, creating a curve effect.
  • Scale Brush
    The guides inside the brush radius are attracted to or expelled from each other.
  • Cut Brush
    Cut the guides inside the brush radius.
  • Length Brush
    Enlarge or shorter the guides while respecting the limits established in the Brush Min Limiter and Brush Max Limiter parameters.
  • Paint Brush
    Use this brush to paint Per-Root or Per-Vertex Strand Channels that can then be used for shading or to drive all kind of Ornatrix operator effects.
  • Grab Brush
    Similar to the Move brush but only the strands that are initially inside the brush radius will be grabbed and dragged with the brush locator.
  • Revert
    Sets the strands vertices to its initial state before the current Edit Guides operator. In essence, this brush is like an eraser, reverting any changes made to the strands by other brushes.
  • Pull Brush
    Pull the strand vertices away from the distribution mesh eventually straightening them.
  • User Defined Brush
    Allows you to load your own custom brushes defined using Ornatrix's Python API. There are two custom brushes available: Clump brush and Move brush, both of which you can find the Python scripts in the scripts/brushes directory of your Ornatrix installation. For more information on user defined brushes see Writing Plugin Brushes.

Ornatrix brushes can be used with different shapes like: Circle, a Square or a Line. The line is specially useful with the Cut brush to make straight cuts to the hair.

[Brush Shapes]

All Ornatrix brushes share the same tool context, thus most brushes share the same settings.

[Brush settings]

The brush settings can be found in Edit Guides, and each brush will expose its settings there as well.
In general, brush settings names are descriptive enough to understand what they do immediately. In the settings section you will find the tipical parameters to change the brush size and strength, and check boxes to activate different features. The ones that you will be using the most are:

  • Use Brush Surface
    When this options is ON, the brush strokes are projected onto the distribution surface. This mode can be used to constrain the brushing changes to make hair or fur flow along the character's mesh surface. Otherwise the brush strokes will modify the hair strands in the screen direction.
  • Affect Selected Only
    Ensures that only the selected strands are affected by the brush actions.
  • Optimize Strand Geometry
    When on, a special algorithm is used for comb, grab, and smooth brushes which affects the whole strand alone its length by calculating the best fit to current stroke while minimizing changes to the strand shapes.
  • Brush Mirror Axis
    Select the axis to mirror the brush actions. Changes made in one side of the hair will be reflected in the opposite side in real-time. This feature works the same with all the brush types. This is very useful when you need a symmetrical hair or fur.
  • Brush Attenuation
    This section includes two ramp curves that allow you to tweak the brush strength attenuation and the strand strength attenuation along the strand, from root to tip.

[Brush Attenuation]

See the Edit Guides documentation for a more in depth description of all the brush settings.

Strand Groups

In the Strand Groups section you can quickly create and assign groups to the hair guides. Strand groups work like masks. They allow you to sort your strands into distinct regions which can then be used to selectively apply operators down the evaluation pipeline.

When you turn On Use Strand Groups, the controls to create strand groups will be unlocked. This section also provides options to select strand groups by its integer number (or ID) and select all the strands that belong to a group by using the Selection Brush or the selection options available in Root and Strand editing modes. To create a strand group, select some guides and click the Assign Unique button. For more information see Working with Strand Groups

Strand Channels

Channels allow users to add extra data to guides that can be used later on. There are two types of guide channels used by Ornatrix: Root and Vertex channels.

Root channels hold a single data value per every root (strand). This is a compact way of defining information that is uniform for every strand. It can be very effective for controlling properties that usually don't vary along strand length (such as hair density and dynamics properties).

Vertex channels hold Per-Vertex data. Every knot that defines the shape of every strand will have a value attached to it. This is more memory consuming than root channels and it allows you to control anything at any point on the hair model. Vertex channels can be useful to control clustering, frizz, and hair shading. See Working with Strand Channels for more details.

To create a strand channel manually:

  1. Enter Brush mode to see the Channels section.
  2. In the Strand Channels box select --Per-Strand Channels-- to create a Root channel or --Per-Vertex Channels-- to create a Vertex channel and click the Add button, enter a name for your channel and click OK. The best strategy is to name channels according to their purpose, and organize so you know clearly which channel performs which operation.
  3. Switch to the Paint brush, use the Current Channel Value slider to choose a gray scale value between 0 and 1.
  4. Select the newly created channel and use the brush to paint them.

Painting a Per-Vertex Channel
  1. Alternatively you can select some strands in Root editing mode, or using the selection brush in Brush editing mode,
  2. Use the Current Channel Value slider to choose a gray scale value between 0 and 1.
  3. And click the Assign Value to Channel button.

You can also add Edit Guides on top of Hair From Guides to create channels directly on the final hair strands, however this method is more memory consuming. Guide channels can also be procedurally generated, visit the Generate Guide Data Modifier documentation page to learn more.

 

Hair From Guides 

This operator is used for hair root distribution and hair interpolation. See the Root Distribution and Hair Interpolation section to learn more. Hair From Guides is responsible for generating dense hair based on the guide data passed by Guides from Surface. The hair interpolation is performed using one of the several hair interpolation algorithms available in Ornatrix.

Hair From Guides UI is very similar to Guides From Surface, but the first includes extra parameters for hair interpolation, parting and other parameters exclusives to hair generation.

Distribution Settings

The following is a list of the distribution settings that you are most likely to use in your first groom. The rest can be found in the Hair From Guides documentation page.

  • Render Count
    Specifies the total number of roots to generate during rendering.
  • Count Fraction
    Specifies the percentage of roots to generate inside viewports based on the Render Count.
  • Use Render Count
    When ON, the total amount of hairs specified in Render Count will be displaced in the viewport.
  • Distribution Multiplier
    An optional multiplier map for hair density on the surface. A texture map with black and white values, the hair will only be generated on areas painted in white.
  • Distribution Channel
    As explained in Working with Strand Channels and Strand Channel Selection List you can use channels in Hair From Guides as well. For instance, you can create a channel to allow hair interpolation only among a group of hair guides. Guides painted black will not produce hair while white values will produce hairs.
  • Displacement Offset
    An optional offset along surface normals of generated guides. Allows you to push away guides from the surface if needed. This is useful when your base model is using a displacement map that makes its surface drastically different from the viewport low poly version where you are creating your groom. Connect your displacement map in this slot to conform the hair strand roots to the displaced version of your base model.
  • Remember Root Positions
    This option will cache the root positions of rendered hairs. This ensures that the generated hair will remain consistent among shots rendered on different computers since random generation algorithms can vary across hardware. It is a good practice to enable this option when rendering hair on a render farm. Disabling this option will clear the cache. The cache with the root positions will be stored inside the scene by default, but you have the option to store it in a file somewhere in your hard drive in .abc format.
 

Change Width 

Determines the hair strand width at render time. It gives you direct access to the width values stored inside the hair object, this ensure consistency across all render engines and operators.

Missing Something? Let us know if this page needs more information about the topic.