To configure your simulation settings, you first need to set the proxy deformer. Then you can simulate collision and set up the solver, which controls the quality of the simulation.
Set the Proxy Deformer
In this section, you will set up the Proxy Deformer. This deformer uses the simulation mesh to deform the render mesh. You will also set up two selections for the jacket and holster to make sure they do not interfere with each other during simulation.
Drag from the Collection pin and search for then select WeightMapToSelection, then connect the Name pin of the MaxDistance Weight Map to the Weight Map Name pin of the WeightMapToSelection node. The WeightmapToSelection node converts the painted weight map into a selection of vertices that can be processed by the Proxy Deformer.
Drag from the Collection pin and search for then select Selection under the Cloth category. Name the node Selection_Holster. Go to the Node Details panel and set the Name to HolsterFaces and the Group to SimFaces.
The Cloth Mesh Selection tool is now active.
The Cloth Mesh Selection tool interface contains the following sections:
Section Description 1. Operations:
Imports a selection from a collection or toggles between the primary and secondary selections.
2. Selection tools:
Flood Selection: Selects the entire mesh from a current selection. Grow Selection: Increases the selection area within the current mesh. Shrink Selection: Decreases the selection area within the current mesh.
3. Visualization:
Shows the cloth collection vertices and edges.
4. Selection Actions:
Invert Selection: Inverts the current selection. Select All: Selects all meshes in the collection.
5. Selection Filter:
Toggles between selecting mesh vertices or polygons.
6. Additional Selection Options, Ortho Viewport Behavior, Advanced:
Contains additional selection options, such as Ignore Occlusion and Hit Back Faces.
7. Accept or Cancel
Accepts or cancels your selection.
Click and drag to select the holsters in the cloth collection. Click Accept.
Drag from the Collection pin and search for then select Selection under the Cloth category. Name the node Selection_Jacket. Go to the Node Details panel and set the Name to JacketFaces and the Group to SimFaces.
Select the faces of the jacket you want to isolate in the cloth collection. Click Accept.
Drag from the Collection pin and search for then select ProxyDeformer. This node informs the cloth collection how to deform during simulation.
Connect the Selection Name pin from the WeightMapSelection node to the Sim Vertex Selection pin.
Connect the Name pin of Selection_Holster to the Selection Filter Set 0 pin.
Right click on the ProxyDeformer node and select AddOptionPin. Connect the Name pin of Selection_Jacket to the Selection Filter Set 1 pin.
Set the Simulation Self Collision
In this section, you will set up self collision for the simulation. You will create collision layers for the belt loops, the belt, and the jacket to ensure they do not interfere with each other during the simulation. In addition, you will also create weight maps for thickness and friction, and set up kinematic collision.
Create a new Selection node and name it Selection_BeltLoops.
Go to the Node Details panel and set the Name to BeltLoops and Group to SimFaces.
Select the Belt loops in the cloth collection.
Drag from the Collection pin and search for then select SelectionToIntMap. Name the node SelectionToIntMap_BeltLoops and connect the Name pin to the Selection Name pin. The SelectionToIntMap node sets which simulation layer the selection will run on. The simulation executes layers in order, with the lowest layer (layer 0) executing first.
Create a new Selection node and name it Selection_Belt.
Go to the Node Details panel and set the Name to Belt and Group to SimFaces.
Select the Belt faces in the cloth collection.
Drag from the Collection pin and search for then select SelectionToIntMap. Name the node SelectionToIntMap_Belt and connect the Name pin to the Selection Name pin.
Create a new Selection node and name it Selection_JacketCol.
Go to the Node Details panel and set the Name to JacketUnderBelt and Group to SimFaces.
Select the Jacket faces in the cloth collection.
Drag from the Collection pin and search for then select SelectionToIntMap. Name the node SelectionToIntMap_Jacket and connect the Name pin to the Selection Name pin.
Connect the Int Map Name pin of the SelectionToIntMap_BeltLoops to the Int Map Name pin of SelectionToIntMap_Belt. Connect the Int Map Name pin of the SelectionToIntMap_Belt to the Int Map Name pin of SelectionToIntMap_Jacket.
Create a WeightMap node and name it AddWeightMap_Thickness. Set the Name to Thickness. Paint the Cloth Collection to represent the thickness of the cloth during simulation.
Create a WeightMap node and name it AddWeightMap_Friction. Set the Name to Friction. Paint the cloth collection to represent friction during simulation.
Now you will create a selection for the kinematic collision used by the self collision node.
Add a StaticMeshImport node and name it StaticMeshImport_Collider. Click the Static Mesh dropdown and select the appropriate static mesh.
Drag from the Collection pin and search for then select TransferSkinWeights. Name the node TransferSkinWeights_Collider.
Drag from the Collection pin and search for then select Selection.
Drag from the Collection pin of the Selection node and search for then select MergeClothCollections.
Name the node MergeClothCollections_Kinematic.
Right click the MergeClothCollections_Kinematic node and select AddOptionPin.
Connect the Collection pin of the AddWeightMap_Friction node to the Collection 1 pin of the MergeClothCollections_Kinematic node.
Drag from the Collection pin of the MergeClothCollections_Kinematic node and search for then select SimulationSelfCollisionConfig.
Connect the Int Map Name pin from the SelectionToIntMap_Jacket node to the Self Collision Layers pin of SimulationSelfCollisionConfig.
Connect the Name pin from the Selection node to the Self Collision Enabled Kinematic Faces pin of SimulationSelfCollisionConfig.
Connect the Name pin from the AddWeightMap_Friction node to the Self Collision Kinematic Collider Friction Weighted pin of SimulationSelfCollisionConfig.
Connect the Name pin from the AddWeightMap_Thickness node to the Self Collision Thickness Weighted pin of SimulationSelfCollisionConfig.
Set the Simulation Solver and Cloth Asset Terminal
In this section, you will set up the Simulation Solver, which controls the quality of the simulation. In addition, you will complete the asset by creating a Cloth Asset Terminal. This node evaluates the entire Dataflow graph and sets its result to the cloth asset in the Content Browser.
Drag from the Collection pin of the SimulationSelfCollisionConfig node and search for then select SimulationSolverConfig.
Set the Num Iterations to 2.
Set the Max Num Iterations to 2.
Set the Num Substeps to 13
Enable Num Self Collision and set it to 2.
Drag from the Collection pin of the SimulationSolverConfig node and search for then select ClothAssetTerminal. You should now see the cloth collection in the viewport.
Click the Preview Scene Details panel and set a skeletal mesh asset and an animation asset to preview the simulation. In this example, we selected a forward walking animation to preview.