Keeps an eye on a folder, and when any image gets modified, it makes or updates the VTF with the same name
materials
folder and press "Start"VTF image format and flags persist when image is updated!
(it works this way when any supported image file is updated, this is just an example of photoshop updating a .psd file)
[!IMPORTANT] Photoshop notice:
Alpha channel won't be recognized if you have only 1 layer locked like this:
Due to Adobe's closed-source nature, new Photoshop versions have features which are unsupported, and may cause differences in exporting. It's advisable to use an older version like Photoshop CS6
Dragging a VTF:
Make Simple VMT
with LightmappedGeneric shader and $basetexture pointing to VTF, relative to materials/
Dragging an image:
Lossless
Makes VTF with BGRA8888 compression if image is transparent, or RGB888 if opaqueCompressed
Makes VTF with DXT5 compression if image is transparent, or DXT1 if opaque7.1
and mipmap generation is enabled with HANNING
filteringAdvanced
option shows a panel similar to VTFEdit:I think that only these 6 flags have an actual impact. If I missed an useful flag let me know.
Same with the image formats that this program accepts:
Updates VTF files while preserving the settings (flags, image format, version).
HANNING
filtering.I8
image format will become IA88
if the updated content has any transparency, and will go back to I8
if it's updated with a fully opaque content. And the same for the other format pairs (DXT5/DXT1
, BGRA8888/RGB888
, IA88/I8
) and the special case pair: (BGRA8888/RGB565
) because there is no equivalent of RGB565
with alpha. If the program tries to update a VTF which has any other image format, the updated VTF will default to having an image format of BGRA8888
(lossless with alpha).Images can be any size, they are automatically resized to the nearest power of two
Requires .NET 8.0
VTFCmd is compiled from >>> here
How to compile VTFCmd: (or at least how I managed to compile it)
Open sln\vs2019\VTFLib.sln
solution with Visual Studio 2022
Accept updating the projects
Set Startup project to VTFCmd
Inside VTFCmd\VTFCmd.rc
replace #include "afxres.h"
with #include<windows.h>
Build for Release 64bit
Output will be in sln\vs2019\VTFCmd\x64\Release\
vtfcmd
. Copy VTFCmd.exe and VTFLib.dll thereVTFCmd requires DevIL, which can be found >>> here
vtfcmd
folderNuGet packages:
I hope that this will be useful to people, because it has already made my workflow so much simpler than before.
This isn't meant to be a replacement for VTFEdit though, it's still very useful for previewing VTFs and setting some arcane settings.
If you found a bug or have a suggestion you can create an issue
If you want to be sure that there is nothing malicious, take a look at the source code and compile it, and download/compile the external dependencies yourself.