Spring Sale: 30% off bundles with SPRINGBUNDLE or 15% off individual products with SPRING15 — ends Apr 15

StraySparkStraySpark
ProductsFree AssetsDocsBlogGamesAbout
StraySparkStraySpark

Game Studio & UE5 Tool Developers. Building professional-grade tools for the Unreal Engine community.

Products

  • Complete Toolkit (Bundle)
  • Procedural Placement Tool
  • Cinematic Spline Tool
  • Blueprint Template Library
  • DetailForge
  • UltraWire
  • Unreal MCP Server
  • Blender MCP Server
  • Godot MCP Server
  • AI Material Generator
  • Procedural Damage & Wear
  • One-Click PBR Bake

Resources

  • Free Assets
  • Documentation
  • Blog
  • Changelog
  • Roadmap
  • FAQ
  • Contact

Legal

  • Privacy Policy
  • Terms of Service

© 2026 StraySpark. All rights reserved.

Back to Blog
tutorial
StraySparkApril 12, 20265 min read
DirectX vs OpenGL Normal Maps: Why Your Textures Look Wrong in UE5 (And How to Fix It) 
Unreal EngineTexturesPbrGame DevelopmentBlender

You import a normal map into Unreal Engine 5. You apply it to a material. And the lighting is wrong. Bumps that should be raised look indented. Details that should push outward are pushing inward. The mesh geometry is fine. The UV mapping is correct. But something about the surface detail is clearly inverted.

This is one of the most common texture issues in game development, and it trips up beginners and experienced artists alike. The culprit is almost always a mismatch between DirectX and OpenGL normal map conventions. Once you understand what is happening, the fix takes seconds. But not understanding it can waste hours of debugging.

What Normal Maps Actually Store

A normal map encodes surface direction information in the RGB channels of an image. Each pixel stores a vector that tells the renderer which direction that point on the surface is facing. This vector has three components:

  • Red channel (X axis): Left-right surface direction
  • Green channel (Y axis): Up-down surface direction
  • Blue channel (Z axis): Surface depth (mostly points outward, which is why normal maps appear predominantly blue/purple)

The red and green channels do the heavy lifting for surface detail. They define whether a point on the surface tilts left, right, up, or down relative to the base geometry. The blue channel is mostly uniform because most surface points face roughly outward.

The Green Channel Flip

Here is the core issue: DirectX and OpenGL use opposite conventions for the green channel (Y axis).

In the OpenGL convention, a green value of 1.0 (bright) means the surface points upward in tangent space. This is sometimes called "Y+" because positive Y is up.

In the DirectX convention, a green value of 1.0 (bright) means the surface points downward in tangent space. This is sometimes called "Y-" because the Y direction is flipped.

The result is that the same bump — a rivet, a scratch, a pore — will appear to push outward in one convention and pull inward in the other. Visually, it looks like the lighting direction is inverted on the vertical axis. Raised details look like dents. Grooves look like ridges.

The red channel (X axis) is identical between both conventions. The blue channel is identical. Only the green channel differs.

A Quick Visual Test

If you are unsure whether your normal map is DirectX or OpenGL, look at it in an image viewer and focus on raised details:

  • OpenGL: Light comes from the top of the image on raised surfaces. The top of bumps appears bright green, the bottom appears dark.
  • DirectX: Light comes from the bottom of the image on raised surfaces. The top of bumps appears dark in the green channel, the bottom appears bright.

An even simpler test: look at your normal map applied to a flat plane in your engine. If bumps look correct when lit from above, you have the right convention. If they look inverted, you have the wrong one.

Which Engines and Tools Use Which Convention

This is where the confusion comes from — different tools default to different conventions.

DirectX Convention (Y-)

  • Unreal Engine (all versions)
  • Unity (uses OpenGL internally but imports DirectX normal maps by default with auto-flip)
  • CryEngine / Lumberyard / O3DE
  • Substance Painter / Designer (defaults to DirectX, configurable)
  • Marmoset Toolbag
  • 3ds Max

OpenGL Convention (Y+)

  • Blender (defaults to OpenGL)
  • Maya (defaults to OpenGL)
  • xNormal (defaults to OpenGL, configurable)
  • Houdini
  • GIMP / Photoshop normal map plugins (varies)

Notice the pattern: most DCC (Digital Content Creation) tools default to OpenGL, while most game engines use DirectX. This means that if you bake normal maps in Blender and import them directly into Unreal Engine 5, the green channel will be wrong.

The Blender-to-UE5 Problem

This is the most common scenario where the mismatch causes problems. Blender bakes normal maps in OpenGL format by default. UE5 expects DirectX format. When you import a Blender-baked normal map into UE5 without conversion, every vertical surface detail will be inverted.

Horizontal details (left-right scratches, seams running up and down) look correct because the red channel is the same. But vertical details (top-bottom scratches, seams running left to right, any bump with a vertical component) look wrong.

This is particularly insidious because some details look fine while others look wrong, which makes you doubt whether the normal map is actually the problem.

How to Fix It

Method 1: Flip the Green Channel in an Image Editor

Open your normal map in Photoshop, GIMP, or any image editor that supports channel manipulation.

  1. Select only the green channel
  2. Invert it (in Photoshop: Image > Adjustments > Invert; in GIMP: Colors > Invert)
  3. Save

That is the entire fix. You are literally just inverting one channel.

Method 2: Fix It in Blender at Bake Time

If you are baking in Blender, you can set the normal map to DirectX format before baking. In the bake settings, there is no direct toggle, but you can use a compositor trick:

1. Bake your normal map as usual (OpenGL)
2. Open the image in Blender's Image Editor
3. Use a Python script to flip the green channel:
import bpy
import numpy as np

image = bpy.data.images["your_normal_map"]
pixels = np.array(image.pixels[:])
pixels = pixels.reshape(-1, 4)

# Flip the green channel: invert by doing 1.0 - green
pixels[:, 1] = 1.0 - pixels[:, 1]

image.pixels = pixels.flatten().tolist()
image.update()

This script loads the pixel data, inverts only the green channel, and writes it back. Run it from Blender's text editor after baking.

Method 3: Fix It in UE5 on Import

Unreal Engine 5 has a built-in option for this. When you import a texture:

  1. Double-click the imported texture to open its properties
  2. Under the Texture section, check Flip Green Channel
  3. Save the texture

You can also set this in the import dialog when first importing the texture. If you are importing many textures at once, you can set this as a default in your import settings.

Method 4: Fix It in the UE5 Material

If you do not want to modify the texture asset itself, you can flip the green channel in the material graph:

  1. Add your normal map texture sample
  2. Break the output into individual channels using an AppendVector or ComponentMask node
  3. Multiply the green channel by -1 (using a Multiply node)
  4. Recombine the channels
  5. Connect to the normal input

This works but adds a small amount of shader complexity. Fixing the texture itself is cleaner.

Method 5: Batch Fix with Substance Painter/Designer

If you use Substance tools, set your project's normal map format to DirectX in the project settings. All baked and generated normal maps will use the correct convention for UE5.

In Substance Painter: Edit > Project Configuration > Normal Map Format > DirectX.

Preventing the Problem Entirely

The best fix is to never have the problem in the first place. Here are some workflow practices:

  • Set your baking tool to match your target engine's convention. If you are targeting UE5, make sure every tool in your pipeline outputs DirectX normals.
  • Name your files clearly. Include _DX or _GL in the filename so you always know which convention a normal map uses.
  • Create export presets. In tools like Substance, save presets that automatically output the correct format for your target engine.
  • Validate on import. Quick-apply any new normal map to a test sphere with obvious bumps. If the bumps look wrong, flip the green channel before going further.

What About Mikk Tangent Space?

You might also encounter tangent space mismatches, which is a separate but related issue. Unreal Engine uses the MikkTSpace tangent basis for normal map calculations. If your normal maps were baked using a different tangent space (which happens with some older tools), you will see subtle shading errors even if the DirectX/OpenGL convention is correct.

Blender 3.x and newer use MikkTSpace by default, so this is less of an issue than it used to be. But if you are using older baking tools, make sure MikkTSpace is enabled.

The tangent space issue produces softer, more subtle errors than the green channel flip — slightly incorrect lighting angles rather than fully inverted bumps. If your normals look "almost right but not quite," tangent space mismatch is worth investigating.

Automating the Convention with Baking Tools

If you are regularly baking normal maps for UE5 from Blender scenes, automating the convention handling removes the issue entirely from your workflow. One-Click PBR Bake & Export handles the DirectX/OpenGL conversion automatically — it detects your target engine setting and outputs normal maps in the correct convention without any manual channel flipping. You set your target once and every bake produces engine-ready maps.

This matters most when you are baking frequently during iteration. Manually flipping channels once is fine. Manually flipping channels dozens of times during a texturing session adds up and introduces opportunities for error.

Summary

The DirectX vs OpenGL normal map issue boils down to one fact: the green channel is inverted between the two conventions. UE5 uses DirectX. Blender defaults to OpenGL. When you move normal maps between tools that use different conventions, flip the green channel.

  • Raised details look like dents? Your normal map convention is wrong.
  • Only vertical details look wrong, horizontal details are fine? Definitely a green channel flip.
  • Fix: Invert the green channel in an image editor, at bake time, or on import in UE5.
  • Prevent: Set your baking tools to output DirectX format when targeting UE5.

Once you understand the cause, this is a 10-second fix. The goal is to build a pipeline where you never need to think about it at all.

Tags

Unreal EngineTexturesPbrGame DevelopmentBlender

Continue Reading

tutorial

AI Material Generation in Blender: The Complete Guide for 2026

Read more
tutorial

How AI Is Cutting Asset Creation Time by 60% for Indie Studios in 2026

Read more
tutorial

Blender 5.0 for Game Developers: The Features That Actually Matter

Read more
All posts