Strand Dynamics


Download this Strand Dynamics Video (http://softimage.wiki.softimage.com/ice_compounds/Particles_Strands_Strand_Dynamics.zip)

In this video, Phil Taylor discusses how to set up basic ICE hair strands using the strand dynamics compounds that are now in Softimage.

Table of contents

Example: Hairy Little Monster

To illustrate how to use strand dynamics, here's a simple example to follow to give some hair to a little monster affectionately known as "Gorg".

Creating dynamics on strands involves three basic steps:

1. Emit guide strands on one point cloud.

2. Create the simulated dynamics framework on the same point cloud.

3. Emit filler strands on another point cloud. Filler strands are optional, but you may find them useful in many circumstances.

Guide and filler strands are similar in theory to how guide and render hairs in the hair system work: the guide hairs are used for styling, and the render hairs are generated from and interpolated between the guide hairs and are used for rendering.

The filler strands are interpolated between guide strands that are created on another point cloud, but on the same emitter. These filler strands are constrained to the main (guide) strands so that they follow both their shape and their movements.

For more information on strands in general, see ICE Particle Strands (http://softimage.wiki.softimage.com/xsidocs/ipart_strands.htm).


Image:fb0bde79.jpg


Load the Model and Create a Weight Map

1. Load the model in the Hairy_Creature scene (courtesy of Greg Punchatz) that’s available in the Softimage installation Data\XSI_SAMPLES\Scenes\Modeling folder.

2. Create a weight map for Gorg's body (see below).

This will be used as a Length Weight Map for the strands, much like how a Cut map works for hair: the weight map values determine the length of the strands. Try smoothing out the edges of the weight map so the hairs become gradually shorter there.

Emit the Guide Strands

3. Create a point cloud to be used for the guide strands.

4. Create an unsimulated ICE tree in the Modeling region of this point cloud’s construction stack above all topology modifiers.

5. Create strands in this ICE tree using the Emit Strands compound, which emits particles from a surface, creates strands from them, and then initializes many strand attributes for them.

By emitting strands in an unsimulated tree, the playback and interaction is faster because they are not simulated each frame.

You can emit a smaller set of guide strands to work with when you’re testing the movement of strand dynamics and creating the strand shape. When you’re ready to view and render the strands, increase the number of guide strands and add the filler strands. Unlike guide hairs, the guide strands are rendered unless you choose to not render them.

6. Add a Get Data node for the Gorg's body and plug it into the Emitter port on the Emit Strands compound to be the emitter object.

7. Connect any nodes to the Emit Strands compound that you want to use to shape the strands.

The Curl Strand compound is used here to add a bit of wave to Gorg’s hair, but you can use any of the strand shaping compounds, such as Bend Strand or Turbulize Strand.

Be aware that the strength of any gravity and drag forces you apply will change the initial strand shape when dynamics are applied; that is, you will probably have to increase the strength of the curl or turbulence to still see its effect after forces are applied.

Image:fb0bf038.jpg

Default guide hairs are created all over Gorg using the default shape.

Image:fb0befb6.jpg

8. Change the default particle shape used for the strands from Capsule to Segment. To do this, you need to open up the Emit Strands compound to edit it.

In the Emit from Surface compound inside, change the Shape value to Segment, then close the Emit Strands compound.

9. In the Emit Strands property editor, define the weight map you created earlier as the Length Weight Map to determine the guide hairs' length.

Image:fb0be62f.jpg

Create the Simulated Strand Dynamics ICE Tree

10. Using the same point cloud as the strands, create a simulated ICE tree and connect the Strand Dynamics Framework compound to this ICETree node.

11. Get a Get Particle Emit Location node and plug it into a Set Data node, specify "Self.PointPosition", and then plug the Set Data node into a port at the top of the ICETree node. If Gorg starts running around later, this keeps the particle strands constrained to him (the particle's emit location).

12. Add any forces you want to the Strand Dynamics Framework compound. You can use either the Strand Gravity Force or Strand Drag Force compounds that are designed specifically for strands.

13. Connect any collision objects you want to the Geometry ports on the Strand Dynamics Framework compound.

Here, Gorg’s body was added as a collision object, as well as his two horns.

Image:fb0be469.jpg

Emit the Filler Strands

The filler strands are interpolated between guide strands using the same emitter. Filler strands are constrained to the main (guide) strands so that they follow both their shape and movements. They are also constrained to the emit location of the guide strands.

The filler strands need to have the same number of segments (Num Segments) as the guide strands to which they are constrained. If not, their StrandPosition arrays will not match and the strand size, among other things, won’t be considered.

You can create several point clouds as filler strands, each having a different shape, size, color, and shader setup, such as for creating varying types of animal fur or colored streaks in hair.

14. Create another point cloud to be used for the filler strands.

15. Create either an unsimulated ICE tree in the Modeling region or a simulated ICE tree (in the Simulation region) of this point cloud's contruction stack, depending on your scene:

  • If the emitter object is not animated by deformations or transformations, you can create an unsimulated ICE tree.
  • If the emitter object is animated by deformations or transformations, you need to create a simulated ICE tree. This updates the position of the filler strands at every frame so that they match the guide strands to which they are constrained. Using a simulated ICE tree for the filler strands should not slow down the simulation too much because the filler strands’ stack needs to be re-evaluated anyway every time the guide strands move due to dynamics.

If you like, you can optimize the simulated ICE tree by opening up the Emit Filler Strands compound and splitting it into two parts: put the actual particle emission nodes in the Modeling region and put the Constrain to Guide Hairs compound in the Simulation region.

16. Get the Emit Filler Strands compound and plug its output into a port on the ICETree node. As with the guide strands, the filler strands are emitted in an unsimulated tree so that playback and interaction is faster.

17. Add a Get Data node for the emitter object and plug it into the Emitter port on the Emit Filler Strands compound. The emitter object should be the same one that is used for the guide strands.

18. Add a Get Data node for the guide strands that you created earlier and plug it into the Guide Strands port on the Emit Filler Strands compound.

Image:fb0be4d1.jpg

Default filler hairs are created all over the object because the weight map isn’t connected yet, which you'll do below.

Image:fb0bf093.jpg

19. Change the strand’s Size and Color to what you want, and remember to use the same Num Segments value for these filler strands as you have set for the guide strands.

20. Change the default particle shape used for the strands to Segment. To do this, open up the Emit Filler Strands compound to edit it. In the Emit from Surface compound inside it, change the Shape value to Segment.

21. To use the same weight map on Gorg for the filler hair growth, keep the Emit Filler Strand compound open for editing. Inside this compound, plug a Filter by Weight Map compound into the Emit from Surface compound. Specify Gorg’s weight map in the Filter compound, then close the Emit Filler Strands compound.

Image:fb0be6c1.jpg

Tips:

If you like, you could create another point cloud and ICE tree to create more filler strands. You may want to do this to create a different set of colored hairs or use different hair strand shapes.

You could also create another weight map to have a different length of hairs, just in certain parts of the body, such as a bit of fuzz around the face, or a longer mane down the spine.

To keep the filler strands further away from the body, there are a few things you can tweak:

  • Increase the amount of drag or gravity from the forces.
  • Increase the Collision Offset, Stiffness, and Num Iterations values in the Strand Dynamics Framework compound. Increase the Num Iterations carefully, as it can quickly increase the playback time.

22. In the render tree, attach the appropriate shaders to the guide strand and filler strand point clouds as you like.

Gorg was rendered using the Hair Gradient Material shader, but you can use any surface shader you like. You could also create volumetric strands using the Particle Renderer shader compound or the Particle Volume Cloud shader.

For information on rendering strands, see Viewing and Rendering Strands (http://softimage.wiki.softimage.com/xsidocs/fb777394.htm).

Image:fb0be009.jpg

Using the ShapeSizeAbsolute Attributes to Render Segments

With strands, the Segment and Point shapes are a little different from the other shape types. They render strands with a constant raster space width; that is, strands far away from camera are rendered with the same raster space thickness as strands that are close to the camera.

If you want to have the strand thickness in actual Softimage units when using either the Segment or Point shapes, you can set the ShapeSizeAbsolute attribute in a Set Data node to control the particle Size and/or StrandSize attributes.

Don’t forget to activate this attribute once you’ve set it in the Set Data node! Then set the particle Size and/or StrandSize attributes as you like to get the desired thickness.


Image:fb0c18bb.jpg


Here we have Gorg with strand hair that uses the Segment shape type. The ShapeSizeAbsolute attribute is set as shown in the ICE tree above. Notice how the strands’ size remains absolute whether the strands are far from the camera or close to it.

Image:fb0c185f.jpg

This page was last modified 20:37, 14 Dec 2010.
This page has been accessed 26907 times.

© Copyright 2009 Autodesk Inc. All Rights Reserved. Privacy Policy | Legal Notices and Trademarks | Report Piracy