New: 36 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.

In this article
  1. What a normal map stores
  2. The one difference: the green channel
  3. How to tell which one you have
  4. Fixing it in Unreal Engine
  5. Fixing it in Unity
  6. Generating the right format from the start
  7. Common mistakes
  8. Summary
  9. FAQ

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.

Frequently asked questions

Does Unreal Engine use DirectX or OpenGL normal maps?

Unreal Engine uses DirectX normal maps, where the green channel points down (Y−). If you import an OpenGL normal map, tick Flip Green Channel in the Texture Editor.

Does Unity use DirectX or OpenGL normal maps?

Unity uses OpenGL normal maps, where the green channel points up (Y+). For a DirectX normal map, set the Texture Type to Normal map and enable Flip Green Channel in the import settings.

How can I tell if a normal map is DirectX or OpenGL?

Look at a raised shape lit from above. In an OpenGL map the top edge of the bump is lighter green; in a DirectX map the bottom edge is lighter. In the engine, bumps that look like dents mean the wrong convention.

Which normal map format does Blender use?

Blender uses OpenGL (Y+) normal maps, the same as Unity. Flip the green channel when you bring Blender normal maps into Unreal Engine.

  • #textures
  • #normal maps
  • #unreal engine
  • #unity
Written by Renish

Indie Unreal Engine developer and founder of Tvashta Studio. Builds the Shopping Simulator Kit plugin in UE5 C++ and the free tools on this site, and writes these guides from that work for Unreal Engine and Unity developers. More about the studio.

Related articles

All articles →