Skip to content
NormalMap Gen On-device processing

MATERIAL LAB / 01

Normal Map Generator for PBR Textures and 3D Materials

Generate normal, height, AO, and specular or roughness PNGs in your browser. Compare OpenGL and DirectX maps under a movable light.

Open the workbench
A sculpted tile shown as grayscale relief, a colored normal map, and lit metal.
FIG. 01Height field → tangent-space vectors → lit surface

WORKBENCH / 01

Tangent-space studio

Local canvas processing384 × 384

01

Source texture

02

Material controls

Height / displacement
Ambient occlusion
Specular / roughness
03

Generated maps

Inspect each channel, then export at source resolution (up to 1024 px).

Normal map
NormalRGB / OpenGL +Y

04

Relit preview

Drag the light or use the arrow keys.

Relit preview

L = (−0.44, +0.50, +0.75)

max(0, N · L) + specular

From a photograph to a material test

Start with a height image if you have one. In a heightfield, brighter pixels represent higher points. If you supply a photograph instead, the studio uses brightness as a guess at relief: a white paint spot can become a hill and a cast shadow can become a groove. To learn the controls without that ambiguity, begin with the procedural brick wall. Its mortar gives you a clear low point, its bevel gives you a clear slope, and the larger brick face should remain mostly flat as you move the light.

  1. Choose a source. Try the four procedural samples to see how the same settings behave on masonry, rounded paving, fine steel scratches, and manufactured panel edges. Switch to a local PNG, JPEG, or WebP when you have a candidate texture. Larger images are resized with aspect ratio preserved.
  2. Tune height before lighting. In the Height tab, use contrast to separate levels and bias to place the working range away from clipping. Enable height inversion only if the underlying high and low areas are swapped. If a brick face breaks into bright speckles, reduce sharpening or move toward a small blur.
  3. Inspect the normal and the lighting together. Start at modest strength. Drag the point light from above to below, then side to side. A sharp highlight that never moves is probably in the source image, not the computed normal. Compare Sobel and Scharr without changing strength so you can see how each kernel treats diagonal grooves.
  4. Check the supporting maps. AO should be pale on open areas and darker in recesses. The spread setting changes the scale of pockets that influence it; it does not measure real distances in your model. For the fourth map, pick specular to control highlight intensity or roughness to control highlight spread in the preview.
  5. Export and verify. Choose the normal convention for the destination and export the active map or all four. Put the same material on a small plane, repeat the texture twice and move a single light. Evaluate at the distance the audience will see, not only in a zoomed-in texture inspector.

Starting conventions by engine

These are good starting points for ordinary tangent-space materials. A custom shader, mirrored UV island or model loader can change the setup. Flip the green axis at export or import, but not in both places.

Engine Start with What to check
Unity OpenGL +Y Import as a Normal Map; flip green only for an opposite convention.
Unreal Engine 5 DirectX −Y Use normal compression; leave the import green flip off for a −Y export.
Blender OpenGL +Y Use Non-Color data and connect a Tangent Space Normal Map node.
Godot 4 OpenGL +Y Enable the normal slot on StandardMaterial3D and test on the intended UVs.
Three.js OpenGL +Y On a simple plane use +Y; preserve loader handling on glTF geometry.

What the live preview can prove

The browser renders a small, flat patch with height-aware point lighting. It uses the freshly computed normals, estimated AO and surface response; it does not cast geometric shadows or preview the displaced silhouette. The OpenGL and DirectX exports can look different in the map panel while looking the same in the preview, because the preview interprets the selected convention. That is expected. To diagnose an import mismatch, do the one-light test inside the destination renderer. Label the exported files with the convention and note any additional red-channel inversion used in the project.

Same vector, different green channel

A tangent-space normal tells the renderer which way a surface faces relative to the mesh's UV tangents. Red holds X, green holds Y and blue holds Z. A flat patch encodes approximately as (128, 128, 255). The two common normal formats disagree on the sign of Y, not on where the texels are located. With 8-bit data the conversion is G′ = 255 − G; red and blue remain untouched. Do not mirror the image vertically or invert all three channels.

Diagnose with an asymmetric bevel

Use a plane with known UV orientation and an off-center shallow shelf; a round bump alone can be hard to read. Use a plain material, one light and no baked shadows. First sweep the light along X, then along Y. If only the north–south faces react backwards, compare green polarity. If one mirrored island fails while the rest of the mesh looks right, investigate tangent handedness, UVs and the mesh export before altering the entire texture.

OpenGL vs DirectX ↗

Height data versus shading detail

A height map describes elevation on a scalar scale. In a displacement shader it can move vertices, change a silhouette and alter shadows, but only where the mesh is dense enough. A bump node can use the same height input to estimate slopes during shading without moving vertices. A normal map already encodes directions in RGB: it is convenient for runtime lighting but cannot recover a unique original heightfield or move a silhouette by itself.

Separate ambient and specular response

Ambient occlusion describes reduced access to indirect light, not permanent pigment in a material. Put it in an AO slot instead of multiplying it into albedo by default. The studio estimates AO from nearby heights; it does not see another object leaning on the surface. Specular intensity and roughness are also different quantities: one varies reflectance strength and the other changes the breadth of the highlight. A photo alone cannot determine physical reflectance, so treat grayscale estimates as editable masks, not measurements.

PBR map guide ↗

Match slope as well as brightness

Move the tile by half its width and height with wrap enabled in your editor. The original border becomes a cross at the center. Fix the cross with a clone or blend that preserves the material pattern. Continuity means both sides agree in level and meet with a compatible slope. Matching the edge pixels alone can leave a visible crease. Render a two-by-two repeat and inspect it under grazing light; a seam hidden head-on can still stand out at a shallow angle.

Remove baked lighting before differentiation

Shoot or prepare a source with diffuse light and little glare. A broad exposure gradient becomes a permanent tilt in the generated normals; a cast shadow can turn a flat floor into a trough. Reduce that large-scale lighting gradient separately from material pores. Do not remove true large-scale relief by accident. When color differs from height, paint a grayscale mask or use actual scan data instead of assuming every bright patch is high.

Seamless textures ↗

Frequently asked questions

Is my image uploaded?

No. The studio reads the file and draws both the maps and relit preview on your device. Page requests and aggregate site counts are separate.

What is the maximum output size?

The longest edge is capped at 1024 pixels, with aspect ratio preserved. Exports are 8-bit PNG files.

Can I create maps without a source image?

Yes. Choose brick, cobblestone, brushed steel or the hex panel; each sample is computed in the browser.

Why does relief look reversed in my renderer?

For a mismatch along Y, flip the green channel once. If all peaks and valleys are swapped, inspect the input height polarity instead.

Is specular the same as roughness?

No. Specular changes highlight amplitude; roughness changes its spread. Choose the channel your material expects.

Does wrap remove any seam?

No. It samples across borders; it cannot erase a large discontinuity in the original height image.

Explore the field notes

OpenGL vs DirectX PBR map guide Seamless textures