# Texture map baker

- Human page: https://happytails.ai/en/image-tools/texture-map-baker/
- Markdown: https://happytails.ai/en/image-tools/texture-map-baker.md
- Structured JSON: https://happytails.ai/agents/en/image-tools/texture-map-baker/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `texture-map-baker` |
| Category | image-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Use the visible action or interactive controls. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Images are processed in this browser and never uploaded. Use still PNG, JPEG or WebP files up to 20 MiB each.

### Inputs and settings

No free-text input is required. Use the file inputs and/or settings below.

Accepted browser files: `.png,.jpg,.jpeg,.webp`. Choose one file.

Browser file-input limit: 20971520 bytes in total. HTTP limits can differ.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `convention` | Normal map convention | select | "opengl" | Allowed: opengl, directx |
| `strength` | Normal strength | number | "2" | min=0.1 max=20 step=0.1 |
| `invertHeight` | Treat dark areas as raised | checkbox | false |  |
| `blur` | Height smoothing radius | number | "1" | min=0 max=16 step=1 |
| `wrap` | Texture tiles (wrap edges) | checkbox | true |  |
| `roughnessBase` | Base roughness | number | "0.35" | min=0 max=1 step=0.05 |
| `roughnessGain` | Roughness from detail | number | "2" | min=0 max=8 step=0.1 |
| `roughnessRadius` | Roughness detail radius | number | "2" | min=1 max=16 step=1 |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Images stay in this browser and are never uploaded. Use one still PNG, JPEG or WebP image up to 20 MiB and 4,194,304 pixels, for example 2048 by 2048. Strength 0.1 to 20, smoothing 0 to 16 pixels, detail radius 1 to 16 pixels. Processing stops after 30 seconds. You get three PNG maps at the source size and a JSON report. Source metadata and color profiles are not copied.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "texture-map-baker",
  "category": "image-tools",
  "built": true,
  "requirements": "Images stay in this browser and are never uploaded. Use one still PNG, JPEG or WebP image up to 20 MiB and 4,194,304 pixels, for example 2048 by 2048. Strength 0.1 to 20, smoothing 0 to 16 pixels, detail radius 1 to 16 pixels. Processing stops after 30 seconds. You get three PNG maps at the source size and a JSON report. Source metadata and color profiles are not copied.",
  "implementation": {
    "fields": [
      {
        "key": "convention",
        "label": "Normal map convention",
        "value": "opengl",
        "type": "select",
        "values": [
          "opengl",
          "directx"
        ],
        "labels": {
          "opengl": "OpenGL (green up, Blender, Unity)",
          "directx": "DirectX (green down, Unreal, 3ds Max)"
        }
      },
      {
        "key": "strength",
        "label": "Normal strength",
        "value": "2",
        "type": "number",
        "min": 0.1,
        "max": 20,
        "step": 0.1
      },
      {
        "key": "invertHeight",
        "label": "Treat dark areas as raised",
        "value": false,
        "type": "checkbox"
      },
      {
        "key": "blur",
        "label": "Height smoothing radius",
        "value": "1",
        "type": "number",
        "min": 0,
        "max": 16,
        "step": 1
      },
      {
        "key": "wrap",
        "label": "Texture tiles (wrap edges)",
        "value": true,
        "type": "checkbox"
      },
      {
        "key": "roughnessBase",
        "label": "Base roughness",
        "value": "0.35",
        "type": "number",
        "min": 0,
        "max": 1,
        "step": 0.05
      },
      {
        "key": "roughnessGain",
        "label": "Roughness from detail",
        "value": "2",
        "type": "number",
        "min": 0,
        "max": 8,
        "step": 0.1
      },
      {
        "key": "roughnessRadius",
        "label": "Roughness detail radius",
        "value": "2",
        "type": "number",
        "min": 1,
        "max": 16,
        "step": 1
      }
    ],
    "registrationFamily": "raster-masks-and-textures",
    "files": true,
    "input": false,
    "multiple": false,
    "accept": ".png,.jpg,.jpeg,.webp",
    "maxFileBytes": 20971520,
    "deferImagePreview": true,
    "note": "Images are processed in this browser and never uploaded. Use still PNG, JPEG or WebP files up to 20 MiB each.",
    "experience": {
      "automatic": false,
      "single": true,
      "inputMaxLength": 1000000,
      "inputMode": "text",
      "label": "Texture image",
      "placeholder": "Choose a PNG, JPEG or WebP texture",
      "help": "One still image up to 20 MiB and 4,194,304 pixels, such as 2048 by 2048. Up to 1,000,000 characters. Review the settings before running.",
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Make a normal map, height map and roughness map from one texture photo for 3D materials, with the OpenGL or DirectX green-channel convention clearly labeled. The maps are estimated from brightness and are a starting point to refine.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

### How to use Texture map baker

1. Choose a texture image, ideally evenly lit and without strong shadows.
2. Pick the normal map convention your 3D software uses.
3. Adjust the strength, smoothing and roughness settings, then run the tool.
4. Download the normal, height and roughness PNG files.

## Useful next steps

- [Image to STL](https://happytails.ai/en/maker-tools/image-to-stl/) ([Markdown](https://happytails.ai/en/maker-tools/image-to-stl.md))

- [Grayscale image](https://happytails.ai/en/image-tools/grayscale-image/) ([Markdown](https://happytails.ai/en/image-tools/grayscale-image.md))

- [Resize image](https://happytails.ai/en/image-tools/resize-image/) ([Markdown](https://happytails.ai/en/image-tools/resize-image.md))

## Height from brightness

Height is the Rec. 709 luminance of the encoded colors (ITU-R BT.709-6, 2015): 0.2126 red + 0.7152 green + 0.0722 blue, optionally inverted so dark areas are raised and smoothed with a box blur. This is a heuristic: bright paint on a flat wall will look raised, so these are not measured surface data.

### Normals and the green channel

Slopes come from 3 x 3 Sobel filters on the height map, multiplied by the strength, and each normal is stored as (n x 0.5 + 0.5) x 255. OpenGL maps (used by Blender, Unity and glTF) put +Y up in green, so a surface rising toward the top of the image has green below 128. DirectX maps (Unreal Engine, 3ds Max) flip green. The file name says which one you downloaded.

### Roughness

Roughness is the base value plus the gain times the local standard deviation of height within the detail radius, clamped to 0 to 1. Busy, detailed areas become rougher and smooth areas stay near the base value. With tiling on, every filter wraps around the edges so the maps tile like a seamless texture.
