In this guide, you will learn how to modify your clothing material to add additional color variety to the same asset. In addition, we will explain how to modify the material textures outside of UEFN to achieve a similar effect.
Import your MetaHuman into UEFN and set up a clothing asset by following the steps outlined in the Import your Clothing Assets to UEFN guide.
Modify the Clothing Material
Follow these steps to modify the material associated with your clothing asset:
Open your MetaHuman Blueprint and select the ChaosCloth component in the Components window.
Go to the Details panel and scroll down to the Materials section.
Locate the material you want to modify. In this example, we want to change the material in Element 0.
Click the Browse button to navigate to the material in the Content Browser.
Double click the material to open it. This will open the Material Editor where you can edit the node graph that creates the final material applied to your clothing asset. To learn more about materials, please see the Materials documentation for UEFN.
Move the Texture Sample node to make space, right click in the Material Graph, and search for then select Constant3Vector.
With the node selected, go to the Details panel and click the Constant to open the Color Picker. Set the color to white and click OK.
Right click in the Node Graph and search for then select Multiply.
Connect the Texture Sample node and the Constant3 node to the A and B pins of the Multiply node. Connect the Multiply node to the Base Color pin of the Material node.
Right click on the Constant3 node and select Convert to Parameter. Enter Tint as the name and click Save.
Go back to the Content Browser, right click on the material and select Create Material Instance. Name the asset. In this example, we named it MI_Cap_Jacket.
Go back to the MetaHuman Blueprint, select the ChaosCloth component and go to the Materials section in the Details panel.
Replace the original material with the new material instance you just created.
Compile and Save the Blueprint.
Open the material instance, expand the Global Vector Parameters section and enable the Tint checkbox.
Click the Tint color to open the Color Picker. You can now select the color you want and see the changes update instantly. Pick a color and click OK.
You can right click on the material instance and select Duplicate to create multiple versions of the clothing material instance. In the example below, we created 3 versions of the jacket by duplicating the material instance and selecting a different tint.
Modify the Textures Outside of UEFN
You can also add variety to your clothing asset by modifying the material's textures directly. You can export the desired textures and modify them in an external image editing software, like Photoshop. This method is more elaborate, but offers you more control over the final result.
Follow these steps to locate and export a texture from the material:
Open the material and click the Texture Sample node that references the texture you want to export.
Go to the Details panel and scroll down to the Material Expression Texture Base section. Click the Navigate button for the Texture to go to the texture asset in the Content Browser.
Right click on the texture and click Asset Actions > Export. Select the target location and click Save.
Import the texture into an image editing program and select the parts of the texture you want to modify.
If using Photoshop or a similar program, you can use a new Adjustment layer to select a specific color and change it.
Once you are done making your changes, import the texture to UEFN by clicking the Import button in the Content Browser.
Alternatively, if you want to reimport the same texture to apply your changes, you can right click on the texture and select Reimport. This will overwrite the texture with your changes.
If you imported a new texture file, go back to the material and select the Texture Sample node. Go to the Details panel and scroll down to the Material Expression Texture Base section and replace the Texture with your new one.
For your convenience, the Cloth Learning Assets available from the link in UEFN include the base texture and a Photoshop file with a Selective Color layer so you can quickly modify the texture for this example. To learn how to access the downloadable files, see the Talisman MetaHuman Template tutorial.