Before You Begin
You need the following:
FBX export (from Autodesk Maya)
bodyShapeG_CombinedSkelMesh(from the Creating Your MetaHuman step)
Import Your FBX
Drag your FBX 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. Your asset will import as a static mesh, or a skeletal mesh if your FBX has a skeleton.
Name the static mesh
techwear_bodyShapeG_LOD0.
While it is possible to import FBXs with rigging or skinning information as skeletal meshes (instead of static meshes), it is not recommended due to issues with visualization in the Dataflow Editor.
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:
Set Up Your Meshes in Dataflow Editor
In the Dataflow Editor, in the Graph tab, right-click and search for StaticMeshImport.
Click it to add the StaticMeshImport node to the graph.
In the Node Details panel, on the right side of the editor, uncheck Import Sim Mesh.
In the dropdown menu next to Static Mesh, select your model’s static mesh. In this tutorial, it’s called
techwear_bodyShapeG_LOD0. Alternatively, you can select the static mesh in the Content Browser and click the Use Selected Asset From Content Browser button.In the Graph tab, connect the Collection pin on the StaticMeshImport node to the Collection pin on the TransferSkinWeight node.
With the TransferSkinWeight node selected, return to the Node Details panel:
Under the Target Mesh(es) dropdown, select Render Mesh.
Under the Render Mesh Transfer Source dropdown, select Skeletal Mesh.
Under Skeletal Mesh, select
bodyShapeG_CombinedSkelMeshcreated in Creating Your Metahuman.Under the Transfer Method dropdown, select Closest Point on Surface.
In the Graph tab, connect the Collection (out) pin on the TransferSkinWeights node to the Collection Lods[0] pin on the ClothAssetTerminal node.
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.
Setting Up LODs
This section covers both hand-generating LODs and automatically-generating LODs.
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; 0, 1, 2, and 3.
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.
With the Remesh node selected, in the Details panel, uncheck the Remesh Sim checkbox. Check Remesh Render.
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, 3, and 5 for each LOD. For this tutorial, you will adjust each Remesh node's Target Percent Render in the Node Details panel. In practice these can be adjusted as needed:
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.
Painting Weight Map (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.
This will create a map on that mesh. However, you will not see anything in the construction viewport.
To paint on a render mesh only, start by changing the Vertex Group to RenderVertices.
Double-click the PaintWeightMap and it should appear in the construction viewport. If it doesn’t, check to see if Render 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 SetSkinningSelection 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, and change Vertex Group to RenderVertices.
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 and 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.
Here’s an example of an asset with handmade LODs: