VTF Shell Extensions

From Valve Developer Community
Jump to: navigation, search
English (en)
Edit
Extension in Windows XP displaying thumbnails for a folder full of VTF format images.
Extension in Windows Vista, being used to instant search a mod's material folder.
Info Columns extension adding extra details about VTF files in a folder

VTF Shell Extensions VTF Shell Extensions are a set of DLL plug-ins which, when installed, extend the Windows shell to add support for Valve's VTF texture format files.

The first feature is thumbnail support for VTF textures, allowing you to preview a texture without converting it or opening it in another application. The second adds additional information columns in detail view, giving you access to information about file dimensions, storage format, header flags, etc. An additional feature in Vista is a small info pop-up when you hover over a VTF file.

Installation

The extensions come with their own installer which detects which version of Windows you are using and installs the relevant version. It provides an entry in the start menu and registers an un-installer in the Add/Remove Programs part of the system control panel.

Version 1.7.5.1 has been tested on Windows Vista, 7, 8.1, 10 and 11 and the installer updated for those versions. Support for Windows XP has been removed from the installer, through older version that support Windows XP can be found on External links below.

Notes for users

Since version 1.0.6, the extensions support the custom "Information" resource added to VTFLib 1.2.7. This allows you to view metadata embedded into the VTF by VTFEdit. This can contain information such as the texture's author, their contact details, the game/mod it was created for, etc. In XP this can be viewed using details view and in the properties pane in Vista.

If the VTF texture is animated, the thumbnail will be made from the first frame in the animation. If the texture is an environment map (cube map), it will first check to see if the texture contains a pre-rendered spheremap and show that and if not, show the first face in the map (CUBEMAP_FACE_RIGHT).

For the info columns extension, the data in the columns is shown as it's text or numerical value. The status of a header flag is shown as a simple Yes/No with yes indicating that the flag is set and vice-versa. However in the case of the filter flags (TEXTUREFLAGS_POINTSAMPLE, TEXTUREFLAGS_TRILINEAR and TEXTUREFLAGS_ANISOTROPIC) these are combined into a single column with the word Bilinear, Trilinear or Anisotropic indicating which flag is set. For the TEXTUREFLAGS_CLAMPS and TEXTUREFLAGS_CLAMPT pair, the column will show S, T or S/T to indicate which ones are set.

For cases where the values in the header would be meaningless, the value show for a file is left blank. A good example of this is if a texture has no low-res image. In this case the column for the low-res image dimensions and format will show nothing.

Tweaking

Under Windows XP, it's possible to tweak the thumbnail extension to show larger or smaller thumbnails as you desire. There are two ways of doing this:

  • by using Microsoft's TweakUI tool.
  • by manually setting a registry value.

For the first method, download and install TweakUI. Under the 'Explorer' option you'll find a sub-section entitled 'Thumbnails'. Selecting this will bring up a configuration screen which will let you alter the relative quality of the thumbnails and their dimensions in pixels. The maximum is 256 x 256 pixel.

For the second method, using RegEdit find HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer. Make a new DWORD value named ThumbnailSize. Double click the value and type in a number in decimal anywhere from 32 to 256 representing the thumbnail size in pixels you desire.

For later versions of Windows, you can adjust the size of the thumbnail with slider under "Views".

Technical information

The extensions are written in Visual Studio 2008 and as such require the "Visual Studio C++ 2008 SP1 re-distributable" to be installed. You can get it from here, or as part of this unofficial VC++ Redistributable Runtimes All-in-One.

Currently, the shell extension supports all published image storage formats supported by VTFLib 1.3.2. The only exception is IMAGE_FORMAT_P8. 16bpp (bits per pixel) textures are down-sampled to 8bpp before display.

Revision history

Version 1.7.5.1

  • Added support for Windows 8.1 and 10.
  • Removed support for Windows XP.

Version 1.7.5

  • Added support for version 7.5 of VTF format.
  • Change version number to reflect supported VTF format version.
  • Last supported version for Windows XP.

Version 1.0.61

  • Added support for Windows 7

Version 1.0.6

  • Added support for version 7.4 of VTF format.
  • Added support for the "Information" metadata resource.

Version 1.0.5

  • Updated VTFLib to compile as 32/64bit under VS2005.
  • Added experimental support for version 7.3 of VTF format.
  • Refined codebase and error handling.
  • Add support for Windows Vista (32-bit/64-bit)
  • Improved installer with better uninstall integration.

Version 1.0.3

  • Integrated VTFLib for flexibility.
  • Fixed small bug in the installer.

Version 1.0.2

  • Added support for v7.2 VTF files.
  • Improved memory usage slightly
  • Added "depth" column and CLAMPU support.
  • Added support for 16-bit HDR thumbnail images.

Version 1.0.1

  • Updated to VS.NET/ATL7
  • Added support for all listed image storage formats (except 8-bit paletted)
  • Limit image used in thumbnail generation to 256x256.
  • Fixed problem with animated textures not showing properly.
  • Fixed problem with cubemaps not showing properly.
  • Added additional info columns.

Version 1.0.0

  • Initial release.

See also

External links