Guides from Surface Modifier 


Converting a mesh into guides by planting roots and making strands that are initially oriented using surface normals

Guides from surface modifier allows for creation of guide hair based on a polygonal mesh, or a parametric surface (such as NURBS or patches). Distribution parameters can be tweaked to get different distribution types. This modifier goes through the mesh and 'plants' roots onto it, sort of like a particle emmitter compute particle spawn positions. Then it extrudes guides from every root based on the surface normal at the root origin.
Guides from surface modifier converts a mesh object into guides that can be used by Ornatrix. Generally one would make a reference copy of their mesh to use as the distribution surface for hair. That way referenced hair deforms with its target (original mesh) and can be freely modified by Ornatrix.

The user also has an option to plant guides only in certain areas on the mesh. These can be assigned either with a material ID or using a distribution map. Although this isn't necessary since hair from guides is usually what ultimately defines the final result, it is usually a good idea since you do not need to edit guides which will not be used in the end. You may also apply guides to only selected faces on the mesh.
One of the undefined parameters is the guide twist. Because hair is cylindrical in its structure, canonical twist is usually not important. However, when you are dealing with billboarded or proxy meshes later on, twist becomes of significance. By default hair twist is generated such that its global orientation is constant. However, when surface starts deforming the twist can change because hair's global orientation changes. To combat this, there is an option to orient every strand based on underlying surface topology rather than a global direction.

 

Parameters 

  • Distribution
    There are several distribution methods for spreading guide/hair roots along the surface available:
    • Uniform
      Roots are placed in a linear manner forming a 'grid' around the mesh. This can be useful while creating brush patterns where hair has been planted artificially.
    • Random (area-based)
      Roots are created randomly, and the amount of roots per face is calculated based on the total area of all faces on the mesh. Therefore all roots will be distributed evenly and randomly throughout the mesh. You can control the random factor through the seed value. Same seed values will produce similar results.
    • Random (face-based)
      Same as above, except the amount of roots per face is the same for every face on the mesh. Therefore larger faces will tend to have sparser root placement, while smaller ones will have roots more clustered in one spot.
    • Random (UV-based)
      Same as area-based approach, except this time instead of calculating area for every face, UV area of faces is calculated. This allows user to control the distribution by maintaining UVW coordinates on the mesh. It is possible to unwrap a character, for example, and have dense placement of hair in some spots than the others by stretching out those areas in the UV editor.
    • Parametric
      This distribution will only work with parametric surfaces. It simply places roots randomly throughout the whole surface so even distribution is guaranteed.
    • Face Center
      Roots are placed at the center of each triangle.
  • Root count
    Specified the 'desired' count of strands. The word desired is used because if a distribution map is used, or UV coordinates replace world coordinates in distribution, hair isn't always guaranteed to have the exact number of specified roots since it could get excluded during generation process.
  • Topology-based If this option is on, hair twist is fixed and oriented with the topology of underlying surface. This ensures that the twist will stay glued to the mesh even if it deforms. Read above for more details on this.
  • Guide length, randomness
    Controls the initial length of guides. Initially all guides are aligned along surface normal and thus guide length simply implies that final strand direction will be surfNormal * guideLength * random(1,1-randomness)
  • Num. pts
    Specifies the initial strand detail. This can be changed later on with the detail modifier. Minimum number of points required to define a line (strand) is 2.
 

MaxScript Access 

This modifier can be accessed using standard MaxScript properties. Use showProperties modifierInstance method to get a complete list of available properties.

 

Examples 

You can find examples on usage of this modifier by examining the unit tests in Test_GuidesFromMeshModifier.ms.