> 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/basics/essential-knowledge/optimizing-clothes.md).

# Optimizing Clothes

Learn about our Cloth Optimization features

## Introduction

Durty Cloth Tool (DCT) provides a powerful **Optimization** feature that allows users to optimize embedded textures in cloth drawables (YDD) as well as individual textures in cloth texture variations (YTD). This feature is designed to improve performance by reducing the size of textures, ensuring proper mipmap levels, and adjusting texture resolutions to power-of-two dimensions (commonly used by game engines for better rendering efficiency).

The **Texture Optimizer** opens one window for selected drawables or texture variations. It scans the selection and shows the proposed changes before applying them. **Project > Project Actions > Texture Optimizer** scans the whole project. Start with **Recommended**; the advanced options let you adjust formats, size caps and filtering separately for diffuse, normal and specular maps.

{% hint style="success" %}
Working on a whole project rather than one texture? Two dedicated tools cover that:

* [Texture Optimizer](/basics/essential-knowledge/texture-optimizer.md) scans every texture in the project, shows a plan and applies it in one run. It also crops wasted UV space.
* [Model Optimizer](/basics/essential-knowledge/model-optimizer.md) reduces model polygons and generates missing LOD levels.

You can open either of them, change every setting, scan and read the plan without a license. The primary action names the tier it needs and checks before anything is written.
{% endhint %}

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2F63NYMT5uOCobYGHTVjDH%2Fimage.png?alt=media&amp;token=d1a6ab90-626b-45e4-b302-073dd4cc9682" alt=""><figcaption><p>The earlier per-texture dialog, showing the same basic texture concepts</p></figcaption></figure>

## Texture Settings

The screenshot shows the earlier per-texture dialog. The current Texture Optimizer groups these settings in one rules panel and lists each texture with its current size, planned size and reasons. The sections below explain the basic concepts.

### 1. **Optimize Compression**

The **Optimize Compression** section deals with compressing the texture to reduce its file size without significantly affecting its visual quality. Compression formats in GTA V and similar games can vary, so choosing the right one is essential for compatibility and performance.

* **Current / Planned**: The plan shows each texture's existing and proposed compression format.
* **Recommended compression**: The conversion rule handles uncompressed and old DXT3 (BC2) textures. Automatic choices account for transparency and supported shader channels.
* **Show advanced options**: Choose Auto, Keep or a specific format per texture role, or override a row in the plan. BC1/DXT1 is compact and supports opaque pixels or one-bit cut-out transparency; BC3/DXT5 also stores an alpha channel. Channel guards explain when a requested format cannot preserve the material data.

#### **Why Compression Matters:**

Compressing textures helps reduce their size, improving game performance and reducing memory usage. However, it's essential to balance compression with visual quality, as overly aggressive compression can lead to visual artifacts.

### 2. **Mipmap**

Mipmaps are lower-resolution versions of a texture that are automatically used when the texture is viewed from a distance. This improves performance by reducing the amount of detail rendered when it is not necessary.

* **Add missing mip maps**: Generates a chain when it is missing. Resizing, UV changes and format conversions rebuild the chain for the new pixels. Advanced alpha-coverage preservation helps retain cut-out edges on hair and similar materials.

#### **Why Mipmaps Matter:**

Without mipmaps, textures can appear overly detailed at a distance, causing unnecessary strain on the rendering engine. By generating mipmaps, you allow the game engine to render lower-resolution textures when the object is far away, improving performance without sacrificing visual quality.

### 3. **Power of Two**

Power-of-two dimensions, such as 256x256 or 512x512, give predictable mip chains and size choices for GTA V clothing. DCT can reduce suitable non-power-of-two textures to fit these sizes.

* **Fix sizes that are not a power of two (when the aspect ratio allows)**: Reduces suitable dimensions to a power-of-two size. Review the proposed dimensions in the plan; layouts that cannot be adjusted safely keep their current size.

#### **Why Power of Two Matters:**

Changing dimensions reduces memory use when fewer pixels are stored. A power-of-two size by itself does not guarantee a faster frame rate.

### 4. **Downscale Texture**

This option allows you to reduce the resolution of textures, which can significantly improve performance at the cost of some visual detail. It is useful when textures are unnecessarily large for their intended use.

* **Shrink textures that are larger than needed**: Textures above their role's size cap are halved until they fit. Choose separate caps for diffuse, normal and specular maps.
* **Per-texture overrides**: In advanced mode, a plan row can override its format and maximum size. The Current and Planned columns show the resulting dimensions before you apply them.

{% hint style="warning" %}
**In some cases this might not be an ultimate solution**, as some textures are way too big due to inefficient placement of texture parts, leaving lots of white/transparent space using up space. Use **Optimize UV mapping...** to scan for a crop or UV island re-pack that can reclaim the unused area. The plan explains when a layout needs manual work.\
\
Cause of this is in most cases bad clothing ports from other games like Sims. Durty Cloth Tool will warn about this.
{% endhint %}

#### **Why Downscaling Matters:**

High-resolution textures can consume a lot of memory and processing power, especially in multiplayer environments like FiveM, where many textures are loaded simultaneously. By downscaling textures, you can improve loading times and overall game performance, particularly on lower-end systems.

## How the Optimization Feature Works

### Optimizing Cloth Drawables (YDD)

When you select a cloth drawable, DCT scans its embedded textures, companion models and texture variations together. Review the Include checkboxes, proposed dimensions and reasons, then apply the selected changes in one run. A UV change includes all textures and models that share that layout.

### Optimizing Single Cloth Textures (YTD)

Selecting a texture variation opens the same plan for that YTD. This is useful when one diffuse variation needs different size or format settings from the rest of the project.

* **Single Texture Focus**: This method allows you to fine-tune the compression, mipmaps, and resolution for individual textures that may not require the same optimization settings as other textures in the project.

{% hint style="info" %}
**Did you know?** You can select multiple cloth textures and optimize them all at the same time by right clicking > Optimize texture(s)...
{% endhint %}

## Example Workflow

1. **Select clothes or textures** in the project.
2. **Open the optimizer** from the right-click menu: **Optimize textures...** for drawables or **Optimize texture(s)...** for variations.
3. **Review the plan** with the Recommended preset. Check the proposed sizes and any skipped reasons.
4. **Apply the included changes**. The primary action shows the required license tier.
5. **Review the result in game**, including transparent edges and distant views. Use the finished window's Undo action if needed.

{% hint style="info" %}
It is best practice to always check optimized clothes in game before deciding to keep an optimized clothing, as in some cases issues like artifacts or game crashes can occur.
{% endhint %}

## UV Mapping Optimization

From a texture variation, choose **Optimize UV mapping for this drawable…**. This opens the parent drawable with all its variations and companion models. They share mesh UVs, so changing only one variation could misalign the others. Review and apply the complete plan together.

**Optimize UV mapping...** can crop unused texture borders and pack separate UV islands into a smaller canvas without rotating them. Corresponding variations, embedded maps and companion models change together. Pixel copies keep their resolution before any separately selected downscaling or compression. Padding helps keep neighbouring islands apart in mipmaps.

A finding shows both the area the UV bounds use and the space the proposed change can reclaim. A tightly cropped texture can still contain empty space; if the padding and size constraints leave no further saving, the finding clears. Tiled UVs, skin-tone layouts, protected small maps, missing variations and other unsupported cases show a reason. They may need work in Blender or Sollumz.

Advanced options include **Allow island re-packing** and the minimum extra saving over a plain crop (10% by default). UV optimization requires Ultimate to apply.

## Model Optimization

Open **Optimize model (polygons, LODs)...** to reduce a selected model, or use the project action for a bulk run. Automatic mode follows the project's Cloth Analysis budgets. New projects start at 30,000 High, 15,000 Medium and 7,500 Low triangles; existing project thresholds stay as saved. These are DCT starting points, not GTA V format limits.

The defaults favour shape retention, protect garment openings and distribute reduction across parts where possible. A requested percentage is a target: a part can stop early when its shape or mesh constraints prevent further reduction. The result explains that limit instead of silently increasing the error allowance. Authored lower LODs are kept when a replacement would be larger.

Power users can adjust the per-level error budget, border protection, weld distance, UV and skin-weight importance, distribution across parts and LOD ratios. Optional **Refine vertex positions** can move surviving vertices and rebuild their normals and tangents. It keeps skin assignments, but animation can still look different, so inspect the preview and test the moving character in game. Models with cloth physics are excluded from geometry reduction.

## Normal and Specular Maps

**Generate Normal & Specular Maps...** derives a starting point from the diffuse texture. Its primary action shows the Ultimate badge. If the action is unavailable, the window explains whether the scan is running, no files are included, both map types are off, or no supported missing map can be generated.

Generated ped specular maps store intensity, falloff and material choice separately. Advanced controls adjust the falloff and material index (0 to 12). DCT skips specular generation when it cannot confirm the shader's layout. Generated maps are a convenience baseline; authored maps can give better material detail.

The Texture Optimizer uses the known map role when resizing and building mipmaps. It protects normal directions and packed material channels. **Base-game sizes** is a smaller-size starting preset (1024 px diffuse, 512 px normal/specular), not a claim that all game assets use those dimensions. Automatic BC5 normal encoding is optional and off by default; validate any format change in your target game and runtime. BC4 cannot store both normal-map directions, and BC4 and BC5 are not suitable for packed specular maps.

Missing mipmaps include incomplete supported chains. The Texture Optimizer can complete them while keeping its protections for palettes and unknown texture channels. Extra YTD entries that a model or companion may reference are preserved; their presence alone does not mean they can safely be removed.
