VTF, short for “Valve Texture Format”, is a texture type used by Valve in the source engine and is occasionally in Titanfall. vtf’s are used for fx, animation, and other textures.
VMT, short for “Valve Material Type”, is a text material system that dictates how the game perceives a vtf outside of how it looks. It uses parameters and proxies to dictate how shaders will show the game. We will go into greater detail later.
Editing FX that use VTFs#
A lot of fx in Titanfall use vtf’s as textures. Therefore, if the corresponding vtf can be found, we can do almost anything with the fx’s appearence. Example Mod: Exrill’s Blue L-Star. Since the L-Star has a physical bullet that is counted as fx, we can edit how it looks.
Since vtf modding was originally for introducing custom weapon skins, most of the development on it was focused on that. The same concepts apply to modding other textures though.
Most textures in the game use .dds but we can make them use .vtf.
What we’ll be doing is:
Extracting the model.
Replacing the texture path in the mdl to point to our texture.
Creating our directory.
Setting up a .vmt file.
You have 2 options for a VPK tool. Pick either the older VPK tool: cra0 VPKTool or the Newer VPK tool: Harmony VPKTool (better).
With your VPK tool opened. ‘Open’
englishclient_mp_common.pak000_dir.vpk which is located in
Inside of the VPK, not all guns filenames match their ingame names. Here is list of weapon names to help you out.
models/weapons/car101. Extract all the viewmodel versions (ptpov) and normal model (w) mdl’s.
To change the path in the .mdl to the custom .vmt. We need a hex editor. Before editing with hex editors, you need to be aware that hex editors cannot add or delete data, only replace it. I will use HxD, but you can also use ida, or anything else as its personal preference.
Open your .mdl in your hex editor.
We want to get closer to the path we need or else you’ll be scrolling and searching for hours. Search:(CTRL+F) for skin_31. If you don’t get any matches, try skn_31, skin31, elite, or prime. The path should look something like
Don’t change this unless you want to effect skin31 textures.
The path we do need to change is
.models\Weapons_R2\weaponname\weaponname. This comes before the
I recommend only changing the last section of the path. We’ll change
.models\weapons_r2\car_smg\car_ctm. Note the capitalization, as some vpk repacking tools cannot repack properly if the changed path contains capitals.
Now copy these changes for
w_ model(s). As these are the stow (On your back) and main menu models. If don’t change these. Your texture will only work when in a match.
In the same folder you extracted your mdl’s. Make a
materials folder next to the
Example: .. code-block:: text
Recreate the path you changed in the
materials folder, such that the last section is a .vmt file:
materials └─ models └─ weapons_r2 └─ car_smg └─ car_ctm.vmt
Inside your .vmt paste: .. code-block:: text
“$surfaceprop” “metal” “$basetexture” “” “$texture2” “” “$bumpmap” “” “$allowoverbright” “1” “$vertexcolor” 1 “$vertexalpha” 1 “$decal” “1” “$model” 1 “$nocull” “1”
When we use vtf textures, we can only use the albedo and normal. Learn more about texture maps here.
VTFEdit is a tool to edit, view, and create .vtf files.
Launch VTFEdit. Top left, click
Import, find and Import your custom texture(s).
When importing your normal map. Choose to import as a
When importing your diffuse map. Choose to import as a
More info about .vtf format possibilities here, or the official source docs here.
After that, save your new .vtf’s into the same folder as your custom .vmt with a simple name.
Configuring your .vmt#
"$basetexture" argument enter your .vtf texture directory. We’ll use
models\weapons_r2\car_smg\car_ctm\NAMEOFVTF. This should point to your custom diffuse .vtf with the simple name. The game expects these paths to be without the
.vtf file extension - don’t add it.
Do the same for adding your normal map with the
In some cases you might have to create another vtf with literally any image. Put its path in the
"$texture2" argument. As far as i know, this is sometimes necessary even though the texture isn’t used.
Final VPK folder#
Your root folder should look somewhat like this
root ├─ materials │ └─ models │ └─ weapons_r2 │ └─ car_smg │ ├─ YOURTEXTURE.vtf │ ├─ YOURTEXTURE.vtf │ └─ car_ctm.vmt └─ models └─ weapons └─car101 ├─ ptpov_car101.mdl └─ w_car101.mdl
You’re done! You just need to pack it into a vpk with a vpk tool (for our gun mod, we’d repack to
englishclient_mp_common.pak000_dir.vpk), and put the vpk into a Northstar mod inside a
Help with repacking here, and help with Northstar mods here.
Making your Skin Animated#
To add animation functionality, all we need to do is add a Proxie; which is just a modifier inside a
.vmt, and change our albedo vtf texture.
You need to create a .vtf texture with multiple frames imported to a single .vtf texture, that’s your animated texture. You can do this with VTFEdit. Then assign the texture in
At the bottom of your vmt but before the
}, add this:
.. code-block:: text
animatedTextureVar $basetexture animatedTextureFrameNumVar $frame animatedTextureFrameRate 30
To change the fps of the texture, change the value after
animatedTextureFrameRate, and you’ll be done making your texture animated!