Normal Map 2

Tutorial collection, comprehensive listings on main site.

Normal Map 2

Postby Tutorial on Tue Jun 14, 2005 6:58 pm

category
Texture Creation

description
Similar guide but goes into more detail about getting the Normal Map into the Source Engine.

keywords
normal, map, maps, normals, texture, textures, 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.

Image

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.

Code: Select all
"LightmappedGeneric"
{
   "$baseTexture" "normal/test"
   "$bumpmap" "normal/test_normal"
}


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...

Image

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

Code: Select all
"$envmap" "env_cubemap"
   "$envmaptint" "[ .3 .3 .45 ]" // intensity - #s can change
   "$normalmapalphaenvmapmask" "1"


So in whole, our .vmt file will look like this

Code: Select all
"LightmappedGeneric"
{
   "$baseTexture" "normal/test"
   "$bumpmap" "normal/test_normal"
   "$envmap" "env_cubemap"
   "$envmaptint" "[ .3 .3 .45 ]"
   "$normalmapalphaenvmapmask" "1"
}


envmap tells it to reflect the cubemap
envmaptint 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.

Image

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.

Image

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.

Cheers

Flewda
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby charlestheoaf on Thu Nov 03, 2005 10:13 pm

i know you can't use the normal map as a mask for the reflections, but can you still make a normal mapped surface reflective, and use a regular grayscale map for the reflections?
charlestheoaf
Dumpling
Dumpling
 
Joined: Thu Nov 03, 2005 10:12 pm

Postby Farles on Thu Nov 03, 2005 11:00 pm

the simpliest way it to make a standart normal map like in this tutorial, then in the alpha channel, just put your grayscale map of specular level (a reflection map if you want) and save the whole thing in TGA 32bit.

Then in your VMT, put the following comands:

Code: Select all
"$envmap" "env_cubemap"
"$normalmapalphaenvmapmask" 1
User avatar
Farles
Been Here A While
Been Here A While
 
Joined: Thu Jan 27, 2005 4:33 am
Location: Montreal, Canada

Return to Tutorials

Who is online

Users browsing this forum: No registered users