Left 4 Dead 2

Left 4 Dead 2

37 ratings
Opening and Exporting .vtf files with GIMP
By N7Legion
A guide on how to open and export .vtf textures with GIMP.

Please note, that the plugin mentioned in this guide is outdated, but it still works on the newer version of GIMP.
   
Award
Favorite
Favorited
Unfavorite
Prerequisites
GIMP[www.gimp.org] - Required for this guide

gimp-vtf[github.com] - Plug-in required for this guide
x86 for 32-bit systems, x64 for 64-bit systems
You can check which bits your system have by holding the windows key then pressing the Pause key. It will open up a window afterwards with your system specifications in it.

VTFEdit[nemstools.github.io] - optional for testing

... and a little bit of knowledge with GIMP.


Make sure you have all of these downloaded with GIMP installed on your computer.
Installing the .vtf plug-in
1) Open up the downloaded plug-in file.



2) Place the following files, the file-vtf.exe and VTFLib.dll, in the plug-ins folder located at your GIMP's plug-ins folder (see image below)




3) Now open up GIMP. If you had GIMP opened while you placed those files in, you need to restart GIMP again.

It will take a while for GIMP to identify the new plug-ins.

Opening .vtf files
After you installed the plug-in, you can now open any .vtf files from the explorer or open any .vtf files from GIMP.

1) Select a .vtf you wish to open.



2) Be greeted with your texture file opened up in GIMP.

Opening .vtf files with alpha channels
Most experienced modders use alpha channels to extend their model's detail even further. As seen here:



Enabling the mask under View > Mask at the header, you can see most of the texture go away.



That's because the texture uses alpha channels to make up something (mostly because of emmissions or specular stuff).


What about GIMP?

The plug-in works in the same way, but you might get confused a bit when you open the texture file with the alpha channel in it. Let's take a look:



The whole texture is not lost. It only applied the layer mask on top of the RGB channels.

Here's how you can restore it back:

1) Right-click on the layer then select "Add Layer Mask"



2) It will open up a small window. Select "Transfer layer's alpha channel"



3) After that, the texture is still invisible. But, we will see that there is a second extra layer on the main layer. That is our layer mask (or alpha channel).



4) "Disable Layer Mask" allows you to view the texture back to its colors



And done. We got our texture with the alpha channel disabled.

Exporting .vtf files
It's time to export the texture.

Please note: You need to have all your layers removed, except for the one you are using it to export your texture.

1) Go to File > Export As...



2) Browse through the folder where you want to export your file in then hit "Export"

3) Now, here's our problem. The plug-in is outdated because it doesn't really support GIMP's new version. We instead have those messed up labels, but don't you worry though, they're not that confusing.

We will only look forward to these things that are highlighted in these red boxes.




#withcompressionlabel
This will compress the file to reduce the file size. Quality remains mostly the same, but doesn't look original. It will use the DXT formats.

#withalphalabel
This will include the alpha channel/layer mask.
Keep in mind: It acknowledges the alpha channel, even if you did not or have added a layer mask.
If your texture doesn't have an alpha channel, you can remove this check mark from the box to reduce the file size by half.

#mipmaplabel
This will include the mipmaps. Mipmaps are used for reducing the texture quality when the player is far away from the texture which helps with the performance.
If you remove this check mark, you will disable the mipmaps, thus the texture will remain in the same quality, no matter how far the player is away from the texture.

#nolodlabel
This should be used only for the VGUI's. It will keep the mipmaps, but the texture won't get in a lesser quality.

#clamplabel
This will stretch the texture to its last pixels.


Once you have chosen your options, you can hit the OK button.
And that's it
You exported your texture file. Now you can open it with VTFEdit (if you are comfortable with it) to see the results.

One topic I haven't covered is, making animated textures with GIMP and its plug-in. I probably would make this into a different guide. But for now, I'll leave it as it is.


If you have any questions, leave them down on the comment section below.
4 Comments
minidrwho 🌈 14 Jun, 2024 @ 5:16pm 
this guide doesn't work on Linux sadly
Mayo. 24 May, 2021 @ 8:49am 
+rep thanks man, to the point and what i needed
ABGH78 30 Dec, 2020 @ 8:52am 
BRUH WHY THIS IS AN ACTUAL GUIDE AND NOT A CRINGY USELESS GUIDE
0/10
im just kidding nice guide
RB 29 Dec, 2020 @ 1:49pm 
reported for being an actual guide