Before You Begin
You must have a clothing model (FBX or USD) available to import into Unreal Editor. This tutorial uses the working folder techwearOutfit inside the Content Browser at this path:
All/Content/Outfits/techwearOutfit/techwearOutfit
It also uses the skeletal mesh generated in Creating Your MetaHuman:
bodyShapeG_CombinedSkelMesh
If your model is already imported and has dependencies in other locations within the Editor, any dependencies (such as shared assets like skeletons and parent materials) must be moved into the same working folder as your model.
This tutorial requires certain Unreal Engine plugins to create cloth assets. For information on setting up plugins, see Parametric Asset Setup.
To move shared assets, follow these steps:
In the Content Browser, drag the shared assets to the working folder and select Move Here in the contextual dialog box.
To update asset references, right-click on the working folder and select Update Redirector References.
The Move Here option updates asset references. Copy Here does not.
Selecting a Workflow Path
The process of creating LODs can differ depending on your development needs. For the purpose of this tutorial, choose the workflow path that best matches your needs:
Path A: Your model is an FBX, and only has a render mesh. If you are converting your existing MetaHuman clothing to be parametric, choose this path.
Path B: Your model is a USD exported from Marvelous Designer or Clo, which has a sim and render mesh.
Path C: Your model is a render mesh and you have created a sim mesh by hand.
Path A
Importing Your FBX
Drag your FBX into the working folder in the Content Browser. Alternatively, you can click Import.
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.
Creating 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. This creates a new Dataflow asset.Right-click your cloth asset, and select Open in Dataflow Editor (Experimental) to open your asset 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:
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 it or drag 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 TransferSkinWeights node.
With the TransferSkinWeights 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 and select Remove Option Pin to remove the remaining pins (so it does not expect any more LODs). Then, proceed to Creating an Outfit Asset.
If you need to add hand-generated LODs or automatically-generated LODs, continue to Path A: Setting Up LODs.
Path A: Setting Up LODs
This tutorial covers both hand-generated LODs and automatically-generated LODs.
Hand-Generated LODs
In the Graph tab, right-click on the ClothAssetTerminal node and select Add Pin to add 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 dropdown in the top-right corner 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.
Proceed to Creating an Outfit Asset.
Path B
Creating 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. This creates a new Dataflow asset.Right-click
CA_techwearOutfit_bodyShapeG, and select Open in Dataflow Editor (Experimental) to open your asset in the Dataflow Editor.In the Graph panel, delete all but the following nodes:
USDimport
TransferSkinWeights
Remesh
Remesh_LOD2
ClothAssetTerminal
Your graph should now look like this:
Setting Up Your Meshes in Dataflow Editor
In the Graph panel, select the USDImport node. In the Node Details panel, import your USD by clicking the three dots next to USD File.
Once imported, your asset should be visible in the Construction Viewport in the Dataflow Editor.
A new folder containing your USD file, materials, static meshes, and textures will appear in your working folder in the Content Browser.
Connect the Collection pin on the USDImport 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. This was created in Creating Your Metahuman.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 more LODs, right-click on the ClothAssetTerminal select Remove Option Pin to remove the remaining pins (so it does not expect any more LODs). Then, proceed to Creating an Outfit Asset.
If you need to generate more LODs, continue to Path B: Setting Up LODs.
Path B: Setting Up LODs
In the Graph tab, right-click and search for Remesh. Drag the Remesh node to the graph.
In the Graph tab, 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 dropdown in the top-right corner 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, 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.
Proceed to Creating an Outfit Asset.
Path C
Importing Your Render and Sim Meshes
Drag your sim and render meshes into the working folder in the Content Browser. Alternatively, you can click Import.
In the Import Content dialog, leave all options as default and click Import. Name the static mesh
techwear_bodyShapeG_LOD0.
Creating 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. This creates a new Dataflow asset.Right-click
CA_techwearOutfit_bodyShapeG, and select Open in Dataflow Editor (Experimental) to open your asset 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:
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 it or drag 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 more LODs, right-click on the ClothAssetTerminal select Remove Option Pin to remove the remaining pins (so it does not expect any more LODs). Then, proceed to Creating an Outfit Asset.
If you need to generate more LODs, continue to Path C: Setting Up LODs.
Path C: Setting 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 dropdown in the top-right corner 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 add 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.
Proceed to Creating an Outfit Asset.
Creating an Outfit Asset
In the Content Browser, navigate to the techwearOutfit folder. Right-click and create an outfit asset by selecting Physics > Outfit Asset.
Name the asset
OA_techwearOutfit.The outfit asset’s name must match the name of the folder it’s contained in.
In the Select an Outfit Asset Template dialog, choose Resizable Outfit.
(Optional) This creates
DF_techwearOutfit. If you want to package for FAB, click and drag it into your working folder, and select Move Here in the contextual popup.Double-click on your outfit asset to open up the Dataflow Editor.
To speed up evaluation, in the Dataflow Editor, click on the three dots next to Evaluate Dataflow Graph and choose Manual Graph Evaluation.
In the Dataflow Members panel, check the Sized Outfit Source checkbox. Click the plus (+) icon to create an Index for each cloth asset you have that corresponds to a body. In this example, we have two:
Expand the dropdown next to Index. In Size Name, type the name of your clothing asset. In this case, it's bodyShapeG.
Expand the dropdown next to Index and assign your cloth asset to Source Asset. Your cloth asset is
CA_techwear_bodyShapeG. Under Source Body Parts, assign your skeletal mesh. Your skeletal mesh isbodyShapeG_combinedSkelMesh.Bodies and cloth assets should be paired; if you made clothing for bodyShapeG, your cloth asset should be assigned to the same index.
(Optional) Num Resizing Interpolation Points refers to the number of points on the body that are being sampled in the process of resizing. The more points you use, the more accurate to the body shape your garment will be but it will affect speed. It’s recommended to stay between about 1000 and 2500 but you can feel free to experiment with this setting.
For this tutorial, you can leave it at the default 1500.
In the Dataflow Editor, click Evaluate Dataflow Graph and then turn Automatic Graph Evaluation back on. A progress bar will indicate successful evaluation, sometimes this can take several minutes.
If you make changes to any of the assets that your outfit asset has dependencies on, you must click Evaluate Dataflow Graph to re-evaluate your outfit asset.
Next Step
In the next step, you will upload your outfit asset to MetaHuman Creator.