Language:
Page Info
Tags:
Skill Level:
Engine Version:

Clothing Tool

Choose your OS:

The Clothing Tool is currently an experimental feature and may change in later versions. To use this tool, you must first enable it in the Editor Preferences. You can do this by doing to the main menu > Edit > Editor Preferences > Experimental > and enabling the check box next to Clothing Tool.

In Unreal Engine, version 4.16, APEX Cloth has now been replaced with the NVIDIA's NvCloth solver. It is a low-level clothing solver that is responsible for the particle simulation that runs clothing. This clothing solver allows integrations to be lightweight and very extensible because we now have direct access to this data. Unlike APEX Clothing, which is a sophisticated SDK that is a one-stop shop for clothing simulation that handles both the simulation and the render.

ClothingOverviewBanner.png

With the Clothing Tools now available within the Editor, the workflow has been redefined to enable developers to work directly with Unreal Engine to author their content without the need for external dependencies.

New Cloth Workflow

Old Cloth Workflow

Click image for full size view.

Click image for full size view.

With the "Old" workflow using APEX Cloth, you were required to develop all your assets outside of Unreal using an external program (NVIDIA's Clothing Tool) or DCC Plugins that require specific software (3DS Max/Maya) to author this content. Only during the final stage of development would you bring your authored content into Unreal and assign it to your mesh which meant that if you had to correct anything you would have to go back to your program and re-author the content outside of the Editor.

The "New" workflow enables you to create your content once and then do all the creation editing of the clothing directly inside of Unreal. It makes the creation and iteration of testing content that much quicker, and you also avoid any disconnects between where the content was created versus where it's being used by being able to see all of your edits for your clothing simulation happening in real-time and as they will appear in your game.

Cloth Painting Workflow

Using the new workflow of creating cloth in-Editor, the Cloth Paint Tool enables you to quickly create clothing for your characters using any existing material element of a Skeletal Mesh.

OverviewImage.png

  1. Section Selection - Use this to select the Material IDs that will be used for painting cloth onto.

  2. Cloth Paint Panel - This section includes all the necessary tools and properties you can use when painting clothing.

Follow the steps below to learn the process to create your clothing assets, assign them to your character, and along with the basics of painting on your render mesh.

Create and Assign a Cloth Asset

To start working with clothing, you will first need to create a clothing asset from your Level of Detail (LOD) section and assign it to your render mesh so that you can paint on it.

Follow the steps below to get started:

  1. In the Skeletal Mesh Editor, click the Section Selection button from the main toolbar. It will enable you to select the different parts of your Skeletal Mesh that have their Material Element assigned.

  2. Use the left-click to select a part of your mesh that you want to use as cloth. Then right-click to open the context menu to create your Cloth Asset.

    Click image for full size.

  3. From the context menu, select Create Cloth Asset from Selection and then fill in the following areas of the menu:

    CreateClothContextMenu.png

    • Asset Name - Give your asset a name so that you can easily find locate it later.

    • Remove from Mesh - If you've got a separate mesh piece of geometry you want to be associated as cloth, you can enable this option. If not, you can leave this unchecked.

    • Physics Asset - If this cloth asset is for a character, use its Physics Asset here to get proper collision for the cloth simulation.

    Once you're happy with the settings, click the Create button.

    CreateClothButton.png

  4. Right-click on the section again to bring up the context menu and hover over the Apply Clothing Asset and select from the available clothing assets to apply. It will associate any clothing assets created with the section you've selected.

    ClothSectionAssignment.png

Painting On Your Cloth

Once you're ready to paint on your cloth, you can use the following controls to Paint on your selected cloth asset.

  • Paint - Left Mouse Button

  • Erase - Shift + Left Mouse Button

  • Cloth Preview - H

If you've used the NVIDIA's PhysX DCC Plugin to create Clothing for 3DS Max or Maya, or similar painting tools in other programs, the controls should feel familiar for this operation.

  1. In the Skeletal Mesh Editor, go to the file menu and select Window, then select Cloth Paint from the list. It will open the Cloth Paint panel.

    OpenClothPaintPanel.png

    ClothPaintPanel.png

    Click the Enable Paint Tools button to enable the properties you can use to paint your selected Cloth Asset.

    EnablePaintTools.png

  2. In the Cloth Paint panel, select your assigned Cloth Asset from the Assets list.

    HighlightClothAsset.png

  3. In the Cloth Painting section, you can select a Paint Tool type to use and then set a Paint Value (by default, the Brush paint tool will be used). Then left-click and drag across the surface of your mesh to start painting.

    Hold the H keyboard shortcut to preview your painted cloth.

Paint Tools

PaintToolSelection.png

The Tool selection enables you to choose from the brushes available to cloth paint.

Brush

The Brush tool enables you to paint a radius and strength value on your cloth as you drag across cloth asset.

Brush.png

Use the Paint Value to control the strength of the brush when you are painting the cloth. This value controls how much the painted area will react like cloth based on this value. A value of 0 would mean that the skinned vertex could not move and a value of 100 would allow the skinned vertex to move one meter from its original position.

Paint_Brush.png

For additional information about this tool and its properties, see the Brush Properties reference here.

Gradient

The Gradient tool enables you to paint a gradual blend between a set of cloth values that are selected.

Gradient.png

To paint a gradient, perform the following steps:

  1. Use the Left-Mouse Button to paint your Gradient Start Value. This is indicated by a Green dot over the painted vertice.

  2. Hold the Ctrl + Left-Mouse Button to paint your Gradient End Value. This is indicated by a Red dot over the painted vertice.

  3. When you are finished painting, press the Enter key to paint your gradient.

Paint_Gradient.png

For additional information about this tool and its properties, see the Gradient Properties reference here.

Smooth

The Smooth tool enables you to blur or soften the contrast between painted cloth values.

Smooth.png

Use the Strength value to adjust how strong or soft the blurring effect is to create a soft gradient between painted areas.

Paint_Smooth.png

For additional information about this tool and its properties, see the Smooth Properties reference here.

Fill

The Fill tool enables you to replace areas with similar values with another value.

Fill.png

Use the Fill Value to set a value to fill the vertices in the area with. Use Threshold to set a value that the fill operation should use when sampling the vertices to replace.

Painted Area (White)

Painted area using | Fill value of 1.0

For additional information about this tool and its properties, see the Fill Properties reference here.

Cloth Properties

The Cloth Config properties enable you to adjust your cloth to simulate different types of materials, such as that of burlap, rubber, or many other types of cloth materials.

ClothConfig.png

For additional information about the configuration properties for clothing, see the Cloth Config Properties reference here.

Masks

A Mask is a parameter set that can be swapped out for your clothing asset.

Masks.png

This parameter set represents the following Targets (or parameter sets):

  • Max Distance is the maximum distance any point on the cloth can move from its animated position.

  • Backstop Distance is the offset used from any point on the cloth to limit movement within the Max Distance.

  • Backstop Radius uses a sphere radius that when intersected with the Max Distance will prevent any painted point on the cloth from moving into that region.

You can have multiples of each of these Targets but only one of each can be assigned at a time. This makes it possible to test different configurations very quickly in a non-destructive way.

To create a Mask and assign it to a Target, perform the following steps:

  1. Click the Plus (+) button to create a new empty Mask.

    Masks01.png

  2. Right-click on the New Mask and hover the mouse over Set Target to select from the available Targets list.

    Masks02.png

  3. In the Mask window, you will now see the Target you selected listed as an active target for your cloth asset.

    Masks03.png

For additional information about masks, see the Mask Properties reference here.

APEX (Legacy) Assets

If you have created your clothing asset using the APEX Clothing Tool provided by NVIDIA for 3DS Max or Maya, you can continue to use this workflow. There are two ways to go about importing your APEX cloth (.apx or .apb) files into the Editor.

In the Skeletal Mesh Editor, you can use the Asset Details and under the Clothing section, use the Add APEX clothing file... button.

APEXLegacyImport.png

Alternatively, you can enable the in-Editor Clothing Tool and under the Assets section of the Cloth Paint window, use the plus (+) button to import your APEX file.

InEditorClothImportAPEX.png

When you choose this method, your APEX cloth asset will be converted to the in-Editor tools and appropriately create and assign to your render mesh along with creating any masks for the different parameters like Max Distance and Backstop.

Tags