Cloth for Actor components

To use Cloth, you must enable the NVIDIA Cloth gem. For more information, see the NVIDIA Cloth gem documentation.

You can create cloth assets for entities with Actor components in the content creation application of your choice and import them into O3DE from an .fbx file. The actor asset should have the following:

Actor mesh One or more meshes that visually represent the actor, skinned to a skeleton, that will not be simulated as cloth.

Cloth mesh One or more meshes that will be simulated and rendered as cloth.

  • The cloth mesh must be skinned to bones. The bones do not have to be exclusive to the cloth mesh. The bones must be part of the actor’s skeletal hierarchy. Because simulation will drive the cloth mesh, we recommend you use few additional bones for the cloth mesh.
  • Cloth data can be added to define per vertex mass and constraint properties using the vertex color tool in your content creation application. For more information see Per vertex properties for cloth .

Skeleton A skeleton to drive the actor and cloth meshes. Cloth meshes may be skinned to their own bones or any bones in the hierarchy. Bones that drive the cloth meshes must be part of the skeleton’s hierarchy.

Animation A Motion set and Anim graph based on the actor’s skeleton. Keyframe animated cloth can be blended with simulated cloth using Motion constraints.

Note:
Sample Actor component cloth assets are located in the NVIDIA Cloth gem directory, which is located at /dev/Gems/NvCloth/Assets/Objects/cloth/Chicken/.

For information on exporting actor assets, see FBX Settings actor export .

Add Cloth to Actor components

Create cloth by adding the Cloth component to an entity that has an Actor component, and then setting the properties of the Cloth component.

  1. In O3DE Editor, add a new entity to the level.

  2. Add an Actor component to the entity, and reference the actor asset and material.

  3. Add an Anim Graph component and reference the actor anim graph asset and motion set.

  4. Add a Cloth component to the entity.

  5. Set the cloth data of the actor asset.

    1. Click the button beside the Mesh node property to open the FBX Settings window.

    Open 3D Engine cloth component mesh node select.

    1. In the FBX Settings window, on the Meshes tab, and choose Add Modifier, Cloth.

    2. In the Cloth modifier area:

      1. Select the cloth mesh from the drop-down list.

      2. When applicable, select the vertex color stream and channel that includes the Inverse Masses data. If data is not provided, then cloth defaults to an inverse mass value of 1.0 for all vertices.

      3. When applicable, select the vertex color stream and channel that include the Motion Constraints data. If data is not provided, then cloth defaults to a motion constraint value of 1.0 for all vertices.

      4. When applicable, select the vertex color streams and channels that includes the Backstop Offset and Backstop Radius data. If data is not provided, then no backstop constraints will be applied in the simulation.

      Open 3D Engine cloth modifier setup.

    3. Choose the Update button. Asset Processor then updates the asset and includes the cloth data.

  6. Configure the cloth component.

    1. Select the cloth mesh node from the drop-down list.

    Open 3D Engine cloth component.

    1. Adjust cloth properties to obtain the desired cloth behavior. For more information, see Cloth Component .

    2. You can use the Motion constraints properties Max Distance and Scale to blend between cloth simulation and keyframe animation.

Add cloth colliders to an actor

You can add cloth colliders to an actor to prevent the cloth form penetrating the actor’s mesh during simulation. Cloth colliders are added to actors in Animation Editor. For information on adding cloth colliders to an actor, see Add Cloth Colliders to actors .

View the Cloth Simulation

In O3DE Editor, press Ctrl+G or press the Play button to run your project.

Open 3D Engine cloth simulation with the NVIDIA Cloth gem.


Copyright © 2022 Open 3D Engine Contributors

Documentation Distributed under CC BY 4.0.
For our trademark, privacy and antitrust policies, code of conduct, and terms of use, please click the applicable link below or see https://www.lfprojects.org.


The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Policy page.