Beginner's guide to VTF's and VMT's Difficulty: Beginner |
| Category: SOURCE > Other/Misc | Author(s): Stene |

So, there are many tutorials on how to MAKE textures and such. In this tutorial I will step by step explain how to make VTF and VMT files, the texture format Source Engine uses, and so on.
1. First of all, we must download this one program, called VTFEdit. You go to the website and either download it in Archive or Installer.
2. Next step, we start the program, and start configuring it. Here's the starting screen everyone will see:

We will go to the Options tab and take care the all of the following things are marked:

The "Auto Create VMT File" will be explained later.
3. Now the configuring is done, it was easy. It's time to import a texture. We can do it simply by clicking CTRL + I, but here's where it's found under the File tab:

So we choose a texture in the usual Windows dialog, and comes a challenging part. The texture must always be in the POWER OF 2, which means the size must be around 256x256, 512x512, 1024x1024 and so on. And also this dialog:

The options should be as they are in my screenshot, to have the basic Source Engine texture that can be applied into walls, floors and other things.
We press OK button, and calmly wait for a while, and the texture appears to the program!

4. Here comes the part we are about to make the texture show up. The "Flags" which is seen in the lower left of the screen, has different options that can be applied to the texture. The only things I suggest, as we are making just a basic texture, is that we only touch the following: "No Mipmap", "No Level of Detail" and "Nice Filter".
THEN, comes the part when we are about to save this texture. The path, must always be under the root game's/mod's materials folder. For example;
Steam/SteamApps/*username*/half-life 2/hl2/materials
If it's not there, the texture cannot be shown. It is very important.
So we save the texture as "materials/exampletexture.vtf". As we in step two, had this "Auto Create VMT File" marked, there will now be automatically generated a VMT file next to this one.

5. On the fifth step, we will now make the VMT ready. As the model was succesfully saved under the folder materials, the VMT will also be correct. It is a TEXT file, that tells the path of the VTF file, and has some special settings for it. The one VTFEdit generated for us automatically, looks just this:
"LightmappedGeneric"
{
"$basetexture" "exampletexture"
}
Please note that the "materials" is never included in the path for basetexture. As it's in materials folder then it is just the name of the texture in the path. There is a dozen different commands that can be written to the file, but we will only put one that is important. It is called surfaceprop and it tells what material this texture is. There is a list of different surfaceprops too, but here's the thing that I will put in:
"LightmappedGeneric"
{
"$basetexture" "exampletexture"
"$surfaceprop" "concrete"
}
Now when in the game, people walk on, or shoot this texture, it will act like concrete, such as make sounds and else.
6. Now as everythings supposed to have gone right, we can open up the Valve Map Editor called Hammer from Source SDK and see if the texture will show up on it. And this texture was done for half-life 2 so we use Half-Life 2 config.

And so it does show up :) This tutorial told how to deal with the VTF and VMT files in the Source Engine and it hopefully did it nicely. Here's also the last note!
IN CASE OF REPLACING TEXTURE OF A MODEL, THE VMT SHALL NOT BEGIN WITH
"LightmappedGeneric", IT MUST BE; "VertexLitGeneric"!!! |
| Added: 5 months ago | Tags: texture, material, creating, source, vtfedit, vmt, vtf, stene |
 Add Feedback Feedback Instructions: Hopefully everybody learned something from my tutorial! You cannot post yet!Get involved on FPSB by posting your thoughts. Give authors your feedback to help them develop. To post in this submission register or login. |
 You cannot assess yet!Moderating FPSB is in your hands - when you assess a submission your vote determines its success or failure. To vote on this submission register or login. This Tutorial in a nutshell... No stamps recordedYou cannot stamp yet!Stamps let you apply characteristics to submissions to help others understand them. To stamp this submission register or login. Ranked 572nd with 3,985 points. 2 points behind .[+] DonateWant more? Find related tuts. |