DirectX- vs. OpenGL-Style normal maps

If you import normal maps from CC0Textures.com into Blender, Unity or some other programs the normal map can sometimes look a little bit… off. Reflections appear to go in the wrong direction and the perception of height does not feel right.

Why does this happen?

This behavior has to do with the different ways the two big graphic standards OpenGL and DirectX convert the Y-Axis of 3D space into the green color channel of the normal map.

CC0 Textures creates its normal maps according to the DirectX standard, this means that in some tools which expect OpenGL-style maps the results may look distorted.

What can I do to fix this?

Editing the map itself

Luckily this problem can be solved very quickly: Just invert the green color channel of the normal map. This will convert a DirectX map to openGL and vice versa. Open up the normal map in the image editor of your choice and open the color curves. Open the curve for the green color channel and invert it. You can invert an individual color channel by moving the beginning of its curve all the way to the top and the end all the way to the bottom (as shown in the picture).

Blender

You can also perform this action using pretty much every 3D Software that has a node editor like Blender or Substance Designer. Just split the normal map into its RGB Channels, invert the green one using an “Invert” node and merge them back together. The image shows this setup in Blender.



CC0 Textures
CC0 Textures Material Creation Guide
CC0 Textures on Patreon
CC0 Textures on Twitter
CC0 Textures on Instagram


User Tools