Skip to content
Jaimi edited this page Sep 14, 2024 · 5 revisions

Setting up cloth

First create a slot data asset that has cloth weights on it.

  1. Create your source FBX like normal (as if you were just creating a regular slot from it), and then add it to a scene.

  2. Add a cloth component to the created object.

  3. Set the vertex weights for the cloth, following Unity guidelines.

  4. Create the cloth slot with the Slot Builder. Setup the [Slot Builder] like normal. Drag the SkinnedMesh from the scene hierarchy to the box that says "Drag FBX GameObject or meshes here to generate all slots and overlays for the GameObject". Currently, the "Slot Mesh" field will not accept your scene placed mesh, but you can drag and drop it on the "Drag Meshes here" area. This will generate the slot in the location specified.

  5. Create a new "UMAClothProperties" object. Adjust the cloth properties on the object as needed. (See the sample "UMAClothPropertiesExample" object):

UMAClothProperties
  1. Create a new UMARendererAsset. Assign the "UMAClothProperties" you created to the "Cloth Properties" field on the asset, and set any specific renderer properties. Cloth objects have their own renderer, so be sure to set it up like you need to make it work like your default renderer:
umaClothRenderer
  1. Assign the renderer to your cloth slot:
SlotWithClothRenderer

You will probably need to add colliders to your character so the cloth correctly collides (Maybe not in some cases?) if so, add the "Physics Standard Recipe" or "Physics HD Recipe" recipes to the "Additional utility recipes" area of your DynamicCharacterAvatar:

addPhysics

Don't forget to setup the physics layers - there's a helper object for that also called "CollisionMatrixFixer", but you will need to make sure this works with your project, and adjust the layers as needed.

Clone this wiki locally