LIVE MATERIAL PREVIEW Drag to orbit · Scroll to zoom
Processed locally · Your textures never leave this device
Output: 2048 × 2048 ~ 5.8 MB

Grayscale Elevation DSP · Sobel & Scharr · 16-bit PNG Support

Height Map to Normal Map

Convert any grayscale elevation image into an OpenGL (+Y) or DirectX (-Y) tangent-space normal map in seconds—100% locally in your browser. Pre-configured with Sobel slope filtering and 16-bit displacement export inside our Normal Map Generator studio (or use Texture to Normal Map for diffuse photos).

Sobel / Scharr
Gradient Solvers
16-bit PNG
Height Export
0 Uploads
Browser-Local DSP
Three calibrated PBR material spheres showing height map to normal map conversion under studio lighting

What a Height Map Is and Why Bit Depth Matters

Grayscale luminance stores vertical elevation at every texel, making resolution symmetry and quantization depth critical before slope conversion.

A height map (also called an elevation or bump map) is a single-channel grayscale image where every pixel encodes relative surface altitude rather than color. Pure black (0) marks the deepest crevice or mortar joint, mid-gray (128) represents neutral ground level, and pure white (255 in 8-bit, or 65,535 in 16-bit) represents the highest raised ridge. Because shading engines convert elevation differences directly into directional surface slopes, input quality governs normal map accuracy.

Always prepare your height map at a clean power-of-two resolution—such as 512×512, 1024×1024, 2048×2048, or 4096×4096—so GPU mipmaps filter cleanly without edge bleeding. When baking elevation from ZBrush, Blender, Houdini, or Substance Designer, avoid JPEG compression: 8-bit JPG blocks introduce square ringing artifacts that normal-map gradient filters immediately amplify into visible grid noise. Even an uncompressed 8-bit PNG only carries 256 distinct gray steps, which can show faint contour rings across gradual slopes; smoothing lightly before slope calculation or working with 16-bit displacement exports keeps subtle terrain gradients clean.

How Height Map to Normal Conversion Works

Finite-difference convolution filters sample neighboring height texels to compute tangent-space X, Y, and Z vectors in real time inside your browser.

Gradient-to-Normal Vector Math

At each pixel (x, y), the converter measures horizontal elevation slope (dH/dx) and vertical elevation slope (dH/dy) across adjacent grayscale texels. Those partial derivatives form a 3D tangent vector normalize(-dH/dx * Strength, ±dH/dy * Strength, Z-Bias), which is remapped from [-1, +1] into the familiar lavender-blue RGB space (128, 128, 255 for flat surfaces). Using the Invert Height switch flips black-and-white elevation priority immediately when your source map encodes depth dark-side-up.

Sobel vs. Scharr Kernels & Smoothing

Switch between Sobel 3×3 and Scharr 5×5 in the Advanced Normal Inspector tab. Sobel produces crisp, assertive bevel transitions well suited to masonry, tiles, and machined metal. Scharr uses optimized derivative weights to achieve better rotational invariance so curved pebbles, fabric folds, and diagonal cliffs shade smoothly without directional aliasing. Pair either kernel with Blur (0.15–0.50) to tame high-frequency source noise and Micro Detail to preserve crisp pore relief. If you are starting from a lit RGB surface photo instead of pure elevation, switch to our texture to normal map converter.

Height Map vs. Normal Map vs. Displacement Map

Although height, normal, and displacement textures describe surface relief, game engines and offline renderers apply them at completely different pipeline stages.

Attribute Height Map Normal Map Displacement Map
Data Encoding Single-channel grayscale elevation (0 = low, 1 = high) 24-bit RGB tangent-space surface slope vectors (X, Y, Z) Grayscale scalar offset (typically 16-bit PNG or 32-bit EXR)
Geometry Impact None directly; drives parallax or normal baking Fakes micro-shadowing per pixel without moving vertices Physically subdivides and pushes mesh vertices in 3D space
Silhouette & Cost Flat silhouette; cheap to store and sample Flat silhouette; ultra-fast real-time shading at 60–120 FPS True geometric silhouette; higher tessellation / Nanite cost
Best Use Case Source elevation authoring, blend masks, and parallax occlusion Game engines, real-time PBR materials, and close surface grain Hero architecture close-ups, terrain meshes, and UE5 Nanite

Export Settings: 8-bit vs. 16-bit PNG, Polarity & Formats

Choose lossless tangent normal formats, 16-bit height depth, and engine-matched green channel polarity so relief never inverts on import.

Once your live 3D Sphere or Cube highlights look accurate, dial in export settings for your target renderer. 8-bit PNG or 24-bit uncompressed TGA is ideal for tangent-space normal maps in real-time engines because lossless encoding prevents compression blocking in the red and green slope channels. Avoid JPG for normal maps whenever possible: chroma subsampling smears tangent angles into blocky reflections.

Enable 16-bit Height PNG whenever exporting displacement alongside your normal map. Unlike 8-bit grayscale (256 steps), a 16-bit single-channel PNG stores 65,536 elevation levels—eliminating stair-step terracing in Unreal Engine 5 Nanite displacement, Unity HDRP tessellation, and Blender Adaptive Subdivision. Finally, verify normal polarity before exporting: choose DirectX (-Y) for Unreal Engine 5 and Direct3D, or OpenGL (+Y) for Unity, Godot 4, Blender, and Three.js, and always import Normal and Height textures as Linear / Non-Color data rather than sRGB.

Height Map to Normal Map FAQ

Answers covering grayscale height maps, Sobel vs. Scharr convolution kernels, 16-bit PNG quantization, and OpenGL vs. DirectX tangent polarity.

How do I convert a height map to a normal map without losing detail?

Drop your grayscale elevation PNG, JPG, or WebP file into the Height Map to Normal Map workbench above. Keep Sobel selected for crisp architectural and stone bevels, adjust Strength and Blur while inspecting the 3D viewport, choose OpenGL (+Y) or DirectX (-Y) polarity, and export a lossless PNG or TGA normal map.

What is the difference between Sobel 3×3 and Scharr 5×5 normal extraction?

Sobel 3×3 applies a classic [1, 2, 1] gradient kernel that produces crisp edges for brick mortar, tiles, and sculpted panels. Scharr 5×5 uses weighted [3, 10, 3] coefficients for improved rotational symmetry, minimizing diagonal staircase artifacts on curved rocks, terrain slopes, and organic patterns.

Why does my height-derived normal map show stair-stepping on smooth gradients?

Stair-stepping (contour banding) occurs when an 8-bit grayscale height map only has 256 discrete elevation levels across a shallow ramp. Enable mild Gaussian Blur (between 0.25 and 0.65) in the Normal Inspector to interpolate across steps, and export 16-bit grayscale Height PNG files when saving displacement maps.

Should I use OpenGL (+Y) or DirectX (-Y) when exporting a height-to-normal map?

Select DirectX (-Y) when importing into Unreal Engine 5, 3ds Max, or Direct3D renderers, and select OpenGL (+Y) for Unity, Godot 4, Blender, and Three.js. Switching the Export Target button automatically sets the green channel sign and file naming pattern for your engine.

Can I convert a normal map back to a height map?

Yes—reconstructing a height map from an existing tangent-space normal map is mathematically possible via Poisson gradient integration. While this workbench focuses on forward conversion from grayscale elevation maps and diffuse textures into tangent normals and 16-bit height displacement, you can invert height polarity on any input and export calibrated 16-bit elevation PNGs today.