About VTFLib - NemPosted: Apr 18th, 2005 - 10:27:01 pm

VTFLib is a LGPL open source programming library, written by Neil Jedrzejewski and I. VTFLib provides a C and C++ API that, with a few simple functions, can open and save .vtf and .vmt files, providing access to all known features. The library functions independent of Steam, allowing third party applications to use the library without Steam present or runningi on the target system.

VTFLib includes two GPL example applications, VTFCmd and VTFEdit. VTFCmd is a C command line frontend for VTFLib that can create .vtf and .vmt files from various source formats. It is similar in functionality to Valve's vtex Source SDK utility, but offers a lot more control. VTFEdit is a C++ .NET graphical frontend for VTFLib with viewing and creation capabilities. Both VTFCmd and VTFEdit support several source image formats, including, but not limited to .bmp, .dds, .gif, .jpg, .png and .tga.


VTFEdit .vtf frame/face/mipmap viewing. VTFEdit .vtf information viewing.

VTFEdit file system browsing. VTFEdit .vmt viewing.

VTFEdit import options. VTFEdit batch conversion options.

VTFEdit .wad conversion options. VTFEdit .vmt creation wizard.

VTFEdit .vmt creation wizard. VTFCmd command line options.

Documentation: Features:
  • Convert .bmp, .dds, .gif, .jpg, .png and .tga files to .vtf and .vmt files with easy access to all .vtf options.
  • Convert .vtf files to .bmp, .jpg, .png and .tga files.
  • Convert entire folders to and from .vtf and .vmt files.
  • Convert .wad files to .vtf and .vmt files.
  • Explore .bsp, .gcf, .pak, .wad and .xzp packages.
  • Preview .vtf files.
  • Recent file menu.
  • 100% Free.
Download: Third Party Downloads:
Modified: Sep 14th, 2007 - 3:28:10 am[ 596336 Views ]

[ 1 2 3 4 5 6 7 8 9 ]

61. MJPosted: Oct 1st, 2007 - 2:38:03 am
i get this error:

62. 4-Legged TumorPosted: Oct 28th, 2007 - 12:37:56 pm
When The GIMP saves a tga image with an alpha channel, it does not retain RGB information for pixels in which the alpha value is 0. I believe the problem with opening images converted from vtf to tga in The GIMP is related to this.

63. dissonancePosted: Nov 16th, 2007 - 2:44:30 pm
MJ: I'm getting the same error. Nothing seems to fix it. I've given up.
Is there any way to create VTFs and VMTs on a linux computer, short of running VTFEdit through wine+mono? I'd really like to keep making my own textures and not asking my friends to convert them for me.
And I can confirm that TGAs with an alpha channel created in Gimp do not import correctly.

64. sunrunner20Posted: Nov 25th, 2007 - 4:07:16 pm
I'm also interested in Linux support. I'm no expert programmer, but I really don't see any .net specific code in the actual library. Is there any?

65. NemPosted: Nov 26th, 2007 - 12:45:14 pm
There is no .NET specific code in VTFLib or VTFCmb, and very little Windows specific code, so a port would be relatively simple if it wasn't for the fact the VTFLib depends on NVDXTLib for DXT compression. This is because NVidia only releases NVDXTLib as VS.NET 2003 and VS.NET 2005 static C++ libraries.

VTFCmb may, however, run under Wine (I haven't tested it, but HLLib used to before I ported it).

66. ChewyIsKickAssPosted: May 28th, 2008 - 9:11:31 am
Sorry if I sound like an idiot but I don't really know how to use this. It's just a bunch of .txt files. Do I put them somewhere, or do I open them with a program, or am I just dumb?

67. NemPosted: May 28th, 2008 - 1:11:24 pm
I'm not sure what you mean; did you download the correct installer? The very first link titled "Installer" on this page should work.

68. JackBALLModified: Jun 5th, 2008 - 7:10:02 am
The latest VTFEdit makes a bunch of textures that flip layers in Hammer. When I turn the camera view, the faces change order of display making walls in back of a wall in front of the camera show through the wall directly in front of the camera.

How do I turn this off in the auto-vmt creation? The older version of VTFEdit worked fine, maybe I will use that for now.

If you want I can upload a video of this strange problem.

Could you please impliment batch VMT modification? I require a tool that will take a line out of 800+ VMT's, but they are in 30 separate folders. Using Notepad++ would take some time.

69. NemPosted: Jun 5th, 2008 - 1:24:26 pm
It sounds like you have two faces exactly on top of each other, the observations you have made sound like z-fighting. If so, this has nothing to do with the texture.

70. JackBALLPosted: Jun 11th, 2008 - 9:23:33 am
Thanks! I had an old BSP that I was porting but I did not have the RMF so I decompiled it. Oh well, I guess I should remake the map. WinBSPC butchered it!

71. snakemediaModified: Oct 6th, 2008 - 7:19:20 am
Hi @JackBALL,
You have right, because bsptwomap for Quake 3. Map File doesn't support for Half-Life, because map was problematic on the Valve Hammer Edition. I see bad decompiler, because we need bsptwormf like bsptwovmf. Because Rmf was correct file for correct blocks and showing clip, null, orgin, skip and hill blocks support working. In the decompilrd map files do not show special textures (null, clip and more...) blocks. That problem of bsptwomap deleted special texture-blocks.. sad .

I know that bsptwormf, because it will to support with special texture-blocks.

Thanks Bye SnakeMedia

72. [ TSF ] LORD DAVROSPosted: Nov 29th, 2008 - 3:18:18 am
Hi sorry if this sound a bit dum .. but I have been using hammer for mapping for half life 2 death match now for some time. Now i need to seriously start creating my own textures and have started to use vtf edit.
My problem is that if I allow vtf edit to create mipmaps the texture in hammer and in game looks really crap and basically degrades the further away you are from the wall or texture. If i turn off the mip maps the texture will look great in hammer and in the game BUT the thumbnail in hammer where you select your texture basically gets mixed up with other thumbnails and gets distorted making it harder to make your texture choice when you have allot of them. also I cant find an option to reduce the number of mip maps from 9.

I had thought that if I reduced the mipmaps to say 1 that the thumb nail would return to its proper look and the in game texture would also still look good.

Do you have any help please or sujestion.... Also is there a tutorial on how to use vtf edit for texture creation please.

73. NemPosted: Nov 29th, 2008 - 4:01:02 am
It's interesting that you say mipmapping makes your textures look worse because one of the purposes of mipmaps is to improve the visual quality of the scene. There are a few cases where mipmaps aren't much help (e.g. weapon skins) but for the most part you should generate them.

I suggest you play around with the mipmap settings in VTFEdit. For general textures I recommend the Sine Cardinal mipmap filter (as it is closest to the filter vtex uses); however, the Box mipmap filter may work better in some situations. If you find your mipmaps are too blurry, you may try a sharpen filter (otherwise set the sharpen filter to None). Of the sharpen filters, Unsharpen Mask is probably the best. There are additional options for this filter under the advanced tab. Decrease the amount to decrease the amount of sharpening.

The same settings don't always work best for all types of textures, but you should find ones that work. It can be a good idea to generate your texture multiple times with different settings and examine the resulting mipmaps in VTFEdit.

Lastly, if you have a somewhat recent video card, you may want to make sure you're using a good filter in game. Typically this will be the highest anisotropic setting your video card supports.

74. [ TSF ] LORD DAVROSModified: Nov 29th, 2008 - 5:59:12 am
thanks for the reply nem Since posting this morning I have been trying the different settings as you describe but unfortunatly with out much sucess. the best setting still seems to be with no mipmaps. the basic quality of the texture seems prety good and is of a large enough size (256 x 256).
once in game with mip maps on the patern looks ok if you are close to it but as you look further down the length of the wall it looks more and more blurd.

A friend of mine has had this problem and went over to using photo shop to make his textures but I dont have photo shop and that meathod seems much more complicated.
Per haps if the mipmaps were reduced from the 9 that it creates to say 1 2 or 3 it might look different.

PS .. my understanding of mipmaps was to use a lower resolution texture as you moved further away from the textured object so as to use les computer rescources and aid FPS ????

75. NemPosted: Nov 29th, 2008 - 1:52:43 pm
If your mapping for a game that uses a more recent version of the .vtf format, you can include a LOD Control Resource which can be used to limit the number of mipmaps used. To use this feature, make sure your .vtf version is 7.3 or above (Advanced tab) then enable the resource under the resources tab.

Resizing images is not only an expensive task, but it is a very difficult task to do with good results. The purpose of mipmaps is to provide the rendering engine with a series of high quality resized versions of the original. This way, when the engine gos to fill a polygon, it is more likely to have a high quality texture of roughly the same size as the polygon.

Mipmaps don't stop the engine from resizing, however. The engine will typically choose the two textures closest in size then interpolate to get the best approximation. There are different types of interpolation methods, but the best are very expensive (so you're not really saving anything by having smaller textures far away because (1) you're using more than one texture and (2) your doing several interpolations instead of just one).

An excellent description of the different ways mipmaps are used is described here.

Perhaps if you could provide me with some screenshots of the problems you are having I can provide more assistance...

[ 1 2 3 4 5 6 7 8 9 ]

You must be logged in to post a comment.
New users can register here.
Nem's Tools v2.0 © 2006 Ryan Gregg.
Execution time: 0.031646s; Queries: 17.
dishes served.
Powered by The Wavelength.

Valid XHTML 1.0 Transitional Valid CSS