[page=Importing a Texture]
Before saving your texture make sure it is a power of 2 (256, 512, 1024, ect.). The most common is 512px, but you can make it bigger if you want more detail. Save the file as a .TGA (Targa) in the folder C:\Program Files\Steam\SteamApps\Username\sourcesdk_content\gameshortname\materialsrc and run it through Vtex.exe (for instructions go here).
Now move your newely created .VTF file into C:\Program Files\Steam\SteamApps\Username\half-life 2\hl2\materials
Now you will create the .VMT text file which tells the game how to display it. Open up notepad and type:
"LightmappedGeneric"
{
"$basetexture" "your texture"
"$surfaceprop" "surface"
}
Replace "your texture" with the name of your .VTF texture file, without the .VTF extension or the 'materials' folder.
For example, a material in materials/wood/wood1.vtf would become wood/wood1
Replace "surface" with the type of surface the texture is. Choices are:
- metal
- paper
- wood
- concrete
- glass
- brick
- tile.
Save the file as *your texture name*.VMT in the same folder as the .VTF
The final product would look something like this. In this example the file is "wood1.vtf" and it is in the "wood" folder in the base material directory.
"LightmappedGeneric"
{
"$basetexture" "wood/wood1"
"$surfaceprop" "wood"
}
Your all done now :) You can go Hammer and search for your texture and it will come up. Hope this helps with you mod/map. Contact me with any questions.
Thanks man. I needed help on how to do this. Good job.
(Second post Woo) and i didn't know how to this it was quite frustrating, thanks
I had problems in the vmt but this tut helped me.. Thanks.