Tutorials For Blender 3D
Home

Resources
Help

Normal Map Shader
Introduction


Normal map shaders are an easy way to make a low polygon model look like high polygon model. 

Below are two examples of the difference a  normal map shader can make in the game engine.




No Shader
low poly tile wall:  1 face




Shader
low poly tile wall:  1 face




No Shader
low poly head:  427 vertices




Shader
low poly head:  427 vertices
The head and it's normal map are from normalmap_tangent.blend.  Available for download at blender.org Normal Maps with Tangent Support

How do normal maps work?

The simple explanation.  Create two versions of your model.  A high polygon model with the detail.  A low polygon model for your game.  Take the normal map from the high polygon version and UV map it to the low polygon game version using an OpenGL glsl normal map shader.

Normally when you look at a 3D model, you see light that has been reflected from the surface of the 3D model.

When a normal map is used, the surface of the 3D model isn't used to calculate how the light is reflected.  Instead, information provided by the normal map is used.  You see light reflected from surfaces that aren't there.

Even though the details you see are an illusion, they have the same highlights and shadows as real details.  Change the direction the light is coming from and the highlights and shadows change.  Just like they would on real details.

BGE_NMap.py

BGE_NMap.py is the OpenGL glsl normal map shader that I wrote. 

I'm releasing the script under the Creative Commons Attribution License.  This means that you can use the script for both personal and commercial projects.  All that I ask is that you give me credit and don't claim it as your own.


Next Page










Copyright Clark Thames