Login

Tutorials

Normal Map 2

Following up on Farles' normal map creation, this tutorial will show you how to get normal maps into game.

I used this lovely normal map that took me ever so long to create.

Now we need to create a base texture (also known as a diffuse map). This can be whatever you need it to be. Brick, Metal, cardboard...nothing special for this tutorial is needed. I created pretty much just a grey texture, with a little dodge/burn to give it more than just a solid colour look.

Now, turn the .tgas into the .vtf format, and now its time to edit the .vmt files.

In the .vmt file (the text based file that tells your material how to act), you need to have something like this.

the BaseTexture is the diffuse map we created, and the Bumpmap is for the normal map.

*NOTE* where it says "normal/test" and "normal/test_normal" - this is the directory for your diffuse and normal map. So it will vary on where you put your maps. So in this case, mine is saying it's in the Normal folder (Inside the materials folder of my mod) and its pointing at test.vtf and test_normal.vtf. no need to put the .vtf extension in though.

Save the .vmt file, and test it out. I came up with this result...

Furthermore, you can use the normal map to act as a mask as well for specularity. To do this, you would add the following to your .vmt file

envmap tells it to reflect the cubemapenvmaptint is (to my knowledge) the intensity at which the cuebmap is displayed. The higher the number, the more intense it will be. I could be wrong on this, I Just recently started to play around with that.normalmapalphaenvmapmask - boy, that's a long command eh? This one basically is telling the normal map to act as a mask for the spec map. It seems like it uses the more "elevated" portions of the normal map to be the mask that reflects the cubemap.

This is a very poor example of how this works, because my normal map is only the text "Normals!!!!!" and the rest is the base purple colour, which will reflect the cubemap.

A great example of when to use this method are the plaster walls from CS_OFFICE. If you noticed, they slightly glisten with light. The plaster texture uses a normal map, and uses the normalmap alpha mask as well, and it turns out quite nice.

So using that method just depends on how much detail is in the normal map, and what kind of look you are going for.

It’s a shame you can't use a normal map and a specular mask as well. It's one or the other. I apologize for making you think you could.

Hopefully this made sense to you, and will help you get normal maps into game. Normal maps are a powerful thing, and can look awesome when used right, just don't over do it.