Strands are a little different from regular particles when it comes to viewing and rendering them. This section describes some of the issues that you need to understand about strands.
You can select any particle Shape type you want to use for creating strands (see ICE Particle Shapes). This shape is repeated along the strand's length (one shape per segment). All shape types are supported, including instanced geometry (see ICE Particle Instances).
The Segment shape renders particles as strands by drawing a constant line from each point position through each strand position point along the length of the strand. You can easily simulate hair using this shape type.
In the viewport, strand are displayed as lines with one particle at the end of each shape, regardless of the shape you've chosen. If you want to see what the strands will look like rendered using, you need to draw a render region.
On the left, what sphere-shaped strands look like in Shaded view in the viewport. On the right, what the same strands look like when rendered with a volume shader. |
Here are what some of the other strand shapes look like when rendered:
Displaying the Strand Shape for Visualizing
Working with strands can be difficult because the actual shape of the strand is unknown until render time, especially if you change the strands's profile curve, as in the Create Strands compound. The Display Strand Shape compound builds cross-sectional hull lines to display an approximation of the actual shape of the strand volume in the viewport without needing to render.
The compound cannot determine the shape used by the particle, so you must manually set it.
To use this compound, create strands as usual, then plug this compound's Execute output into a PostSimExecute port on the Simulation Root node or in a port on the ICETree node.
Strand with altered shape profile uses Display Strand Shape to help visualize its rendered volume.
Strands are converted to mental ray primitives at render time: the mi_hair primitive is used for the Segment shape, and the geometry primitive is used for the other shapes.
You can use either surface or volume shaders on strands, depending on the shape type you're using and the effect that you want (see below).
Remember that if you're using instanced geometry for the strand shape, you need to use a surface shader to render the geometry.
Using the Particle Color for Rendering Strands
To use the strand's particle color in the render tree, you can use the Color Attribute shader, as described in Using the ICE Particle Color in the Render Tree.
If you want the strands to use a color other than the particle's, you can use either surface or volume shaders on the strands (see below) or set the StrandColor attribute, which is an array of colors per point. It is understood and used by certain shaders, such as the Particle Density shader and the Particle Strand Gradient Compound.
You can render any of the strand Shape types as surfaces (see also Rendering the Absolute Size for the Segment and Point Shapes below).
Standard surface shaders (such as Phong, Lambert, Constant, etc.).
Hair shaders, especially the Hair Gradient Material shader (see Using the Hair Gradient Material Shader [Hair]) which allows the color and transparency to be defined along the strand using a gradient. This is especially useful if you're using the Segment shape type for creating hair-like strands with Strand Dynamics (see Creating Strand Dynamics).
Plug the Gradient shader into a surface shader to apply gradients to each strand segment.
The Sphere shape is used with a Gradient shader plugged into a Phong shader.
Strands automatically have UVs applied to them so that they can be textured. The UV assignment is slightly different depending on the shape type you've set for the strands, but you can see what they look like if you apply an image node directly to them in the render tree.
Rendering the Absolute Size for the Segment and Point Shapes
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 use Set Segment Size Mode compound to control the particle Size and/or StrandSize attributes. This command sets the ShapeSizeAbsolute attribute under the hood.
To set the strand segment size
Choose Particles On Emission Strands Segment Size Mode Geometry from the ICE toolbar.
In the point cloud's ICE tree, the Set Segment Size Mode compound is added and plugged into the Execute on Emit port on the Emit compound.
In the Set Segment Size Mode property editor, select the Mode to be either Softimage Units or Pixel Units (raster space).
Set the particle's Size and/or StrandSize attributes as you like to get the desired strand thickness if you select Softimage Units.
You can use any strand shape type with these particle volume shaders to create different types of strand effects, such as light or smoke trails:
The Particle Strand Gradient Compound sets up a color/alpha gradient for rendering particle strands. It contains the 2D Gradient shader. You can plug this compound into the Particle Renderer or Particle Shaper compounds.
The Strand parameters of the Particle Density shader render strands with a fade-in/fade-out length for the strand's size and its density (opacity). You can use this shader in conjunction with the Particle Volume Cloud shader.
The Segment strand shape is used with a Particle Strand Gradient compound plugged into the Particle Density compound, which is plugged into the Particle Volume Cloud shader.