normal mapping problem

normal mapping problem

Re: normal mapping problem Posted by razor on Wed Dec 8th 2004 at 4:37am
razor
3 posts
Posted 2004-12-08 4:37am
razor
member
3 posts 10 snarkmarks Registered: Dec 8th 2004 Occupation: high school Location: USA
This question is to <!--StartFragment --> laktat refering to his normalmapping tutorial. I was with you up to this point... Im new to modeling so i dont get this mumbojumbo, it would be really nice if you got on microphones and walked me through. Thanks :confused:

<!--StartFragment --> <!--StartFragment --> Now create the textures with VTex.exe. Save both texture sources as 32bit tga files in a sub-directory of /materialsrc e.g. /materialsrc/tut (For this tutorial i called the texture groundTex_normal and groundTex_normal) (Please manually create also the appropriate subdirectory in the ...\materials\ folder - vtex will not do this for you automatically!). Drag-drop them on the vtex.exe shortcut on your desktop. VTex has create a txt file for both texture files. Open the goundTex_normal.txt and define this texture as "normal" and put a bumpscale:

"normal" 1

"bumpscale" ".025"

After this, let vtex
compile your textures again!

You now have the compiled textures in you materials\tut folder.

Create a empty txt file in this folder and save it as <textureName>.vmt (without _normal!).

Tell the engine to render our texture with LightmappedGeneric Shader, to use the standard texture groundTex as basetexture and the normal mapped texture as bumpmap:

[pre]
"LightmappedGeneric"

{

"$basetexture" "tut/groundTex"

"$bumpmap" "tut/groundTex_normal"

}
[/pre]

To get specular bumpmapping (which looks much better on DX9 environments), you simply have to set the $envmap property in the texture definition:

[pre]
"LightmappedGeneric"

{

"$basetexture" "tut/groundTex"

"$bumpmap" "tut/groundTex_normal"

"$envmap" "env_cubemap"

}
[/pre]Restart Hammer, apply the new texture to a surface in you map, copy your tut folder from ...\sourcesdk\cstrike_sample_content\materials\ to ...\counter-strike source\cstrike\materials. Compile and run the map et voil?:
Re: normal mapping problem Posted by CPS on Wed Dec 8th 2004 at 4:53am
CPS
60 posts
Posted 2004-12-08 4:53am
CPS
member
60 posts 6 snarkmarks Registered: Nov 21st 2004 Location: USA
Just compile the normal map one, make a .vmt for it and put :

"normal" 1

"bumpscale" ".025"

Then compile your regular texture and make .vmt for that and put :


"LightmappedGeneric"

{

"$basetexture" "tut/groundTex"

"$bumpmap" "tut/groundTex_normal"


Put them in the correct folders then you are ready to use them.

BTW to compile them you just drop them in the VTEX.exe under sdk/bin.
Re: normal mapping problem Posted by razor on Wed Dec 8th 2004 at 5:55pm
razor
3 posts
Posted 2004-12-08 5:55pm
razor
member
3 posts 10 snarkmarks Registered: Dec 8th 2004 Occupation: high school Location: USA
ok i get what you want to put in but i need visuals to finish the tutorial. so to help me with this part of the tutorial some images on what to do would be 90% more helpful, thanks.
Re: normal mapping problem Posted by Nanodeath on Wed Dec 8th 2004 at 6:36pm
Nanodeath
356 posts
Posted 2004-12-08 6:36pm
356 posts 66 snarkmarks Registered: Nov 11th 2004 Occupation: Student - Bioengineering Location: Seattle, WA, USA
Ok...you use the program to process your image, and then you make a text file with the correct information in it (as shown in the tutorial), and rename the file to have a .txt extension. Put them in the materials folder and you're done...