Goal Pose

This tutorial teaches an advanced art direction technique using goal posing.

Please refer to the Carbon Cloth reference, Painted Attribute Maps, and especially Goal Pose/Goal Skin.

The remainder of this tutorial is split into three parts. First, the base principles of goal posing are summarized. After that, two use cases demonstrate typical applications of goal posing. The first of these shows how to take a rigged, skinned and animated character and art direct the region of motion of a Carbon Cloth by goal posing parts of the cloth to the animation. The second example teaches how to use goal posing to perfectly loop a cloth simulation.

The Principles Of Goal Posing And How To Use It

Goal posing is a technique to create animation-driven physics simulation based on the use of a goal pose (the target) and a goal skin (the cloth).

In Carbon, goal posing is used by the Carbon Cloth, the Carbon Morph and the Carbon Tetra nodes.

Note

While the Carbon Morph only requires a Reference Pose, Carbon Cloth and Carbon Tetra objects use a separate SOP path for the goal, this geometry is called Goal Pose. Once a Reference Pose is set, the Goal Pose parameters, previously grayed out, become editable. The enable/disable toggle allows to turn the goal posing on and off without having to empty the Goal Pose SOP Path. Once a Goal Pose SOP Path is set and goal posing is enabled, the Goal Skin parameters can be edited as well. If no Goal Pose SOP Path is set or if Goal Pose is disabled, all Goal Skin parameters are grayed out and cannot be edited. Refer to the Goal Pose/Goal Skin user guide for more in depth information about Goal posing.

The use of goal posing in a Carbon Morph differs from using it in Carbon Cloth objects. Morphs are intended to turn parts of an animated collider into cloth, which usually is targeted at solving animated collision geometry issues, like intersecting armpit or leg geometry, while goal posing a Carbon Cloth allows the creation of sophisticated effects such as seamless cloth simulation looping.

The following two scenarios demonstrate how goal posing is used on a Carbon Cloth node.

Rigging And Skinning

In this scenario, a kinematic chain of 20 bones, 10 on each side of an anchor point, sets the starting state. This structure can be seen below.

_images/tutorial_goal_pose_bones.png

Kinematic chain made from 20 bones.

That chain is the rig for an arm-like geometry. Imagine an arm and a sleeve, both rigged and skinned with the bone structure above. The bones are then animated to bend upwards and downwards.

_images/tutorial_goal_pose_skinned.png

Starting pose and peak deformations of the skinned arm and sleeve.

Unfortunately, the sleeve geometry does not show many fabric-like features and rather looks like plastic.

By using this skinned animation as goal skin, its possible to goal pose all or parts of the sleeve with varying Goal Skin Strength values and create the desired art directed look.

Below is a simple paint map for the goalSkinStrength point attribute.

_images/tutorial_goal_pose_paintmap.png

Paint map for the sleeve.

After that, apply the following values for the Carbon Cloth goal skin parameters:

  • Base = 10
  • Range = 50
  • Lower Threshold = 0.25
  • Upper Threshold = 0.77

All points of the sleeve geometry with a painted goalSkinStrength value lower than 0.25 are fully dynamic and are not constrained by the goal pose. On the other side, all points with values greater than 0.77 are fully kinematic and are equal to the goal pose at all times.

_images/tutorial_goal_pose_posed.png

Goal posed sleeve.

Below is a comparison of the pure rigged and skinned animation (left) with the goal posed Carbon Cloth simulation.

_images/tutorial_goal_pose.gif

Comparison of purely skinned geometry (left) versus a goal posed simulation (right).

Looping A Simulation

This scenario explains how to create a looping flag by goal posing.

A typical application for looping would be a fashion video of simulated cloth, of say 5 secs, that seamlessly loops. It is also possible to create a sophisticated interactive application with a decision tree of different transitions so that the cloth behavior can be changed in some way (maybe increased wind speed) and it seamlessly transitions to a new loop.

For the purpose of this tutorial, a flag is attached to a simple pole and is affected by a varying air flow. For more information on how to bind a Carbon Cloth to a Carbon Collider, please refer to Avatar Cloth. For more information on how to set up flows, please refer to Carbon Flow.

Now, create a basic flag geometry and add a paint map with a linear gradient, where all points located on the left edge receive a value of 1 and all points located on the right edge receive a value of 0. The painted attribute is goalSkinStrength.

_images/tutorial_goal_pose_flag_paintmap.png

Paint map for the flag.

Using a gradient is very important for looping a simulation, the reason for that will be explained below.

First, there is a common structure to any looping simulation scenario. It consists of three parts:

  • Lead-in
  • Base simulation
  • Looping simulation

The Lead-in usually consists of 50 to 100 frames. Its main purpose is to get the simulation into a steady state. In this scenario, for example, the starting position is a flat flag, which will first drape downwards before it catches the air flow and starts waving in the wind.

The Base simulation serves as the goal pose target for the Looping simulation. Both, the Base simulation, and the Looping simulation need to consist of the same number of frames. In the scenario, the chosen Lead-in is 50 frames, the Base simulation 100 frames, and consequently the Looping simulation will also be 100 frames.

_images/tutorial_goal_pose_flag_looping_diagram.png

Schematic setup of the looping flag simulation.

How to set up the Goal Skin Strength parameters:

There is no need for a Base value, as the looping can be controlled through the Range and the thresholds.

For all frames preceding the Looping simulation, apply a Range value of 0.01 and an Upper Threshold of 1. This ensures that initially none of the points of the flag are fully kinematic. Also, setting an initial Lower Threshold of 1 turns all points fully dynamic.

Starting at frame 150, i.e. when the Looping simulation starts, remove the Lower Threshold by setting it to 0, therefore allowing each and every point to be goal pose constrained. Gradually increase the Range value so that each point is drawn towards its goal pose by a growing force until the force is strong enough to direct the point to follow its target as a perfect match. At the same time, gradually decreasing the Upper Threshold turns more and more points fully kinematic, until the whole flag geometry is fully kinematic (identical to the goal pose). And by goal posing to the Base simulation, which precedes the Looping simulation, the last frame of the Looping simulation is equal to the last frame of the Base simulation. This creates a perfect loop.

Using a gradient paint map with decreasing values the further the geometry is located from the anchor points, it is guaranteed, that the flag will conform to the goal from left to right and remove any potential ripples or geometry corruption. One could think of it as fixing a wrinkled fabric on one side and then using an iron to smooth out the wrinkles towards the loose end.

_images/tutorial_goal_pose_flag.gif

Looping simulation with goal skin strength guide geometry.