Terrain Normal Map GeneratorLocal browser processing
Source image
Landscape height
Landscape height
Normal map
Normal map

Choose a local image or try the sample.

Live preview is bounded to 512 px. Export recalculates full quality. Mesh units are illustrative.

Terrain Normal Map Generator

This terrain normal map generator separates landscape-scale slopes from smaller surface detail. Upload height data or try the periodic landscape sample, then compare the height, normal, and mesh views. Use relative strength unless you explicitly supply horizontal terrain size and vertical height range in matching units.

How to Get Started

Load a grayscale heightmap and keep its input meaning on Height data. If using a ground photograph, select Estimated image so the warning remains explicit. Set macro slope strength, smoothing, and fine residual detail before adding procedural micro variation. Choose non-wrapped edges for a finite landscape or wrapping for an authored repeating field. Inspect a mesh preview and then set the desired output convention. Download uses the full source dimensions rather than the bounded preview.

What Is a Terrain Normal Map?

A terrain normal map records local slope directions that help a renderer light a landscape or ground material. It does not contain elevation values or generate collision. The terrain normal map generator differentiates a prepared scalar field, converts slopes into a vector, and normalizes it. This makes broad landscape inclination and small relief independently adjustable, unlike a generic height conversion with only one strength slider. The supplied height field remains the starting evidence for the result.

Heightmaps and Landscape Normals

Authored or surveyed height data is more suitable than a shaded terrain photograph. A grayscale image can represent elevations only when its range and interpretation are known. The input path currently prepares scalar values from browser-decoded image samples, so it does not preserve a geospatial raster's metadata or native high-precision elevation format. Keep a high-bit-depth master for terrain construction. The normal export is an eight-bit-per-channel lighting texture, not a replacement elevation dataset.

Macro Versus Micro Terrain Detail

Macro strength scales a smoothed, broad component of the field. Fine residual strength scales the difference between the prepared source and its broader estimate. Optional micro detail adds deterministic periodic surface variation, useful for stylized ground accents. It is generated detail, not recovered geology. Increasing all three can make hills appear rocky even when the source is smooth. Judge the output at the intended terrain UV density, especially where small features could alias at distant views.

Understanding Terrain Scale

In relative mode, strength describes normalized relief without meters or feet. Physical scale requires the horizontal width of the represented terrain and its vertical height range. Both inputs use the same selected unit; depth follows the image aspect ratio under a square-cell assumption. The slope factor converts elevation change per pixel into rise over run. Strength one with macro and fine values one is the baseline; other values deliberately exaggerate or attenuate that slope rather than reporting measured terrain.

Edge Wrap and Tiling

A finite heightmap should usually use clamped sampling at its outer boundary, where neighboring elevation is unavailable. Wrapping treats the opposite edge as the next sample, which is correct only for a periodic field. It can create a false cliff when the two sides differ. Tile preview exposes this mismatch, but a repeated normal texture does not prove the landscape heights connect. For adjacent terrain chunks, calculate borders with shared neighboring height samples in the terrain pipeline.

Terrain Normals in Game Engines

A landscape system may calculate geometry normals directly from its heightfield and add a separate tiled detail normal in the material. Use the terrain normal map generator when preparing a ground-detail layer, inspecting slope interpretation, or building an explicitly sampled custom shader. Avoid applying the same macro slope twice through both displaced geometry and a texture. Compare the engine's mesh shading with and without the additional map before committing to the material.

When Engine-Generated Normals Are Better

Native landscape normals often agree better with chunk borders, level of detail, dynamic edits, and the engine's terrain geometry. A standalone texture cannot automatically follow those updates. Terrain normals derived externally are useful only when their sampling and intended material space match the destination. If the actual terrain is generated from a high-precision heightfield, preserve that pipeline and use this tool for checks or supplementary detail. Scalar displacement preparation is a separate task.

Prepare a scalar source for displacement

Height View and Mesh Preview

The height view shows the prepared scalar, including smoothing and the macro/fine balance. The mesh view samples it on a bounded, subdivided plane so major ridges become visible geometry. That geometry uses arbitrary preview units and its own calculated normals; it is a shape inspection, not a calibrated landscape renderer or an exported mesh. Inspect the normal and lit views separately to evaluate the actual PNG. Narrow ridges may be missed by the preview grid.

OpenGL Versus DirectX

Choosing Y+ or Y− reverses the encoded green direction while retaining the same prepared landscape relief. Use a known ridge and move a light across both axes to validate the target material convention. Inversion of scalar height is a different operation and swaps peaks with valleys. A conversion workspace is appropriate when the height is already correct and only the stored Y convention needs changing. Record the chosen convention in the exported filename.

Convert an existing landscape normal's Y convention

Common Landscape Preparation Mistakes

Do not infer meters from image dimensions, treat baked shadows as elevation, or wrap a finite survey by default. Excessive contrast clips useful height variation and excessive smoothing removes narrow ridges. Using macro normals on already sloped geometry can double the apparent inclination. The terrain normal map generator cannot repair missing elevation metadata or reveal absolute scale from a photograph. Use the validator to inspect vector lengths, suspicious distributions, and edges after export, then verify actual shading in the destination.

Inspect the exported landscape normal

Frequently Asked Questions

Can an image tell the tool how many meters it covers?

No. Physical mode requires explicit horizontal width and vertical height range. Otherwise the output uses relative strength.

Is the mesh exported?

No. The subdivided mesh is a bounded shape preview in arbitrary units; the download contains a normal PNG.

Does micro detail simulate erosion?

No. It is seeded periodic styling. No erosion, water flow, or geological simulation is performed.

Should I replace engine terrain normals?

Usually preserve native geometry normals when they already track the terrain correctly. Use external normals for compatible detail layers or checks.