Texture Mods - Lesson 3.1 What You Need to Know Right Now About VMT Files
Transcript
Hello and welcome to lesson 3.1 What You Need to Know Right Now About VMT Files of How to Create Texture Mods presented by MLPTF2Mods.com. Before we delve into the world of textures, I wanted to take some time to talk about material files. If you recall, materials are kept in VMT format. VMT is short for Valve Material Type and uses the file extension .vmt.
In this section we will be making use of the Conniver’s Kunai texture. So as an example I have pulled up the Kunai’s material file. These lines of code are referenced by the Kunai model instructing the game what texture to apply to the model, what shader effects require application, as well as when to apply them and how. $baseTexture for example indicates where the VTF file can be found relative to the materials folder. If we don’t put the texture file back in the place indicated by this line, the game will not load it. Plain and simple.
The $phong parameter affects how light is reflected. Which thanks to the $basemapalphaphongmask parameter it gets some information about how to apply itself from the alpha layer of your texture. There are also various parameters and proxies that tell the texture how to react when you turn invisible as a Spy or get hit by Jarate.
If we open up the VMT of a cosmetic item, we are met with several different parameters like $detail which is responsible for making your hat look on fire when hit by the Pyro’s flamethrower. We can also see the code that allows TF2 to support painted hats without needing a new texture for every paint colour thanks to $blendtintbybasealpha and $colortint_base.
And of course these material files also extend to HUD and UI elements such as the red Scout HUD image. Using the $translucent parameter it knows to use the alpha layer as a mask to hide the background.
The thing you need to take away from this lesson is that these material files exist and they affect how your texture is going to look in game. For basic texture modifications, generally everything will come out looking fine. Though if you make a mod and it isn’t showing up quite as you intended it to in game, there might be more happening with the material than you realise. This is when you’d need to investigate the VMT file to understand what is going wrong where.
There is a full section later on related to understanding and using VMT files. For now, we aren’t going to worry about them. I just need you to understand they exist, they enable great things, but can mess with your stuff if you aren’t paying attention. With all that out of the way, let’s get creating in next video.