> For the complete documentation index, see [llms.txt](https://docs.gta.clothing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gta.clothing/cloth-modding/cloth-physics-yld.md).

# Creating Cloth Physics (YLD)

## Introduction

Normal weight painting makes a garment follow the ped skeleton directly. A YLD adds a separate character-cloth simulation for parts that should continue moving, such as the lower section of a long coat, skirt, cape, or suitable hair component.

This is an advanced and optional step. Finish a correctly rigged, textured and tested YDD first. YLD authoring uses a low-density **Character Cloth Mesh** in Sollumz. It does not use a baked Blender Cloth modifier simulation.

{% hint style="info" %}
This article covers MP Freemode character components supported by Durty Cloth Tool. Cloth embedded in a fragment YFT, such as vehicle or prop fragment cloth, is a different Sollumz workflow.
{% endhint %}

Read [Mesh Physics (YLD)](/game-mechanics/mesh-physics-yld.md) for the file relationship and DCT behavior. Make sure [Blender and Sollumz Setup](/cloth-modding/blender-and-sollumz-setup.md), [Rigging and Weight Painting](/cloth-modding/rigging-and-weight-painting.md), and [Materials and Textures](/cloth-modding/materials-and-textures.md) are already familiar.

## Start from a Working Reference

The safest starting point is a working component with cloth movement similar to the item you are creating. Keep its YDD, matching YLD and ped YFT together when importing. The YLD must share the YDD's base name and folder for Sollumz to import the pair automatically.

Use the reference to understand its hierarchy, proxy density, pinned seam, collision capsules and starting attribute values. Do not reuse an unrelated YLD with a different mesh or skeleton simply because the filenames match.

## Understand the Hierarchy

A character-cloth setup contains the normal visible models plus a simulation proxy and collision bounds:

```
Drawable Dictionary armature
└─ Drawable
   ├─ Drawable Model(s) and visible LOD meshes
   └─ Character Cloth Mesh
      └─ Bound Composite
         ├─ Bound Capsule
         └─ Bound Capsule
```

Current Sollumz supports one Character Cloth Mesh per Drawable and one Bound Composite for that proxy. The visible Drawable Models remain the textured garment. The Character Cloth Mesh is only the low-density surface that drives their simulated area.

## Mark the Dynamic Area on the Visible Mesh

On each visible LOD that contains the moving section:

1. Select the vertices that should be driven by the cloth simulation.
2. Assign them to a vertex group named exactly `CLOTH`.
3. Make sure every triangle touching a `CLOTH` vertex uses a suitable ped-cloth material.
4. Keep the rigid part of the garment on its normal skeleton weights.

The `CLOTH` group belongs on the visible Drawable Model meshes, not on the Character Cloth Mesh. Missing the group or the matching ped-cloth material can leave the section rigid or prevent a valid export. Use [Materials and Textures](/cloth-modding/materials-and-textures.md) for the general material workflow and copy the exact cloth material setup from a comparable reference.

## Build the Character Cloth Mesh

Create a simple surface that follows and covers the visible moving region. You can begin from a copy of that region, but it normally needs careful simplification or retopology.

For a first setup, duplicate or retopologize the Character Cloth Mesh from the imported reference. Select the finished proxy in Object Mode, open `Object Properties > Sollumz`, set **Sollum Type** to **Character Cloth Mesh**, and parent it below the same Drawable as the visible models.

The proxy should:

* Stay close to the visible cloth so the render mesh can bind to it reliably.
* Use clean, even, non-degenerate triangles with no accidental duplicate vertices.
* Contain only the topology needed to describe the main folds and silhouette.
* Have no material slots or render-only UV/color data.
* Use normal skeleton bone groups, with every proxy vertex usefully weighted.

Triangle edges provide the main structural connections in the simulation. Deliberate loose edges can provide additional structural connections, but avoid adding them until the basic cloth behaves correctly.

{% hint style="warning" %}
Current Sollumz supports one simulation LOD and a maximum of **254 vertices** for a Character Cloth Mesh. The visible component can still use its normal High, Medium, Low and optional Very Low render LODs. See [Levels of Detail](/cloth-modding/levels-of-detail.md) for those visible meshes.
{% endhint %}

## Pin the Attachment Area

Pinned proxy vertices hold the cloth to the character. Select a continuous row around the fixed attachment, such as a waistband, shoulders, collar, or coat seam, then set the **Pinned** cloth attribute in `Sollumz Tools > Drawables > Cloth Tools`.

The proxy's per-vertex cloth attributes include:

* **Pinned**
* **Pin Radius**
* **Mass Per Vertex**
* **Inflation Scale**

Select the parent Drawable and open `Object Properties > Sollumz > Character Cloth` to review the overall **Weight** and configure one to four Pin Radius sets. Start with the setup imported from the working reference.

There is no universal preset for a skirt, cape, coat, or hair section. Copy a close reference, change one value at a time and compare the result in-game. The **Force Transform** attribute is not used for character cloth and should be left alone.

Sollumz can fill or paint cloth attributes to speed up setup. Inspect the selected vertices and resulting values instead of assuming a gradient is correct for every shape.

## Add Collision Capsules

For a first setup, keep the imported reference's **Bound Composite** and **Bound Capsule** children, then remove, move or resize the capsules to fit the new garment. To create them from scratch:

1. Select only the Character Cloth Mesh.
2. Open `Sollumz Tools > Collisions > Create Bounds`, choose **Bound Composite**, and click **Create Bound**.
3. Select only the new Bound Composite, choose **Bound Capsule**, and click **Create Bound** for each capsule you need.

The result should have one Bound Composite below the Character Cloth Mesh and only the Bound Capsule children needed to keep the cloth away from the relevant body areas. Do not use Blender's generic collision or Cloth modifier objects for this hierarchy.

Position and size each capsule around areas such as the hips, thighs, torso or arms, depending on the garment. Attach a capsule to the correct ped bone with Sollumz's **Add Bone Constraint** tool. This creates the required transform constraint settings more reliably than building a normal Blender constraint manually.

Keep the first collision setup simple. Capsules that are too large can push the cloth away from the body, while missing or poorly placed capsules can allow clipping. See the official [Sollumz Rigging documentation](https://docs.sollumz.org/documentation/drawables.ydr/rigging) for bone constraints.

## Run Sollumz Diagnostics

Open `Sollumz Tools > Drawables > Cloth Tools`, expand **Diagnostics**, and press **Refresh**. This performs a dry-run cloth export and reports structural problems such as invalid hierarchy, material assignment, vertex count, weights, bones or binding.

Resolve relevant diagnostics before exporting. A successful diagnostic pass means the setup can be exported; it does not prove that the cloth will look stable, avoid clipping, or use good parameter values in-game.

## Export the Matched YDD and YLD

Export the top-level Drawable Dictionary as described in [Exporting and Validation](/cloth-modding/exporting-and-validation.md). Sollumz includes its hierarchy. For the documented DCT handoff, export the matching character YLD together with the YDD using **CW XML**:

* `CW XML` produces a same-base `.ydd.xml` and `.yld.xml` pair.

Sollumz can also produce a same-base native `.ydd` and `.yld` pair for the selected edition. Only use native output after confirming that the chosen edition is supported by your DCT version and target runtime. Do not assume that Legacy and Enhanced binary round trips behave identically.

Keep both files from the same export and target. Do not mix a Legacy YDD with an Enhanced YLD or combine a newly edited model with an older simulation file.

## Attach the YLD in Durty Cloth Tool

For a compatible binary pair with the same base name in the same folder, DCT can resolve the `.yld` while importing the `.ydd`. For the recommended XML workflow:

1. Import the `.ydd.xml` as normal.
2. Select the component in DCT.
3. Use the **Mesh physics file (.yld)** picker and select the matching `.yld.xml`.
4. Save the project and open the Cloth Analysis Report.

DCT converts the XML, keeps the YLD with the component, generates the final output name and writes the required component cloth metadata during the build. You do not need to rename the stream files or edit `ownsCloth` manually.

{% hint style="warning" %}
DCT currently builds attached YLD files for clothing components. Its analysis can report a missing linked file, but it does not validate the simulation topology, `CLOTH` assignments, pins, capsules, binding quality or parameter values. Run Sollumz diagnostics first.
{% endhint %}

Use the [3D Preview](/basics/essential-knowledge/3d-preview-clothes.md) with relevant animations to catch obvious pairing and motion issues. The preview does not replace final collision, wind and animation testing in the target runtime.

## Test and Iterate

Build and install the resource, then test:

* Idle, walking, running, sprinting and quick turns.
* Crouching, jumping and getting into vehicles.
* Large movements near the simulated area.
* Calm and windy weather where available.
* Likely clothing combinations and body shapes.
* Every visible render LOD at several camera distances.

Change one proxy, pin, collision or attribute detail at a time. Keep the working reference and last stable export so you can identify which change caused a new problem.

| Symptom                          | First checks                                                                                                 |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Dynamic section stays rigid      | matching YLD is attached; `CLOTH` exists on each visible LOD; touching faces use a ped-cloth material        |
| Cloth detaches or falls away     | pinned seam; proxy bone weights; YDD/YLD pair and target                                                     |
| Visible mesh binds badly         | proxy coverage, distance, normals and topology                                                               |
| Cloth clips into the body        | capsule position/size, proxy weights and visible-mesh binding                                                |
| Cloth twists or becomes unstable | degenerate topology, disconnected pins, overlapping collision, extreme attribute changes or mismatched files |
| Problem only appears at distance | `CLOTH` group and cloth material on the affected visible LOD                                                 |

See [Testing Addon Clothes](/getting-started/testing-addon-clothes.md) for the normal DCT resource test workflow.

## Video Walkthroughs

The following videos are useful visual companions. They were recorded with older Sollumz workflows, so follow the current limits, menu names and DCT handoff above instead of copying every value or manual metadata step.

{% embed url="<https://www.youtube.com/watch?v=Ql7U5CyRx6E>" %}
Creating character cloth physics with Sollumz and Blender
{% endembed %}

{% embed url="<https://www.youtube.com/watch?v=YVk_rkkKS6o>" %}
Additional character cloth workflow example
{% endembed %}

For version history and current format support, see [Sollumz 2.7 cloth support](https://github.com/Sollumz/Sollumz/releases/tag/v2.7.0) and the [current Sollumz releases](https://github.com/Sollumz/Sollumz/releases).
