Before You Begin
You need the following:
A custom render mesh, or;
The MetaHuman Techwear Outfit and additional files from Fab.
Import Your Static and Sim Meshes
Drag your sim and render meshes into the working folder in the Content Browser. You can also click Import in the Content Browser.
In the Import Content dialog, leave all options as default and click Import. Name the static mesh
techwear_bodyShapeG_LOD0.
Create a Cloth Asset
To create a cloth asset, inside your working folder, right-click in the Content Browser and select Physics > Cloth Asset.
Name your new cloth asset
CA_techwearOutfit_bodyShapeG, and hit Enter to save.The Dataflow Graph window will appear, giving you the option to select your preferred template.
For the purpose of this tutorial, select USD Cloth.
Double-click your cloth asset to open it in the Dataflow Editor.
If you only have one LOD, select and delete all nodes inside the Graph tab, except for the following four:
TransferSkinWeights
Remesh
Remesh_LOD2
ClothAssetTerminal
Your graph should now look like this:
(Optional) If you handmade LODs, delete all nodes except the following two:
TransferSkinWeights
ClothAssetTerminal
Your graph should now look like this:
Setting Up Your Meshes in Dataflow Editor
In the Dataflow Editor, in the Graph tab, right-click and search for StaticMeshImport. Click on it to add it to the graph.
In the Node Details panel, on the right side of the editor, verify that Import Sim Mesh is checked and Import Render Mesh is unchecked.
In the dropdown menu next to Static Mesh, select your model’s sim mesh. Alternatively, you can select the static mesh in the Content Browser and click the Use Selected Asset From Content Browser button.
In the Graph, create a second StaticMeshImport node. In the Node Details panel, uncheck Import Sim Mesh and check Import Render Mesh.
In the dropdown menu next to Static Mesh, select your model’s render mesh.
In the Graph, create a MergeClothCollections node. Connect the Collection pins of both StaticMeshImport nodes to the Collection (in) pins of the MergeClothCollections node.
Connect the Collection (out) pin on the MergeClothCollections node to the Collection (in) pin on the TransferSkinWeights node.
Select the TransferSkinWeights node. In the Node Details panel, under Skeletal Mesh, select
bodyShapeG_CombinedSkelMesh.In the Graph panel, connect the Collection (out) pin on the TransferSkinWeights node to the Collection LOD[0] pin on the ClothAssetTerminal node.
Your graph should now look like this:
If you do not wish to add or generate any LODs, right-click on the ClothAssetTerminal select Remove Option Pin to remove the remaining pins (so it does not expect any more LODs). You can then continue to Create an Outfit Asset.
Set Up LODs
This tutorial covers both hand-generating LODs and automatically-generating LODs.
Automatically-Generated LODs
In the Graph tab, right-click and search for Remesh. Drag the Remesh node to the graph.
Connect the Collection (out) pin on the TransferSkinWeights node to the Collection (in) pin of the Remesh node.
Don’t disconnect TransferSkinWeights from ClothAssetTerminal.
You can visualize changes made in the settings of the Remesh node by enabling the Construction Viewport. In the Construction Viewport tab of the Dataflow Editor, click the Display View dropdown in the top-right corner (default 3DView) and select Render.
You can also change the Construction Viewport display from Lit to Wireframe and many other options.
If you do not see your asset in the Construction Viewport, always check whether Render is selected. This option can become deselected easily.
Connect the Remesh node’s Collection (out) pin to the ClothAssetTerminal.
Repeat steps 1, 2, and 4 for each LOD. For this tutorial, you will adjust each Remesh node's Target Percent Render in the Node Details panel:
Remesh node for LOD[1]: Set Target Percent Render to 50.
Remesh node for LOD[2]: Set Target Percent Render to 30.
Remesh node for LOD[3]: Set Target Percent Render to 10.
Hand-Generated LODs
In the Graph tab, right-click on the ClothAssetTerminal node and select add option pin to a fourth pin.
Duplicate the StaticMeshImport and TransferSkinWeights nodes three times. Working in ascending order, in the Nodes Details panel of each new TransferSkinWeights node, select the new static meshes and skeletal meshes associated with that LOD.
MetaHuman expects four body LODs.
Painting Weight Maps (Optional)
Due to the limitations of skin weight transfer from the body, you may occasionally encounter strange looking artifacts, such as tearing in areas like armpits and upper thigh regions. If you notice these during animation sequences, this means you need to pre-paint maps that control skinning operations. You can paint maps on your garment which can control the following operations: Relax, Prune, Hammer, Clamp, and Normalize.
To see and paint the weight map, follow these steps:
Double-click the Cloth Asset to open it in the Dataflow Editor.
Click on your static mesh import node and then click the Paint Weight Map button in the General tab.
Double-click the PaintWeightMap and it should appear in the construction viewport. If it doesn’t, check to see if 3dSim is selected.
Name it something informative. In this example, the map is for an
LOD_0mesh which would control “relax” so we named itLOD0_relaxMap.Paint the areas you would want affected by your operation of choice in white, and leave everything else black. When you are done, click Accept.
Now, the static mesh is ready to have a map attached. Right-click in the dataflow graph, type
SetSkinningSelection, and select it when it pops up.Connect the Collection pin of the PaintWeightMap to the Collection pin of the SetSkinningSelection node.
Connect the Attribute Key pin on PaintWeightMap to the Selection Map pin on the Set Skinning selection node.
Connect the Collection out pin on the SetSkinningSelection node to the Collection pin in the TransferSkinWeights node.
Click on the SetSkinningSelection node and in the Node Details panel. Change Vertex Group to SimVertices3D.
Set Correction Type to whichever type you want to use.
You can leave the Selection Map blank, as it is connected to the Paint Weight Map node already via the Attribute Key or Selection Map connection.
You can connect the same map to more than one SetSkinningSelection node if you wish to use the same map.
Now repeat for every asset you want to make maps for. If you hand made LODS, you need to paint maps for those as well.
Once you’ve done this, you must re-evaluate your cloth asset and save it. Then go into your outfit asset (if you’ve already made one), re-evaluate, and save that too.