Setting up simulation components
Here we describe how to set up uDraper’s Collider, Simulation, and Garment components and prepare a Collider mesh for your character in Unreal Engine.
See also Setting up uDraper’s Simulation components video tutorial.
During the simulation and animation, we need to calculate the cloth collisions with the avatar. However, the mesh used for the collisions doesn't have to be as detailed as the visible character. This collider mesh can contain reasonably fewer polygons to improve the simulation performance but has the same skeleton as the visual character. During the simulation, the collider is usually invisible while moving in sync with the visible character.
Usually, clothes used in the uDraper plugin need to be draped/sewn around the collider mesh that corresponds to your UE character. However, in the latest uDraper version, you can use the same garment for different characters compatible UV mappings (see e.g. https://youtu.be/lQ07GfuKP-4?t=639). Furthermore, you can re-drape clothes created for different colliders.
If you have a complex character, you first need to add the Draper Collider component and specify your collider mesh as follows:
- Add your character to your scene.
- If you have a simple skeletal mesh character, proceed to #5.a below.
- If you have a complex character and you need to use a different skeletal mesh for collisions (e.g., when using a Meta Human character).
- Click Add Component in the detail panel and type “draper”, and
- Select the Draper Collider component.
- Specify an array of the meshes to form the whole collider mesh. For example, you now need to add the Meta Human Body and the Head into the array and specify the LOD for each one separately.
- We've found that the LOD1 for the Body and LOD3 for the Head work well. However, it can still be improved by creating special meshes for the head with a simplified face and the body with simplified hands and feet.
- Add the Draper Simulation component as follows:
- In the case of a simple skeletal mesh,
- Select it and click Add Component in the detail panel,
- Type “draper”, and
- Select the Draper Simulation component.
- In the case of a complex character,
- Select the Draper Collider component that you’ve added in #3 above,
- Click Add Component in the detail panel,
- Type “draper”, and
- Select the Draper Simulation component.
- In the case of a simple skeletal mesh,
- For your character mesh, (e.g., “Body” for Metahumans), select the pose suitable for garment draping. It is usually an A-pose or a Fitting-pose.
- *MetaHuman characters come in an A-pose, although the arms are slightly bent. You can adjust the pose using the Control rig (see e.g., https://youtu.be/2k2gNc_7CT0).
- Here you can download a UE animation asset for the MetaHuman's A-Pose with straightened arms to apply to your MetaHuman character.
Note: If you character mesh contains more than 15k – 20k vertices, we recommend to reduce the number of polygons using lower LOD’s (see Skeletal Mesh LODs or https://youtu.be/AWPslbcuiWA?t=124) or/and by simplifying/reducing the body parts that don’t participate in collisions such as the head, hands, and feet (see Reducing Collider Mesh). We suggest keeping the number of vertices for the mesh used for collisions to about 5k – 10k.
- Select an LOD level for the mesh you want to use for the physical simulation. If you already selected LOD’s for the parts in the Draper Collider Component (see 3.c above), the LOD in the Draper Simulation component Collider section will be ignored.
- Once you've configured the mesh to be used for the cloth simulation, you can either
- Click the Export Collider button and select the location for the avatar mesh to be exported in OBJ format or
- Click the Open 3D Draper button (3DD) to launch the 3D Draper application with the new Collider mesh.