for Half-Life 2 » Scenery and Setting
updated Mon Oct 24th 2005 at 6:13pm
0 faves
0 ratings
18516 views
Learn To Make Normal Maps
updated Mon Oct 24th 2005 at 6:13pm
0 faves
0 ratings
18516 views
by darkdruid (view all articles)

unrated

In this tutorial you will learn how to create and implent normal maps into your custom source engine textures. Normal maps are textures that make your original texture look 3d.
If you do not know how to implent a regular texture than This tutorial is not for you!!. Instead you should probably visit this link here.
Also please note photoshop will be used for this tutorial but it is NOT necessary for the creation of normal maps. It's just the program I use. As an alternative you can use Paint Shop Pro, or other freeware solutions.
For starters we will need to download NVIDIA's Normal Map Tools. These can be found here.
After installing the NVIDIA tools open up the image you desire to create a normal for.
The image I will be using a normal map to create will be:
Before I usually create a normal map in photoshop I usually change the image into grayscale mode, change the contrast to give the normal map a little more detail that change it back to RGB mode so you can use the Normal Map tools. But that is ofcourse optional.
Once your texture is opened go to (in photoshop) Filter - nvTools - Normal Map Filter...
Once there I usually change the settings until I get the most sharp normal map possible. Under Height Generation I usually keep it on 4, and under Alternate Conversions I usually change it from Normalize only to Colorspace.
On the below picture I used those settings but Inverted the X and Y because I wanted the rocks in my texture to stick out instead of the cracks between the rocks.
Now that we have our Normal Map we need to save it as a tga. In order for a normal map to work it should have the same name as the regular picture except with a _normal on the end. An example of this is for the rock76.tga texture I used. The normal map would be called rock76_normal.tga
Your regular color texture and your normal must both be put through vtex.exe so they can be made into two their corresponding .vtf files.
If your were making this texture in hl2dm your textures would be in the :
youremail@whatever.comsourcesdk_contenthl2mpmaterialsrc(your folder name) folder.
After running your texture through vtex.exe it would save the textures in your:
youremail@whatever.comhalf-life 2 deathmatchhl2mpmaterials(your folder name) folder.
Remember (your folder name must be created in BOTH places.
Okay so now we have our color image and our normal. For those using my rock76 texture we have the rock76.vtf, and our rock76_normal.vtf.
But every texture needs a .VMT
We are going to create one very simple .VMT called rock76.vmt.
To create a .VMT all you have to do is create a .txt file and after putting in the desired informationed renaming it into a .VMT
Open up that .txt file now and I will show you what to put in it and why.
The LightmappedGeneric tells the engine that the texture is going to be lit by the map. That just basically means it will be a map texture not a model texture.
The $basetexture just tells the engine what texture the .VMT goes with.
And the $normalmap tells the engine that the texture rock76_normal is rock76's normal map.
Now you must test your texture ingame to see how it turns out:

If you do not know how to implent a regular texture than This tutorial is not for you!!. Instead you should probably visit this link here.
Also please note photoshop will be used for this tutorial but it is NOT necessary for the creation of normal maps. It's just the program I use. As an alternative you can use Paint Shop Pro, or other freeware solutions.
Getting What We Need
For starters we will need to download NVIDIA's Normal Map Tools. These can be found here.
After installing the NVIDIA tools open up the image you desire to create a normal for.
The image I will be using a normal map to create will be:

The Creation
Before I usually create a normal map in photoshop I usually change the image into grayscale mode, change the contrast to give the normal map a little more detail that change it back to RGB mode so you can use the Normal Map tools. But that is ofcourse optional.
Once your texture is opened go to (in photoshop) Filter - nvTools - Normal Map Filter...
Once there I usually change the settings until I get the most sharp normal map possible. Under Height Generation I usually keep it on 4, and under Alternate Conversions I usually change it from Normalize only to Colorspace.
On the below picture I used those settings but Inverted the X and Y because I wanted the rocks in my texture to stick out instead of the cracks between the rocks.

Now that we have our Normal Map we need to save it as a tga. In order for a normal map to work it should have the same name as the regular picture except with a _normal on the end. An example of this is for the rock76.tga texture I used. The normal map would be called rock76_normal.tga
Compiling
Your regular color texture and your normal must both be put through vtex.exe so they can be made into two their corresponding .vtf files.
If your were making this texture in hl2dm your textures would be in the :
youremail@whatever.comsourcesdk_contenthl2mpmaterialsrc(your folder name) folder.
After running your texture through vtex.exe it would save the textures in your:
youremail@whatever.comhalf-life 2 deathmatchhl2mpmaterials(your folder name) folder.
Remember (your folder name must be created in BOTH places.
Setting Up the .VMT
Okay so now we have our color image and our normal. For those using my rock76 texture we have the rock76.vtf, and our rock76_normal.vtf.
But every texture needs a .VMT
We are going to create one very simple .VMT called rock76.vmt.
To create a .VMT all you have to do is create a .txt file and after putting in the desired informationed renaming it into a .VMT
Open up that .txt file now and I will show you what to put in it and why.
"LightmappedGeneric"
{
"$basetexture" "tut/rock76"
"$normalmap" "tut/rock76_normal"
}
The LightmappedGeneric tells the engine that the texture is going to be lit by the map. That just basically means it will be a map texture not a model texture.
The $basetexture just tells the engine what texture the .VMT goes with.
And the $normalmap tells the engine that the texture rock76_normal is rock76's normal map.
Seeing Your Finished Result
Now you must test your texture ingame to see how it turns out:
