happytails.ai

Texture map baker

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.

No files selected

Accepted files: .png,.jpg,.jpeg,.webp. Choose one file. Up to 20 MiB in total.

Your result

Report a problem or share an idea.

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

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.