Moov Hair Physics 

 

Overview 

Moov Physics is designed to provide the artist and TDs with different algorithms to simulate hair movement. This node provides a simple interface to work with hair simulation in real-time and a set of Python scripts to add new controls and expand its functionality. TDs have the possibilities to expand MoovPhysics developing their own Python scripts to achieve even more complex and accurate simulation. Contrary to our Dynamics Operator, Moov does not depend on nVidia Flex and can be used in any OS or graphic card.

 

Videos 


Moov introduction tutorial (Part 1)

Collisions (Part 2)
 

Moov Simulation Controls 

 

Python File Name and Reload button 

File name of the Python script for the simulation. This document refers to the parameters of the default Moov script that is loaded when a new node is created; different scripts may create a different set of simulation parameters. The script is stored and saved with the Maya scene; if the script on disk is changed (by an Ornatrix update or otherwise), Reload has to be pressed to update the script in the scene.

 

Initial state buttons 

 

Capture Initial State button 

Captures the current state of the solver and makes it the initial state of the simulation. If an initial state already exists, it is replaced. At first animation frame, the simulation state is reset to the initial state.

 

Remove Initial State button 

Removes the current initial state. At the first animation frame, the simulation is initialized from the previous node in the stack.

 

Simulate Rest State button 

Starts an internal simulation, detached from the Maya GUI, and runs it until the particle position changes fall below the threshold (currently 0.1). The resulting state is set as the initial state of the simulation.

 

Force Fields 

Used to add/remove Maya force field objects to the simulation. To do that, first add the force field object to the scene, then add it to the simulation using the Add Force Field button

 

Collision Meshes 

Used to add/remove Maya meshes to the simulation. First add the mesh to the scene, then add it to the simulation using the Add Collision Mesh button.

Notes:
  • Meshes added here will participate in collisions only if "Collide With Meshes" is set in Moov Simulation Parameters.
  • The base mesh of the hair system cannot be added in this conrol. To enable collisions with the base mesh, set "Collide With Base Mesh".
 

Moov Simulation Parameters 

 

Solver Parameters 

 

Substep Count 

Number of simulator steps within a single animation frame. Larger values lead to slower simulation, more accurate collisions, and stiffer constraints (except in compliant models, which are less affected by this parameter).

 

Iteration Count 

Number of iterations in constraint projections. The difference with the previous parameter is that this one only affects the constraint response (not collision detection). More iterations means slower simulation (although the effect is smaller than the previous parameter) and stiffer constraints (up to a certain number of iterations; after that the constraint response is saturated).

 

Velocity Limit 

Maximum speed of particles in the solver. Use to impose a speed limit on fast-moving hair simulations.

 

GravityY 

Vertical gravitational acceleration. Use to impose appropriate length units in the scene: e.g. if the scene units are centimeters, set this parameter to -981 (cm/s^2); if the scene units are meters, set it to -9.81 (m/s^2).

 

Hair Model Parameters 

 

Lattice Count 

Number of simulation particles corresponding to each hair vertex. LatticeCount = 1 corresponds to simple longitudinal particle chains. A lattice can be used to simulate some twist response in models with only distance and bending constraints (i.e., non-Cosserat and non-elaston models). Cosserat models are preferred for applications where twist is important (e.g. propagated strands).

 

Lattice Size 

Distances between the particles of a lattice node (corresponding to a single hair vertex). To have meaningful lattice twist, the LatticeSize value has to be comparable to the distance between neighbour strand vertices.

 

Lattice Stiffness 

Stiffness parameter of lattice nodes (used for constraints within a single lattice node).

 

Stretching Stiffness 

Stiffness parameter controlling longitudinal strand stretching. Should be between 0 and 1.

Notes:
  • In compliant models, stiffness is unbounded; so any positive value can be put in here. However, internal scaling is applied so a stiffness of 1 results in maximally stiff strands; setting larger values is unlikely to have any effect.
 

Bending Stiffness 

Stiffness parameter controlling strand bending. This is applied to any constraints that serve to limit strand bending, depending on the model. In Cosserat models, this is also the twisting stiffness.

 

Model Type 

Determines the constraints applied to the hair particles. See the overview of hair model types.

 

Limit Stretch LRA 

Creates Long-Range-Attachment (LRA) constraints to limit strand stretching. LRA constraints are distance constraints linking all strand particles to the root. They react only to stretching (not compression) and allow for 10% length increase before they kick in. The constraint stiffness is taken from the StretchingStiffness parameter.

Notes:
  • Should we have GUI for tuning of LRA stiffness and overstretching?
 

Gravity Scale 

Scales the gravitational field felt by the hair. Use this parameter to modify the stiffness response when the StretchingStiffness and BendingStiffness do not allow sufficient flexibility in hair setup. For example, if the hair is too stretchy even at maximum stiffness, increasing this parameter will lead to stiffer strands. Note that this parameter affects only the stretch of free-falling hair. Inertial stretch (i.e. stretch due to a fast-moving base mesh) is not affected.

 

Mass Per Vertex 

Determines the mass of hair particles. Particle mass determines the response to:
  • force fields,
  • AttractToInitialShape springs,
  • compliant constraints (the ones in compliant models, and LRA constraints).
Notes:
  • The strand stiffness in non-compliant hair models is not affected by particle mass.
 

Drag 

Multiplies the velocity of each particle at each simulation step. Should be smaller than 1 to avoid instabilities. Use to introduce damping (energy loss) in the system; the smaller the value, the larger the damping.

 

Attract To Initial Shape Parameters 

 

Attract To Initial Shape 

Creates springs that attract each strand to its initial shape.

 

Attract To Initial Shape Stiffness 

Determines the spring stiffness. Unlike constraint stiffnesses, this value can be arbitrarily large.

Note:
  • For consistency with other stiffness parameters, internal scaling is applied to make sure that values of 0-1 are meaningful. The scaling constant can be changed to obtain satisfactory defaults.
 

Collision Parameters 

 

Collide With Base Mesh 

Turns on collisions between hair particles and the base mesh.

 

Collide With Meshes 

Turns on collisions between hair particles and collision meshes added in the CollisionMeshes box.

 

Collide With Hair 

Turns on hair-hair collisions. These are implemented by creating capsules for each hair segment. Capsules can only collide with each other.

 

Collide With Hair Radius 

Defines the radius of hair strands for hair-hair collisions.

 

Group Holder Parameters. 

The group holder creates constraints to hold together each group of strands. The constraints are created between randomly selected particle pairs within a certain range of strand vertex indices (min and max position).

 

Group Channel 

Selects a channel containing strand groups.

 

Group Holder Pos Min 

First strand vertex index (from root to tip) of the group holder.

 

Group Holder Pos Max 

Last strand vertex index (from root to tip) of the group holder.

 

Group Stiffness 

Stiffness of the group holder constraints.

 

Group RandomSeed 

Random seed for choosing the particle pairs for the group holder.

 

Group Max Constraints 

Maximum number of constraints per strand group.

 

Overview of hair model types 

Here is a basic benchmark for a hair simulation (rev. 13883) with the main hair models. The simulation has 300 guides with 10 points per guide and runs over 100 frames in the Maya GUI; all parameters are script defaults except the model type.

The total time difference between the fastest to the slowest model is about 13%; the difference in solver running time is more substantial (about 25%). The differences between compliant and non-compliant versions of different models are negligible; using the compliant versions is recommended.

 

Distance Only 

A model using only distance (spring) constraints. Constraints are created along each strand between first neighbours (to control stretching) and second neighbours (to control bending), with the corresponding stretching and bending stiffnesses.

This model is the fastest, but has somewhat unrealistic bending (strands tend to buckle). To add some degree of twisting response, it is necessary to create a lattice.

 

Distance Bending 

This model uses distance constraints between first neighbours to control stretching and three-particle bending constraints at each strand vertex for bending control.

Bending is more realistic than the DistanceOnly model, but hair tends to be too stretchy. Similar to the previous model, a lattice is needed for twisting response.

 

Cosserat 

Uses two-particle stretch-shear and three-particle bend-twist Cosserat rod constraints, with the corresponding stretching and bending stiffnesses. Slower than the previous models, but the strands have full elastic response.

 

Cosserat Distance 

Like Cosserat, but creates additional first-neighbour distance constraints to control overstretching.

 

Compliant Distance 

Like DistanceOnly, but uses compliant distance constraints. Compliant constraints are more stable than their non-compliant versions. The essential differences in dynamic behaviour are:
  • stiffness is not affected (less affected?) by the simulation step (and the SubstepCount parameter);
  • particle mass affects the constraint response (e.g. a larger attached mass makes the constraint stretch more).
 

XCosserat Distance 

Compliant version of CosseratDistance.

 

Cosserat Elaston 

Testing version of Cosserat constraints for oriented particles (elastons). This is still unstable.

 

Terminology 

Lattice:

Particle:

Root:

Layer:

Mass:

Force:

Friction:

Constraint:

 

Sample scene 

A sample scene with a simple Moov simulation can be downloaded from HERE. The scene contains the finished curly hairstyle used for the tutorial found HERE.

The operator stack includes the Moov operator working on top of the guides and the operators that generate the hairs and hair details are deactivated to speed up the simulation. On top of the Moov operator is an Animation Cache Operator that can be used to record the simulation to an .abc file or load the .abc file included in the zip file. The included cache file includes a hair animation recorded using the Moov settings found in the sample scene.

After recording the simulation you can turn on the all the operators to see the finished project.

 

Related Topics 

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

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