> 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/good-to-know/normal-and-specular-maps.md).

# Normal & Specular Maps

Generate missing normal and specular maps from a drawable's diffuse texture

## Introduction

Plenty of clothing ships with only a diffuse texture. In game that reads as flat: fabric has no weave, seams do not catch the light, and leather looks like paper.

The **Normal & Specular Map Generator** derives a tangent space normal map and a grayscale specular map from the drawable's diffuse texture and embeds them into the `.ydd`, bound to the sampler slots the shader already declares.

{% hint style="warning" %}
Generated maps are a convenience baseline derived from the diffuse, not a replacement for maps an artist authored. They are a good starting point for clothing that has none at all.
{% endhint %}

{% hint style="info" %}
You can open the window, change every option, scan and read the plan without a license. **Generating the maps requires the Ultimate edition.**
{% endhint %}

## Three ways to reach it

* **From the drawable list**: right click one or more drawables and select **Generate Normal & Specular Maps...**.
* **From the Error List**: the `ModelMissingNormal`, `ModelMissingSpecular` and `ModelMissingNormalSpecular` findings offer **Generate Normal & Specular Maps**, which opens the generator scoped to that drawable with recommended settings and the missing map kinds selected. Existing maps are kept.
* **From the Model Optimizer**: the Files tab has a **Generate missing normal & specular maps** checkbox. It is off by default, it is remembered, and it works missing only, so it never replaces a map you already have.

## The window

The main surface keeps it simple:

* Checkboxes for **generate normal** and **generate specular**.
* A preset: **Subtle**, **Balanced**, **Strong** or **Custom**.
* A **plan grid** with one row per model file, an include checkbox, and a description of what will happen to each map kind.
* A **live preview** of the diffuse, the generated normal and the generated specular. Hover any of them to enlarge.

Advanced options remain visible but read-only without an active Ultimate license. Expand **Show advanced options (power user)** to reveal strength, smoothing, the gradient kernel, border mode, the green channel flip, specular brightness, contrast and invert, per map format, maximum size, which texture variation is used as the source, **Include first-person and alternate models** and **Replace existing maps**.

## What gets skipped, and why

The generator never invents shader parameters. It only binds a map into a sampler slot the shader already declares, and it reads the sampler bindings across every model and LOD of the drawable, so a texture that only a lower LOD refers to is not missed.

Per map kind it will skip when:

* the model declares no matching sampler slot, which is noted in the plan;
* a map is already embedded and bound, unless **Replace existing maps** is on;
* the shader references an external texture by name, which counts as present.

If the drawable already carries an unused embedded texture whose name looks like a map, that texture is bound into the slot instead of generating a duplicate.

Dummies, locked or corrupt items and decal drawables are never touched.

## Output

* Size follows the diffuse, rounded down to a power of two and halved until it fits the project's texture rules. The default cap for generated maps is **1024 px**.
* Format follows your override, then the project rule for that role, then the recommended format. Generated maps are opaque, so that is BC7 when DirectX 11 formats are enabled and BC1 otherwise.
* Full mip chains are generated.
* New textures are named `{prefix}_normal_000` and `{prefix}_spec_000`.

### Green channel orientation

The normal map is generated **green up** by default, which matches how the game's own shader reconstructs the surface. The advanced **green channel flip** switches to the DirectX orientation if you need it.

{% hint style="warning" %}
Green channel orientation and format support are exactly the kind of thing a preview cannot settle. Check generated maps in game before shipping them. If lighting looks inverted along seams and folds, try the flip.
{% endhint %}

## Undoing a run

The run is recorded in the project history, so reopening the generator offers **Undo last run**. The finished page also has **Copy report** and **Copy failures**. See [Project History](/basics/useful-to-know/project-history.md).
