How this normal map generator works
The tool reads image brightness as height, measures the change in height around each pixel, and converts those slopes into tangent-space surface normals. The result is encoded into the red, green, and blue channels of a standard normal map.
This approach is based on the Sobel-style height-to-normal workflow used by Christian Petry's open-source NormalMap-Online project. twirl keeps the core normal-generation workflow while removing unrelated map generators and legacy interface controls.
Use a height map when possible
A proper height map gives the cleanest result because its values already describe surface elevation. White usually represents higher areas and black lower areas. If the relief appears backwards, use Invert height.
You can also use a grayscale photograph, but shadows and highlights in the source can be interpreted as physical depth. For material work, a neutral height texture is usually more reliable.
OpenGL vs DirectX normal maps
The main difference is the green channel. OpenGL normal maps use +Y while DirectX normal maps use -Y. If dents look like bumps or lighting feels inverted in your target renderer, switch the normal format and export again.
Blender commonly expects OpenGL normals. Many real-time pipelines use DirectX normals, but the correct setting depends on the shader and import configuration.
Strength and smoothing
Strength controls how strongly height differences tilt the generated normals. Higher values make relief read more aggressively. Smoothing reduces tiny variations before the normal is calculated, which can help noisy scans and compressed images.