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[ 597572 Views ]

[ 1 2 3 4 5 6 7 8 9 ]

31. reacherPosted: Sep 13th, 2006 - 10:36:40 pm
Hi Nem. Your tools are great BTW!

ok brown nosing aside :P I'm using a scope image with my sniper rifle in my mod, and i'm having a lil trouble. i'm using a quarter circle image (with an alpha channel) and drawing it 4 times (rotated) to make a complete circle. i think the engine is softening the edges, because i get faint ghost lines in between the seams. you can view a screenie of it here:


any chance there's some VTF flags or VMT commands to prevent this from happening?

32. NemPosted: Sep 14th, 2006 - 11:16:43 am
Try enabling the Clamp S and Clamp T flags in VTFEdit along with No Mipmap and No Level Of Detail (unckecking Generate Mipmaps when you create your texture will also set the last two flags).

If that doesn't work, email me your .tga and .vtf file and I'll have a look.

Also, have you tried looking at existing scope materials?

33. reacherPosted: Sep 14th, 2006 - 5:35:35 pm
that did it! well, not sure which flag did it, but it was one of em :)

btw i had No Mipmap ticked already, so it was one of the other 3.



34. NemPosted: Sep 14th, 2006 - 6:39:20 pm
Good to hear. It was most likely the clamp flags. When Direct X samples a texture to resize it to a polygon, samples near the edge of the texture may wrap around to the other side of the texture. This is expected and creates the best results if your texture tiles, however, if your texture does not tile you wind up with your above problem. Generally you should set the Clamp S flag if your texture does not tile in the x axis and the Clamp T flag if your texture does not tile in the y direction.

The No Mipmap flag tells Direct X not to use the texture's mipmaps and is only recommended if your texture is never sized much smaller than its actual size (e.g. GUI elements or your scope or (sometimes) skyboxes). It will cause your texture to be rendered with a linear filter instead of bilinear, trilinear or anisotropic (which all require mipmaps).

No Level Of Detail tells the Source engine not to use a smaller resolution subset of the texture's mipmaps. There are a lot of 1024x1024 resolution textures in Half-Life 2, but most video cards only load the 512x512 or even 256x256 and lower resolution mipmaps because they don't have sufficient memory or bandwidth. No Level Of Detail forces the video cards to load and use the largest mipmap which means your texture will preserve a high level of detail.

35. eratPosted: Sep 15th, 2006 - 6:14:59 am
Is there a chance of getting a complete tutorial on how to make a working blend texture by using one of the two textures of a blend texture shown in material browser and then getting it to work in a distributable map so that anyone downloading the map can see the texture while playing.

That sentence was so long I have to visualize it a bit I guess:

I want:

Steal rock bitmap from rock/grassblend texture shown in material editor > combine that rock bitmap with my own bitmap of same size > Add it so that I can see it in Hammer and furthermore in game > Get everyone who downloads the map to be able to use the newly created blend texture.

Any good tutes on this?
I already tried: http://forum.interlopers.net/viewtopic.php?t=1802 and

But I only got empty 64x64 texture showing in material browser using those tutorials.

- eRat

36. squirrelPosted: Dec 30th, 2006 - 7:41:06 am
Hello all... I am trying to create an animates spray. I followed a tutorial I found linked here:

I followed all the instructions, but vftedit does not have Multiple Frame in the Texture Type drop down options. It has Animated Texture, Environment Map, and Volume Texture... that is it. And none of those will work for me.

My file is 11 frames at 128x128 and is below 120k.

Any advice on why vftedit has this menu option for some but not all?


37. NemPosted: Dec 30th, 2006 - 11:00:46 pm
The tutorial is outdated, use the Animated Texture option (and disable mipmaps for sprays). Also, make sure you are selecting all the frames you want in your texture in the open file dialog.

As long as your .vtf is small enough and you create a .vmt (it just needs to be the same as the other generated .vmt files) your animated .vtf should work. I've made several myself and have never had problems.

38. blisPosted: Feb 22nd, 2007 - 3:15:34 pm
hi,I feel stupid having to ask this but how do you set the clamp t and clamp s flags?

I just see a checkbox that says clamp with minimum height and width.I couldnt see anything in the readme about how to do it via command line either


39. NemPosted: Feb 22nd, 2007 - 9:23:13 pm
  1. Select File then Import and select your image source.
  2. Select the VTF Options you want (these are options that relate to image generation), and then press OK.
  3. Under the Image tab, select the Clamp S and Clamp T flags.
  4. Select File then Save As and save your texture.

40. blisPosted: Feb 23rd, 2007 - 5:27:58 am
thanks nem

41. EchoPosted: Mar 5th, 2007 - 2:39:03 pm
I was also following the tutorial squirrel was using, and figured that animated texture replaced multiple frame in the type dropdown box. I am, however, having trouble with my final animated spray product. I produced a series of images in Photoshop, created an alph channel so that the background would be transparent, and saved them as .tga files. I imported them into imageready, set the delay, and exported the animation frames, saving them as .png files. When importing into VTFedit and making a final product, everything works except the background transparency. I'm not sure if I'm doing something wrong in VTFedit or in ImageReady, or both. I'd really appreciate it if you might be able to take a peek at the tut or offer any guesses as to what I might be doing wrong. Again, the tutorial I was using was:
I'm guessing the problem might be somewhere beginning with step 3. Thanks for any help Nem.

42. NemPosted: Mar 7th, 2007 - 1:46:47 pm
I don't really see anything wrong with the tutorial. If you exported each frame as a .tga (32 bit I hope), why not just import the .tga files directly?

Just an unrelated tip but: if you're making a spray, it's a good idea to disable mipmap generation as it will produce smaller .vtf files (so you can have more frames) and generally increase the in-game quality.

43. EchoPosted: Mar 7th, 2007 - 2:19:04 pm
You were correct, importing them as individual .tga's into VTFedit yielded a working spray; I'm not sure why the tutorial suggested doing otherwise. During the interim, however, I found the Convert.bat method of creating an animated spray as well. Thanks for the help.

44. zafar23081985Posted: Apr 3rd, 2007 - 4:11:02 am
Hello, everybody!!! Could you help me, I'm writing a program which works with VTF Textures. And I'm going to write it in Delphi 7. How can I use your VTFLib library from Delphi? I saw in Source SDK the VTF Explorer written in Delphi, are they also used VTFLib or another library??? Can I use classes declared inside the VTFLib??? For example, CVTFFile, CVMTFile e.t.c? I have tried to compile the library by VS 2005 , but I have got much problems with it, and why it so??? Thanks, with best regards, Zafar!!!

45. NemPosted: Apr 4th, 2007 - 1:37:25 pm
You have to import the C functions, you can't import C++ classes into Delphi. VTF Explorer uses a C wrapper for Valve's official libraries which is then imported (as C functions) into Delphi.

[ 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.033366s; Queries: 17.
dishes served.
Powered by The Wavelength.

Valid XHTML 1.0 Transitional Valid CSS