After creating your clothing asset, you next need to transfer skin weights and set various configurations for animations and physics.
Transfer Skin Weights and Set Max Simulation Distance
In this section, you will transfer the skin weights from your skeletal mesh to the cloth collection. The skin weights tell the cloth mesh how to deform to conform to the skeletal mesh.
You will also add a Max Distance Configuration. The Max Distance value informs how far the simulated cloth can move away from its animated skinned position during simulation.
Drag from the Collection pin and search for then select TransferSkinWeights.
Go to the Node Details panel and click the Skeletal Mesh dropdown. Select the skeletal mesh for your character. This is the same skeletal mesh you used in your DCC package to create the cloth meshes.
Drag from the Collection pin and search for then select AddWeightMap.
Name the node AddWeightMap_MaxDistance.
Go to the Node Details panel and enter the Name MaxDistance.
This weight map tells the solver how far from its origin each vertex in the cloth mesh can travel.
With the node selected, you will see a 2D representation of your cloth mesh in the Cloth Panel, and the Weight Map tools and parameters in the Cloth Mode Toolbar.
The Weight Map interface contains the following sections:
Field Description 1. Display mode
You can select a Black and White or White and Red color map to represent the painted values.
2. Action Type
Select between various tools, such as Brush, Fill, and Gradient. You can also select Paint or Smooth Brush Modes.
3. Brush
Enter the Brush Size, Attribute Value, and Strength of the tool.
4. Filters
Adjust the regions affected by your selected Action Tool when painting.
5. Query
Displays the value (0 - 1) painted at the cursor location.
6. Operations
Includes options to clear and invert your selection, as well as a flood fill and multiply.
7. Mesh Elements Visualization, Triangle Visibility
Includes various settings to control which parts of the mesh are visible in the panel.
8. View
Toggle between 2D Sim, 3D Sim, and Render inside the panel.
9. Cursor
Represents the cursor location where you are painting values on the mesh.
10. Paint Weight Maps
You can Accept or Cancel the Weight Map changes you applied to the mesh.
With the Brush tool selected and an Attribute Value of 1, paint over your cloth mesh where you want your cloth to have complete movement freedom. Recall that 0 means no movement (kinematic) and 1 represents full movement within the maximum distance.
Continue to paint the mesh by adding different Attribute Values. In the example below, we added values from 1 to 0.2 to create a gradient.
Use the Smooth Brush Mode and paint over the gradient to smooth the values.
Paint the rest of the cloth meshes as you want and click Accept.
Drag from the Collection pin and search for then select SimulationMaxDistanceConfig.
Go to the Node Details panel and enter 70 for the High value of Max Distance. This will map all values of the weight map between 0 and 70.
Set the Animation Drive, Bending and Stretch Configurations
In this section you will set the animation drive, which controls the stiffness and damping of the cloth asset. You will also add bending and stretch configurations for the collection.
Drag from the Collection pin and search for then select SimulationAnimDriveConfig. Go to the Node Details panel and enter low and high values of 0 and 0.75 for Stiffness and 0 and 1 for Damping.
You can also add separate weight maps to further drive those values by adding a Weight Map node to each input pin, as shown below.
Drag from the Collection pin and search for then select SimulationBendingConfig.
Select Flatness Ratio for the Rest Angle Type.
Select XPBD as the Solver Type.
Select Anisotropic for the Distribution Type.
Enter the following Bending Properties values:
Setting Low High Flatness Ratio
0.0
1.0
Bending Stiffness Warp
0.109266
28.274334
Bending Stiffness Weft
0.005363
28.274334
Bending Stiffness Bias
0.006022
28.274334
Bending Anisso Damping
5.0
10.0
Buckling Stiffness Warp
0.061127
27.99159
Buckling Stiffness Weft
0.00194
27.99159
Buckling Stiffness Bias
0.001506
27.99159
Buckling Ratio
0.3
You can also add separate weight maps to further drive those values by adding Weight Map nodes to the input pins, as shown below.
Drag from the Collection pin and search for then select SimulationStretchConfig.
Select XPBD as the Solver Type.
Select Anisotropic for the Distribution Type.
Enter the following Stretch Properties values:
Setting Low High Stretch Stiffness Warp
1.0
482.6263
Stretch Stiffness Weft
1.0
1000.0
Stretch Stiffness Bias
10.0
500.0
Stretch Aniso Damping
0.0001
0.0001
Stretch Warp Scale
0.99
1.0
Stretch Weft Scale
0.9
1.0
You can also input separate weight maps to further drive those values by adding Weight Map nodes to the input pins, as shown below.
Set the Mass, Aerodynamic, Damping, and Gravity Configurations
In this section you will set the Mass settings where you specify the density of the cloth material. You will also set the Aerodynamic settings to specify fluid density, drag, and lift. In addition, you will also specify the damping and gravity scale applied to the collection.
Drag from the Collection pin and search for then select SimulationMassConfig. Go to the Node Details panel and enter the Mass Mode and Min Per Particle Mass settings. For this example, we selected the Density Mass Mode and a Min Per Particle Mass of 0.001.
You can also add separate weight maps to drive the Uniform Mass and Density values, as seen below.
Drag from the Collection pin and search for then select SimulationAerodynamicsConfig.
Go to the Node Details panel and enter 1.225 for Fluid Density.
Enter Drag and Lift Low and High values of 0.035 and 1, respectively.
Drag from the Collection pin and search for then select SimulationDampingConfig.
Go to the Node Details panel and enter Damping Coefficient Weighted Low and High values of 0.02 and 0.5, respectively.
Enter a Local Damping Coefficient of 0.0085.
You can also input a separate weight map to drive the Damping Coefficient Weighted values, as seen below.
Drag from the Collection pin and search for then select SimulationGravityConfig. Go to the Node Details panel and enter Gravity Scale Low and High values of 1 and 1, respectively.
Set the Physics Asset, Collision, and Velocity Scale Configurations
In this section you will set up the Physics Asset, which will drive collision against the skeletal mesh. You will also set the collision thickness, friction coefficient, proximity stiffness and simulation velocity scale.
Drag from the Collection pin and search for then select SetPhysicsAsset. Go to the Node Details panel and click the Physics Asset dropdown. Select the Physics Asset for your Skeletal Mesh.
Drag from the Collection pin and search for then select SimulationCollisionConfig. Go to the Node Details panel and enter a Collision Thickness of 0.3.
Enter a Friction Coefficient of 0.2.
Enter a Proximity Stiffness of 100.
Drag from the Collection pin and search for then select SimulationVelocityScaleConfig. Go to the Node Details panel and a Linear Velocity Scale of 0.3, 0.7, and 0.7.
Enter an Angular Velocity Scale of 0.5.
Enter a Max Velocity Scale of 1.0.
Enter a Fictitious Angular Scale of 1.1.