| On this page |
The Guide Reduce SOP and
Guide Deform SOP nodes are the centerpieces of a workflow with simulated guides that is much faster than traditional methods and captures guides more accurately. Another major improvement is that the Guide Deform SOP has a counterpart in Solaris: The
Configure Guide Deform LOP is a procedural that performs deformation directly at render time including sophisticated subframe sampling for correct motion blur. A drastic speed improvement with many operations should also be mentioned.
To illustrate, how the new nodes work together, start with a fresh scene. Then, open the Hair Utils shelf, and choose the Capybara Sim and Deform tool. After a few moments you can see a fur version of Houdini’s
Test Geometry: Capybara SOP.
Character setup ¶
The starting point for the new workflow is a high-res groom. In the example scene from the shelf, the static groom lives on the capy_fur node: the Output dropdown menu is set to Fur.
The skin is stored on the capy_skin operator. There, Output is set to Skin Surface and contains the rest geometry. You also need the rest pose and the animated state. All three streams are connected to a Bone Deform SOP.
Guide selection ¶
On the fur branch, the shelf setup uses a Guide Reduce SOP. This node solves one of the main problems with deformed guides: the selection of simulation guides. Instead of a manual selection, you only define the Target Guide Count and the rest will be done by the node.
The Guide Reduce SOP starts with “stray” hair curves. These curves normally don’t have guides to drive their motion, but they're important for a plausible result. Then, the node selects curves from the main fur/hair volume. Independently from the Target Guide Count, the algorithm will always select the curves that have the greatest impact on the result.
The Preselected Guides parameter lets you manually select guides. When you click the Select guides from the viewport, you can mark the guides you want to add to the target count. Confirm your selection with Enter. If the number of manually selected guides meets or exceeds Target Guide Count, the node won’t add more guides to the selection.
Guide preparation ¶
The Guide Utility SOP provides convenient access to some often used functions in conjunction with hair:
-
Snap to Skin fixes guides with an offset from the skin and reconnects them to the skin.
-
Create Root Groups lets you create a group for the Vellum constraints' Pin Points.
-
Create Orient Attribute adds an
orientpoint attribute that is necessary for the Guide Deform SOP and the Vellum simulation. -
Create Curve U Attribute writes a normalized float attribute to the curve points between a hair’s root (0) and tip (1).
-
Import Skin UV reads the UV values at the root point and writes it as a primitive attribute on the curve for shading.
Guide deformation: Step 1 ¶
The first Guide Deform SOP calculates the behavior of the curves from the surface deformation of the animated character. Since you're dealing with a relatively small number of curves, this process should be very fast. The node’s
-
first input contains the selected curves with the
orientattribute -
second input requires the character skin’s rest geometry without animation
-
third input provides the character’s deformed skin from the Bone Deform SOP
What you get from this Guide Deform SOP is the basis for the Vellum simulation. The node also uses the default values of the parameters and in many cases, they provide a very good starting point.
Vellum simulation ¶
The deformed curves are the actual simulation geometry for the Vellum Solver. For fur and hair, you typically execute the Vellum Configure Hair tool from the tab menu. This tool adds a pre-configured Vellum Constraints SOP to the network. The Constraint Type is Hair.
-
Link the Guide Deform SOP’s first output with the first input of the constraints node.
-
Connect the deformer node’s third output with the third input of the constraints operator.
You certainly remember that the upstream Guide Utility SOP has the Create Roots Group option turned on. On the constraints node’s Pin to Animation section, you can find the resulting roots group to define the static points that are tied to the deformed skin. On the same section, you can also see that Match Animation is active. This is to make sure that the solver considers the animated character.
The Vellum Solver SOP performs the actual simulation of the selected guides based on your settings and the deformed skin.
Guide deformation: Step 2 ¶
The second Guide Deform SOP takes the simulated guides to drive the remaining curves of the fur. The actual deformation is again ruled by the parameter’s of the Guide Shape Interpolation section, but the nodes' order at the deformer inputs is different.
-
The first input uses the stream from the
capy_furnode’s output. This is the entire high-res groom. -
The second input requires the first output of the
capy_skinnode. This is the character skin’s rest geometry. -
The third input expects the deformed skin from the Bone Deform SOP.
-
The fourth input is connected to the rest state of the selected guides. This state also contains the
orientattribute. The node compares the rest state of the selected guide with their simulated state to their motion. -
On the fifth input you’ll find the simulated guides from the Vellum Solver’s first output.
When you hit the Playbar’s Play button, you’ll see the final result.
Preserve Shape option ¶
While going through the settings, you might have seen that the second Guide Deform SOP has the Preserve Shape option turned on.
Preserve Shape (and also Preserve Clumps) performs a quasi-static simulation with bend and stretch constraints. This process fixes the problem of simulation artifacts when hairs are far away from their guides. The option tries to restore the original shape of the hair with bend constraints.
Preserve Clumps, on the other hand, will keep the distances between the curves, for example if you want to keep the wet look of a fur.
This also applies to Vellum simulations with artifacts like stuck hair. With moderate artifacts, Preserve Shape and Preserve Clumps are able to repair stretched or stuck fur.
-
To see the impact of Preserve Shape, turn it off and go to frame 75. Near Capybara’s right armpit you can see several misbehaving curves.
-
When you turn on Preserve shape again, the fur will behave correctly as shown in this comparison:
Solaris ¶
The Guide Deform SOP is also available in Solaris and there it’s called Configure Guide Deform LOP. In fact, the Configure Guide Groom is a Hydra procedural that works at render time. The “Configure” prefix indicates that it’s an API schema that creates primitive attributes for all settings and relationships. The node overrides the point primvars with new positions. Skin and deformed hair share the same shutter offset to make sure that motion blur is synchronized.
The Capybara Sim and Deform network can, for example, live inside a SOP Create LOP. From the SOP setup, remove the terminating Guide Deform SOP. This node will be replaced on the Solaris stage.
The LOP version requires some manual configuration in terms of primitive assignment. You have to output the required elements manually and this requires two separate streams. Since you're working in Solaris, primitive names play an important role for the creation of the Scene Graph Tree. Create and connect three Name SOPs for the:
-
first output of the
capy_furnode (Name →groom) -
first output of the Vellum Solver SOP (Name →
guides) -
output of the Bone Deform SOP (Name →
skin)
Guide stream ¶
To make the procedural work, you have to recreate the inputs of the last Guide Deform. This happens in two steps because the animated character is treated separately. The Merge Packed SOP provides a convenient way to do this. This node packs the incoming geometry.
-
Add a Merge Packed SOP and turn on Name Override Attribute to make sure that you’ll see the relevant data in Solaris.
-
Connect all three Name SOPs to the merge node’s multi-input.
-
You can also lay down an optional
TimeShift SOP.
-
Terminate the guide stream with an
Output SOP.
Animation stream ¶
In the shelf version, the Guide Deform SOP has two more inputs connected. Here you can find the simulated guides along with the deformed skin. Add another Merge Packed SOP, turn on Name Override Attribute, and connect the following name nodes to its input: guides and skin. A Null SOP completes this network branch. Rename the null to
ANIMATION.
Stage ¶
On the stage, you can see the groom, guides, and skin prims in the Scene Graph Tree. They have been brought in from the SOP Create LOP with the Capybara setup inside. To bring the animation stream into Solaris, add a SOP Import LOP and let its SOP Path parameter point to the
ANIMATION null. Connect the import node’s input with the create operator’s output. Also change Packed Primitives to Unpacked to get the editable geometry.
Tip
The SOP Import LOP’s Geometry Handling section has a Treat Polygons as Subdivision Curves option. If you want to use it with your hair simulation, turn it on and the deformer will automatically pick up the changed geometry.
For a minimal setup, lay down the Configure Guide Deform LOP and connect its input with the output of the import node. From the Scene Graph Tree, drag the:
-
groomprimitive to Groom Prim -
skinprimitive to Skin Prim -
guidesprimitive to Deformer / Guides Prim
As before, turn on Preserve Shape to fix potential errors with stretched and stuck curves. You can now render the scene.
Motion blur ¶
On the Configure Guide Deform there aren’t any settings for motion samples. You can use a Cache LOP with multiple sub-samples to pass skin and guides to Hydra and re-sample the guides. Since both elements share the same shutter offset, you’ll get a synchronized motion blur. The guide deform node, on the other hand, reads shutter times and motion samples to generate point primvars per sample.
If you turn on Subframe Sampling on the Cache LOP. The number of Samples controls the quality of the motion blur and with higher values you’ll see curved motion blur streaks.