Setting up nConstraints

 
 
 

In this section of the lesson, you tie up the middle section of the beaded curtain by first modeling the Start curves into a bound position, and then creating an nConstraint to hold the curves. To keep the curves in place during the simulation, you use a Component to Component nConstraint to connect selected CVs on the hair curves together.

To model the curtain into a tied-back position

  1. Dolly and tumble in the scene until you are facing the curtain directly.
  2. Rewind to the start frame of the simulation.
  3. Drag to select all the hair curves and then select nHair > Convert Selection > To Start Curves.
  4. Select the seven curves that make up the middle of the curtain.
  5. Select nHair > Modify Curves > Lock Length.

    This ensures the entire curve is modified when you transform CVs in the next steps.

  6. In the Status Line, click the icon to display the CVs on the curves.
  7. Select the middle three rows of CVs on the selected hair curves.
  8. In the Toolbar, select the Scale Tool and use it to scale the CVs inwards so the hairs are pulled together.

To constrain the curtain in the tied-back position

  1. Select only the middle row of the previously selected CVs.

    You will use an nConstraint to connect these components together.

  2. To constrain the CVs together, select nConstraint > Component to Component.

    All of the selected CVs are now linked together by the constraint.

    In the Outliner, a dynamicConstraint node appears. This node carries all the nCloth, nParticle, and nHair constraint attributes.

  3. Click the icon on the Status Line to display the Start curves
  4. Drag around the hair curves and select nHair > Display > Current Position.
  5. Play the simulation.

    When you play the simulation, notice that the curves are not pulled together tight enough to resembled a tied curtain. For example at frame 45 of the simulation, the curves are constrained, but they do not touch each other.

    You can make the simulation look more realistic by further adjusting the nConstraint attributes.

  6. Rewind the simulation to the start frame.
  7. In the Connection Density Range section of the dynamicConstraintShape node Attribute Editor, set the following:
    • Strength to 50.

      This setting increases the strength of the connections between the CVs so that the curves are held tighter together.

    • Rest Length Scale to 0.5.

      This setting decreases the length of the constraint connections at the start frame of the simulation.

  8. Play the simulation.

    With the new settings, at frame 45, the curves are held closely together by the nConstraint.

    Notice that when you play the hair simulation, the animated sphere collides with the curtain while the curves are still moving from the effects of Nucleus gravity. You fix this by setting a new Start Position for the hair curve so they are stationary at the start frame.