Bearcub
Post: #3
Reply to: #1
Joined: 20th May 2005
From:
Posts: 33
I feel your pain. It took me a long damn time to get my textures to work. Here's what I did:
The first thing you have to do is realize how the directory structure works. In one folder you will keep the raw materials that you are going to compile, and in the other, the compiled textures. Here are the paths if you are going to do it with HL2DM, if you are doing them in CSS, just find the CSS counterpart. This is assuming you installed Steam
in the default spot. If you installed it in a less convoluted spot, you should be able to find it's counterparts. I have also added the folder "your texture" on the end, since you should keep each texture in it's won folder so you can stay organized.
Raw Materials:
A) C:\Program Files\Steam\SteamApps\<your email>\sourcesdk_content\hl2mp\materialsrc\yourtexture
Compiled Textures:
B) C:\Program Files\Steam\SteamApps\<your email>\half-life 2 deathmatch\hl2mp\materials\yourtexture
1) First we should set up vtex.exe. Go to the SourceSDK/bin directory to find it. Make a shortcut of it an put it on your desktop for the sake of convenience. Add the -mkdir parameter to the end. This will ensure it makes a directory in the hl2mp/materials folder, so you don't have to make one. Ultimately, the target for the shortcut should look like this:
"C:\Program Files\Steam\SteamApps\<your email>\sourcesdk\bin\vtex.exe" -mkdir
2) Now to make the actual texture. It has to be a perfect square, which means it's square root is an interger. Some good sizes are 256x256, 512x512, 1024x1024 etc. It also has to be saved as a TGA file. I'm not sure if it matters how many bits you save it as, but i have been using 24 bits.
3) Once you have your TGA file in the "A" or raw materials directory (C:\Program Files\Steam\SteamApps\<your email>\sourcesdk_content\hl2mp\materialsrc\yourtexture), resize the folder's window so you can see the vtex shortcut on your desktop. Now simply drag the TGA file onto the shortcut. It should spit out a bunch of crap and make a blank .txt file in the "A" folder. I am not sure what the .txt. file does and I never use it so just ignore it.
3) Now go look in your "B" folder (C:\Program Files\Steam\SteamApps\<your email>\half-life 2 deathmatch\hl2mp\materials\yourtexture). There should be a VTF file in there. The only thing left to do is make a VMF file. This is the part you are having trouble with, so pay attention! It should have the same name as your VTF file, except have a VMF extension.
4) The easiest way to make a VMF file is to copy an existing one. I'm forget where I got my first one, so here is an example:
"LightmappedGeneric"
{
"$basetexture" "yourtexture/yourtexture"
"$surfaceprop" "tile"
}
The $basetexture looks for the actual VTF file in the materials folder. The above will work with the VMT file "C:\Program Files\Steam\SteamApps\<your email>\half-life 2 deathmatch\hl2mp\materials\yourtexture\yourtexture.vmt". Note that the .VMT is omited (I think it's optional to omit it). Just right click in the folder of your VMT, go to new, then new text document. Name it the same thing as your VTF file, except with the VMT extension. Enter the text above into the file (being sure to change "yourtexture" to the name of your texture and changing it to an appropriate surface property. Here's a list of surface properties: http://developer.valvesoftware.com/wiki/Material_surface_properties)
5) To save you some sanity later, try and open the VMT file. Since it doesn't know how to open a VMT, select notepad from the list and then click "always use this program to open this kind of file." This will allow you to edit all your VMT files simply by double clicking them.
6) That should do it. If Hammer is open, you have to close and reopen it. When you do, your game configuration (at the bottom of the source SDK Steam window) has to be set to the game where you put all your files. Once Hammer is open, go to browse texture and then in the filter type in the name of your texture. It should be there.
I know doing all this is a pain, but your lucky your not doing modeling, which is twice as complicated.