Making hair collide with another object

 
 
 

By default, nHair collides with other Nucleus objects, such as nCloth, nParticles and passive collision objects that are assigned to the same solver. In this section, you convert the sphere to a passive collision object. You then set hairSystemShape node attributes, such as Compression Resistance and Bend Resistance, to improve the behavior of the hair curves when they collide with the sphere.

To convert the sphere to a passive collision object

  1. Rewind the simulation to the start frame.
  2. In the scene, select the sphere.
  3. Select nMesh > Create Passive Collider > .

    The Make Collide Options window appears.

  4. In the Make Collide Options window, ensure that Solver is set to nucleus1.

    Since the nHair curves already belong to nucleus1, assigning the passive collision object to the same Nucleus node means that the objects are part of the same Nucleus system. In addition to colliding with each other, Nucleus objects assigned to the same solver are affected by the same Nucleus node settings. For example, increasing the Nucleus Gravity or Wind Speed would affect the nHair as well as the passive collision object.

  5. Click Make Collide.
  6. Play the simulation.

    The sphere collides with the curtain, pushing the strands of hair aside as it passes through.

  7. Rewind the simulation to the start frame

You can improve the behavior of the hair curves when they collide with the sphere by adjusting hairSystemShape node attributes such as Compression Resistance and Bend Resistance.

To enhance the curtain for collisions

  1. In the Outliner, select the hairSystem node.
  2. Click the icon to open the Attribute Editor.
  3. In theAttribute Editor, click the hairSystemShape1 tab.
  4. In the Dynamic Properties section, set Compression Resistance to 2.0 and Bend Resistance to 0.1
  5. Play the simulation.

    The new settings decrease the nHair's resistance to collisions, making the curves react more realistically when they collide with the sphere.

    In the next section of the lesson, you a assign Paint Effects brush to the hair curves to create beads on the curtain.