> 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

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2Fgit-blob-73361dbeddcafb17c4b2259916a717622d0ed2b7%2Fuv-crop-poster.webp?alt=media" alt="Review UV cropping and texture optimization."><figcaption><p>Review UV cropping and texture optimization.</p></figcaption></figure>

{% embed url="<https://gta.clothing/assets/media/v4/uv-crop-mobile.mp4?v=a13515070300>" %}
Crop wasted texture space and remap UVs.
{% endembed %}

## 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). For a step by step walkthrough, see [Optimize Clothing Models and Textures](https://docs.gta.clothing/how-to-guides/optimize-clothing-models-and-textures.md).

The **Texture Optimizer** opens one window for selected drawables or texture variations. It scans the selection and shows the proposed changes before applying them. Items with findings start with the relevant repairs; other selected items use your saved options. Opening a suggested action from the Error List focuses on that finding. Missing-mipmap repairs keep the current size and format when supported, and a texture that cannot be changed stays visible with a reason.

These repair defaults are temporary. Changing a setting applies that choice to the selection; choosing another goal replaces the defaults. A single texture opens as a simple card with its size and format. **Tools > Texture Optimizer** (or press **Ctrl+K** and paste `>Texture Optimizer`) scans the whole project using your saved rules. For general optimization, start with **Fix problems and keep sizes sensible**; under **Show all options**, **Custom rules** and its 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](https://docs.gta.clothing/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](https://docs.gta.clothing/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 shows when a license is needed 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%2Fgit-blob-33817bacc1ddc93d6ef9ca1652f43d5ff5e176b2%2Ftexture-optimizer-variation.png?alt=media" alt="The Texture Optimizer for one texture variation of a top: Current BC7 1024x1024, Max size set to 512 px, Target format Automatic, and the planned BC7 512x512 result saving 75 %."><figcaption><p>The Texture Optimizer for a single texture: choose a size and a format, then see the planned result.</p></figcaption></figure>

## Texture Settings

The Texture Optimizer shows one texture as a card with its size and format, and starts larger runs from a goal; **Custom rules**, under **Show all options**, groups these settings in one rules panel, and the list shows 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.
* **Fix problems and keep sizes sensible** goal (the **Recommended** preset in Project Settings): suggests a suitable compressed format for uncompressed and older DXT3 (BC2) textures, keeping their transparency and the material channels the clothing uses.
* **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. The plan explains when a requested format would lose 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 and repair > Optimize texture(s)...** (or press **Ctrl+K** and paste `>Optimize texture(s)`)
{% endhint %}

## Example Workflow

1. **Select clothes or textures** in the project.
2. **Open the optimizer** from the right-click menu's **Optimize and repair** submenu: **Optimize textures...** for drawables or **Optimize texture(s)...** for variations.
3. **Review the plan** with **Fix problems and keep sizes sensible**. 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 and repair > Optimize UV mapping for this drawable…** (or press **Ctrl+K** and paste `>Optimize UV mapping for`). 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 or fit separate UV islands into a smaller texture. Review matching variations, embedded maps and companion models together. Inspect the proposed savings and check the result for seams or lost detail before keeping it. The plan explains when a change is unavailable.

A finding shows how much space the proposed change can reclaim. If no further saving is available, the finding clears. Unsupported textures show why they were skipped and may need work in Blender or Sollumz.

Adjust **Maximum texture area kept (%)** in the UV rules to choose when a crop is worthwhile. 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)...** (or press **Ctrl+K** and paste `>Optimize model`) to reduce a selected model, or use the project action for a bulk run. Selected items with model findings start with the relevant polygon or LOD repairs. 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 keeping the shape and the openings of the clothing. A requested percentage is a target: a part can stop early when reducing it further would damage its shape, and the result tells you so. Authored lower LODs are kept when a replacement would be larger.

The detailed settings are under **Advanced options**, see [Model Optimizer](https://docs.gta.clothing/basics/essential-knowledge/model-optimizer.md). Optional **Refine vertex positions** can adjust the reduced shape. Animation can look different after reduction, 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. Selected items with missing-map findings start with those map types enabled and keep existing maps. 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. To open it, press **Ctrl+K** and paste `>Generate Normal & Specular Maps...`.

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 the cloth's material does not support it. Generated maps are a convenience baseline; authored maps can give better material detail.

The Texture Optimizer keeps normal maps and specular maps intact when it resizes them. **Match the base game's sizes** (the **Base game sizes** preset in Project Settings) is a smaller-size starting goal (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.

The Texture Optimizer can also complete missing or incomplete mipmaps. Extra textures in a YTD that a model or companion may use are kept; their presence alone does not mean they can safely be removed.
