Character Cloth and Bone Chains Components
Both components come with the plasma.jolt package and are found under Physics > Jolt > Animation in the Add Component menu. Both go on the same object as the character's Animated Mesh component and run after the animation pose of the frame is known.
Character Cloth (Jolt) component
The Character Cloth (Jolt) component simulates the garments described by a cloth asset. Every point of a garment may move up to its painted max distance away from where skinning puts it, so the cloth stays with the character whatever the animation does. The result is handed to the mesh, which draws the garment with the simulated positions.
When you save a cloth asset, the editor offers to add this component wherever the mesh is used without it.
Properties
| Property | Default | Description |
|---|---|---|
Cloth | The cloth asset to simulate. It must have been made for the mesh of the Animated Mesh component on this object. | |
Simulate | on | Off leaves the garment skinned. Switching it fades the cloth in or out instead of popping. |
Importance | Normal | Low, Normal, High or Always Simulate. When more garments want to simulate than the budget allows, higher importance wins, then the nearer garment. Always Simulate is never reduced and does not count against the budget: use it for the player's garments. |
MaxDistanceScale | 1 | Scales every point's max distance (0 to 4). 0 hands the garment back to animation, for example in a cutscene or a finisher. |
WindInfluence | 1 | How strongly wind moves the cloth (0 to 10). |
LinearInertia | 0.7 | How much of the character's linear acceleration reaches the cloth. Lower values make the cloth follow the character more rigidly. |
AngularInertia | 0.7 | The same for turning. |
GravityFactor | 1 | Scales gravity on top of the asset's setting. |
WorldCollision | As Set in the Asset | Overrides what the garment collides with in the world: As Set in the Asset, Off, Static Geometry, or Static and Dynamic. |
CollisionLayer | 0 | The collision layer used for world collision. |
TeleportDistance | 2 | A move further than this many metres in one frame counts as a teleport. |
TeleportMode | Reset | What a teleport does: Reset snaps the cloth to the skinned pose and drops its velocity; Keep Shape moves the cloth with the character and keeps its shape and velocity. |
Script functions
| Function | Description |
|---|---|
Reset() | Snaps the cloth to the skinned pose on the next step. Call it after a camera cut so that no settling shows. |
SetSimulate(bSimulate, BlendTime) | Switches simulation on or off, fading over the given time. |
SetMaxDistanceScale(fScale, BlendTime) | Changes the max distance scale over the given time. |
SetWindInfluence(fInfluence) | Changes the wind influence. |
Garment states
Each frame a garment is in one of these states. Project > Packages > Jolt > Cloth View > State (or Jolt.Cloth.View 6) draws it over every garment in the scene, and Cost (Jolt.Cloth.View 7) shows what each garment costs.
| State | Colour | Meaning |
|---|---|---|
| Skinned | Grey | Not simulated: beyond the asset's Simulate Distance, off screen, out of budget, Simulate off, or Jolt.Cloth.Enable off. |
| Blending | Blue | Simulated while the max distance fades in or out. |
| Reduced | Amber | Simulated at half rate, beyond the asset's Full Rate Distance. |
| Full | Green | Simulated every frame. |
| Inactive | Dark grey | No cloth data or no pose yet, or the graphics device cannot draw simulated cloth. |
Budgets per quality tier and the other cvars are listed on the Character Cloth page.
Bone Chains (Jolt) component
The Bone Chains (Jolt) component lets chains of joints swing on top of the animation: a ponytail, a strap, a pouch, a tail. Each chain starts at a named joint and runs along its first child to the last joint. The chains lag behind the character's movement, hang under gravity, follow the wind and stay out of the skeleton's shapes, and the bones keep their length. A chain costs a few microseconds, so the component also suits details that are too small or too far away for simulated cloth.
| Property | Default | Description |
|---|---|---|
Chains | The first joint of every chain. | |
Stiffness | 0.25 | 0 hangs freely, 1 holds the animated pose. |
Damping | 0.15 | How quickly the swinging dies down. |
GravityFactor | 1 | Scales gravity. |
LinearInertia | 0.8 | How much of the character's movement leaves the chains behind. |
WindInfluence | 1 | How strongly wind moves the chains. |
MaxAngle | 60° | How far a bone may bend away from its animated direction. |
CollideWithBody | on | Collide with the skeleton's shapes. |
Radius | 0.03 | How far, in metres, the joints stay away from the body's shapes. |
TeleportDistance | 2 | A move further than this many metres in one frame counts as a teleport and puts the chains back on the pose. |
StandInForCloth | off | The chains swing only while the Character Cloth component on the same object is not simulating: far away, off screen or out of budget. For a garment that is skinned to joints of its own. |
Reset() puts the chains back on the animated pose; call it after a camera cut. Jolt.BoneChain.Visualize draws the simulated chains.
Bone chains as a cloth stand-in
A garment skinned to a few joints of its own (for example cape joints down the back) can be animated two ways: near the camera the Character Cloth component simulates it, further away a Bone Chains component with Stand In For Cloth swings those joints for a fraction of the cost. Put both components on the same object, name the garment's first joints in Chains, and enable Stand In For Cloth.