normal mapping problem
Post Reply
Quote
Re: normal mapping problem
Posted by razor on Wed Dec 8th at 4:37am 2004


This question is to 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

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 materialstut 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:
<p><div class="pre"><pre>"LightmappedGeneric"

{

"$basetexture" "tut/groundTex"

"$bumpmap" "tut/groundTex_normal"

}</pre></div>
<p>To get specular bumpmapping (which looks much better on DX9 environments), you simply have to set the $envmap property in the texture definition:
<p><div class="pre"><pre>"LightmappedGeneric"

{

"$basetexture" "tut/groundTex"

"$bumpmap" "tut/groundTex_normal"

"$envmap" "env_cubemap"

}</pre></div><p>Restart Hammer, apply the new texture to a surface in you map, copy your tut folder from ...sourcesdkcstrike_sample_contentmaterials to ...counter-strike sourcecstrikematerials. Compile and run the map et voil?:





Quote
Re: normal mapping problem
Posted by CPS on Wed Dec 8th at 4:53am 2004


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.





Quote
Re: normal mapping problem
Posted by razor on Wed Dec 8th at 5:55pm 2004


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.



Quote
Re: normal mapping problem
Posted by Nanodeath on Wed Dec 8th at 6:36pm 2004


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




Post Reply