Search
Username:
Password:
Register or Reset Password
Remove the ads!
  
Beginner's guide to VTF's and VMT's
Difficulty: Beginner
Category: SOURCE > Other/MiscAuthor(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 agoTags: texture, material, creating, source, vtfedit, vmt, vtf, stene
Feedback (4)
KeNoX .
BananiteY2M
Posted 5 months ago
When i do that... copy it into mine it say something with line 2 can you help me?

something like {especting on īline 2 '' if you can help i will be glad :D or can you do it for me.


ITS FOR CSS SOURCE MAPPING! :)
- Bananite
Stene .
Propaganda PreacherY2M
Posted 5 months ago
Posted by Semper Fi!

Nicely written, only one thing you might want to fix:


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


Typo or lapse of tought there.

Also, could you make/find a list of all the functions of the .vtf settings (checkboxes in VTFedit) and/or the basic list of texture commands (like $surfaceprop). I believe that would be EXTREMELY helpful to new texture authors.


The lists are available in the Valve Developer Wiki. Their tutorials on making VTF files are just so complicated and centered only on Valve's own program, which is that old DOS interfaced vtex.exe
- Propaganda Preacher
Semp .
I'm that unclever guy on the internet...Y2M
Posted 5 months ago
Needed to assess :P. See below post.
Semp .
I'm that unclever guy on the internet...Y2M
Posted 5 months ago
Nicely written, only one thing you might want to fix:


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


Typo or lapse of tought there.

Also, could you make/find a list of all the functions of the .vtf settings (checkboxes in VTFedit) and/or the basic list of texture commands (like $surfaceprop). I believe that would be EXTREMELY helpful to new texture authors.
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.
Assessment
The community's verdict.
User Rating [+]
9.7/10
bScore
9.7/10
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.
Stamps
This Tutorial in a nutshell...
No stamps recorded
You cannot stamp yet!
Stamps let you apply characteristics to submissions to help others understand them.

To stamp this submission register or login.

Added by...
Stene .
Propaganda Preacher
P646 Supervisor
Ranked 572nd with 3,985 points. 2 points behind .

[+] Donate
Vote for Submitter
Like this tut? Vote Stene . for one or more monthly awards.
You must login or register to access this!
Related Tutorials