Generating Normal Maps in GIMP Using GEGL Emboss
Normal maps add realistic depth, relief, and tactile surface detail to 3D models and 2D textures without adding extra geometric complexity. This guide explains how to convert a standard image into a tactile normal map using the GEGL Emboss operation in GIMP. By isolating height data, applying directional lighting slopes, and correctly formatting color channels, you can produce standard tangent-space normal maps directly inside GIMP.
Step 1: Prepare the Heightmap Base
Normal maps calculate surface angles based on grayscale luminance, where white represents high points and black represents low points.
- Open your base texture in GIMP.
- Duplicate the layer (
Shift + Ctrl + D) to preserve the original image. - Desaturate the duplicate layer by navigating to Colors > Desaturate > Desaturate. Choose the luminance mode that best isolates the surface detail.
- Adjust the depth contrast using Colors > Levels or Colors > Curves to make the tactile details sharp and defined.
Step 2: Apply the GEGL Emboss Filter
The GEGL Emboss operation calculates directional gradients from your heightmap, simulating surface angles.
- Go to Tools > GEGL Operation... (or Filters > Distorts > Emboss).
- If using the GEGL Operation dialog, select
gegl:embossfrom the dropdown menu. - Configure the settings:
- Type: Select Emboss (to generate directional light and shadow) or Bumpmap (to create grayscale surface slope data).
- Azimuth: Set the light direction. For standard X-axis vector calculation, set this to 0.0 (or 180.0 depending on the required coordinate space).
- Elevation: Set the angle of inclination, typically between 30.0 and 45.0, to capture micro-surface relief.
- Depth: Increase the depth slider to amplify the perceived roughness and tactile intensity of the surface.
- Click OK to apply the filter.
Step 3: Convert the Emboss to Tangent-Space Normal Colors
A standard tangent-space normal map requires specific color assignments: the Red channel represents horizontal slope (X), the Green channel represents vertical slope (Y), and the Blue channel represents outward height (Z).
- Generate two separate embossed layers from your base heightmap:
- Horizontal Pass (Red Channel): Apply GEGL Emboss with Azimuth at 0°.
- Vertical Pass (Green Channel): Apply GEGL Emboss with Azimuth at 90° (or 270° for DirectX formats).
- Go to Colors > Components > Decompose and select RGB.
- In the decomposed image window:
- Paste the Horizontal Pass into the Red layer.
- Paste the Vertical Pass into the Green layer.
- Fill the Blue layer with pure solid white
(
#FFFFFF) or a high-contrast inverted version of the original heightmap to establish the perpendicular Z-vector.
- Recombine the channels by navigating to Colors > Components > Recompose.
Step 4: Normalize and Export
- Inspect the resulting image; it should have the characteristic
periwinkle-blue hue (
#8080FF) in flat areas. - To ensure all normal vectors are unit length, go to Filters > Generic > Normal Map... (if installed) or apply a slight blur/normalization step.
- Export the finished normal map via File > Export As... in a lossless format such as PNG or TGA to prevent compression artifacts from distorting the surface vectors.