New: 12 free tools for Unreal Engine and Unity developers.Try them →

DirectX vs OpenGL Normal Maps: Unreal Engine and Unity Explained

Why your normal map looks inverted, which format Unreal Engine and Unity expect, and three ways to fix the green channel.

You import a brick wall, plug in the normal map, and something looks wrong. The bricks look pushed in instead of sticking out, or the light seems to come from below. Nine times out of ten the cause is the same: the normal map uses the wrong green channel convention for your engine.

This guide explains what is going on and how to fix it in Unreal Engine and Unity.

What a normal map stores

A tangent-space normal map stores the direction each pixel of a surface faces, packed into colour:

  • Red = left ↔ right (X)
  • Green = up ↔ down (Y)
  • Blue = pointing out of the surface (Z)

A perfectly flat area is (128, 128, 255), which is why normal maps are mostly that familiar purple-blue.

The one difference: the green channel

There are two conventions for which way "up" points in the green channel:

ConventionGreen channelUsed by
DirectX (Y−)Green points downUnreal Engine, 3ds Max, Substance (DirectX preset)
OpenGL (Y+)Green points upUnity, Blender, Godot, Maya

Red and blue are the same in both. Only green is flipped. That is why a wrong normal map does not look broken; it looks subtly wrong, with dents where there should be bumps and lighting that comes from the wrong side.

How to tell which one you have

Look at a raised shape, like a stud, rivet or brick, with the light coming from above:

  • OpenGL: the top edge of the bump looks bright green / light.
  • DirectX: the bottom edge looks bright green; the top looks darker.

Another quick test: put the texture in your engine with a light above it. If bumps look like dents, the green channel is flipped for that engine.

Fixing it in Unreal Engine

Unreal expects DirectX normal maps. If yours is OpenGL:

  1. Open the texture in the Texture Editor.
  2. Tick Flip Green Channel.
  3. Make sure Compression Settings is Normalmap. Unreal usually detects normal maps on import and sets this for you, but it is worth checking.

Fixing it in Unity

Unity expects OpenGL normal maps. If yours is DirectX:

  1. Select the texture and set Texture Type to Normal map.
  2. Enable Flip Green Channel in the import settings.
  3. Click Apply.

Unity can also build a normal map from a greyscale height map with Create From Grayscale and a Bumpiness slider. It works, but you get less control than a dedicated generator.

Generating the right format from the start

The free Normal Map Generator creates normal maps from height maps or textures in either format:

  • Choose DirectX for Unreal or OpenGL for Unity.
  • Adjust strength to control how deep details look.
  • Use smooth / blur to remove noise from photos.
  • Keep seamless tiling on for tileable textures, so the edges match.

Move your mouse over the lit preview to see your bumps under a moving light before you download. If a bump looks like a dent in the preview, it will in the engine too.

Common mistakes

  • Importing normal maps as sRGB colour textures. Normal maps are data. Use the Normal map texture type in both engines so they are not gamma corrected.
  • Painting over normal maps in an image editor and saving with colour management. This shifts the values.
  • Resizing with the wrong filter. Downscaling is fine, but avoid sharpening filters on normal maps.
  • Mixing conventions in one material pack. If you buy assets, check whether the pack is DirectX or OpenGL; good sellers say so in the description.

Summary

  • Unreal = DirectX (green down). Unity = OpenGL (green up).
  • Inverted-looking bumps mean the green channel is flipped.
  • Fix it with Flip Green Channel in either engine, or generate the right format from the start.
  • #textures
  • #normal maps
  • #unreal engine
  • #unity

Keep reading