Generating Perfect Normal Maps for Unity (and Other Programs)

And how to tell what’s wrong with your content pipeline.

Image for post
Image for post
Image for post
Image for post
Behold the majesty of … this … thing … the traditional normal map test shape!
Image for post
Image for post
Aren’t those sides supposed to be flat?

Preface

Table of Contents

The Basis of Tangent Space

Recognizing Your Enemy

Flipping Out Over an Obvious Error

Image for post
Image for post
Direct3D orientation normal maps in Unity, which expects OpenGL orientation

sRGBeing Funny

Image for post
Image for post
Normal map set to use the Default texture type with sRGB enabled

Too Different to be Normal

Image for post
Image for post
Normal maps baked on a smoothed mesh, displayed on a hard edged mesh
Image for post
Image for post
Normal maps baked on a hard edged mesh, displayed on a smoothed mesh

MikkTSpace vs Autodesk

Image for post
Image for post
3ds Max baked normal map used in Unity

Mesh Exports & Substance Painter

MikkTSpace vs MikkTSpace?

Image for post
Image for post
xNormal “pixel shader binormals” in Unity’s built in forward renderer

Triangulate, Triangulate, Triangulate!

Image for post
Image for post
Substance Painter baked normal maps in Unity on a mesh exported from 3ds Max as quads

The List For Perfect Normal Maps for Unity

Image for post
Image for post
Yay! Perfect Normal Map!
Image for post
Image for post
… with reflections …? Uh … *cough*

More on MikkTSpace

Tangent Space in Different Applications

Unity (5.3+)

Unreal Engine 4

Godot

PlayCanvas

Filament

3ds Max

Maya

Blender (2.57+)

xNormal (3.17.5+)

Substance Painter

Marmoset Toolbag 3

3DCoat

Houdini (16.0.514+)

Modo (10+?)

Knald

SketchFab

Additional Thoughts

Tech Artist & Graphics Programmer lately focused on Unity VR game dev.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store