No vtf: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (it's possible manually, as well, apparently)
m (This is useful, since it't not on the page app's webpage)
Line 1: Line 1:
{{stub}}{{DISPLAYTITLE:no_vtf}}
{{stub}}{{DISPLAYTITLE:no_vtf}}
'''no_vtf''' is an open source alternative to [[VTF2TGA]]. Unlike its first-party counterpart, it also supports converting [[VTF]]s to [[PNG]], [[Wikipedia:TIFF|TIFF]], and [[Wikipedia:OpenEXR|EXR]], and can also decompress [[VTF#HDR compression|compressed HDR]] skybox textures.
'''no_vtf''' is an open source alternative to [[VTF2TGA]]. Unlike its first-party counterpart, it also supports converting [[VTF]]s to [[PNG]], [[Wikipedia:TIFF|TIFF]], and [[Wikipedia:OpenEXR|EXR]], and can also decompress [[VTF#HDR compression|compressed HDR]] skybox textures.
{{modernConfirm|How does no_vtf automatically detect compressed HDR textures? Does it look for the string {{code|hdr}} in the input filename? Compressed HDR is purely a shader thing, and isn't flagged in the VTF file….}}
{{tip|Compressed HDR textures are automatically detected by the presence of the string "hdr" near the end of the filename.}}
 
== Help text ==
{{copyright|license=lgpl|version=3.0}} Help from no_vtf run without an input file:
{{codeblock|<!--
--><nowiki>Usage: no_vtf.exe [OPTIONS] PATH...
 
  Convert Valve Texture Format files into standard image files.
 
  PATH can be either file, or directory (in which case it is recursively
  searched for .vtf files). Multiple paths may be provided.
 
  If the output directory is not specified, images are output into the source
  directories. Otherwise, directory tree for any found files will be
  reconstructed in the chosen directory.
 
  Output LDR/HDR format is selected by its common file name extension. Special
  formats: "raw" to write the high resolution image data as-is; "skip" to skip
  the write step entirely.
 
  For supported formats, compression is controlled when saving the image.
  Lossless compression is enabled by default. Lossy compression is not used.
 
  The BGRA8888 format can store both LDR and compressed HDR images. The
  specific type is either auto-detected by looking at the input file name
  (roughly, if it contains "hdr" near the end), or can be set manually.
 
  Only the highest-resolution mipmap is extracted by default. Alternatively,
  all mipmaps of the high-resolution image can be extracted.
 
  The RGB/L and A channels are packed into one file by default. When output
  separately, resulting file names will be suffixed with "_rgb", "_l" or "_a".
 
  By default, image files are only written if they do not exist already.
  Alternatively, they can be overwritten, or writing can be disabled entirely.
 
  Images can be also read back to verify they have been written properly.
  Readback will error if data to be written do not match what is in the file.
 
  Worker is spawned for each logical core to run the conversion in parallel.
  Number of workers can be overridden. If set to 1, conversion is sequential.
 
  Exit status: Zero if all went successfully, non-zero if there was an error.
  Upon a recoverable error, conversion will proceed with the next file.
 
Options:
  -o, --output-dir DIRECTORY    Output directory
  -l, --ldr-format TEXT          LDR output format  [default: tiff]
  -h, --hdr-format TEXT          HDR output format  [default: exr]
  -d, --dynamic-range [ldr|hdr]  Override LDR/HDR auto-detection
  -m, --mipmaps                  Extract all mipmaps
  -s, --separate-channels        Output the RGB/L and A channels separately
  -O, --overbright-factor FLOAT  Multiplicative factor used for decoding
                                compressed HDR textures  [default: 16]
  --compress / --no-compress    Control lossless compression
  --always-write / --no-write    Write images
  --readback / --no-readback    Readback images
  --num-workers INTEGER          Number of workers for parallel conversion
                                [x>=1]
  --no-progress                  Do not show the progress bar
  --version                      Show the version and exit.
  --credits                      Show the credits and exit.
  --help                        Show this message and exit.
</nowiki>}}


== See Also ==
== See Also ==

Revision as of 19:59, 5 June 2023

Stub

This article or section is a stub. You can help by expanding it.

no_vtf is an open source alternative to VTF2TGA. Unlike its first-party counterpart, it also supports converting VTFs to PNG, TIFF, and EXR, and can also decompress compressed HDR skybox textures.

Tip.pngTip:Compressed HDR textures are automatically detected by the presence of the string "hdr" near the end of the filename.

Help text

Template:Copyright Help from no_vtf run without an input file:

Usage: no_vtf.exe [OPTIONS] PATH... Convert Valve Texture Format files into standard image files. PATH can be either file, or directory (in which case it is recursively searched for .vtf files). Multiple paths may be provided. If the output directory is not specified, images are output into the source directories. Otherwise, directory tree for any found files will be reconstructed in the chosen directory. Output LDR/HDR format is selected by its common file name extension. Special formats: "raw" to write the high resolution image data as-is; "skip" to skip the write step entirely. For supported formats, compression is controlled when saving the image. Lossless compression is enabled by default. Lossy compression is not used. The BGRA8888 format can store both LDR and compressed HDR images. The specific type is either auto-detected by looking at the input file name (roughly, if it contains "hdr" near the end), or can be set manually. Only the highest-resolution mipmap is extracted by default. Alternatively, all mipmaps of the high-resolution image can be extracted. The RGB/L and A channels are packed into one file by default. When output separately, resulting file names will be suffixed with "_rgb", "_l" or "_a". By default, image files are only written if they do not exist already. Alternatively, they can be overwritten, or writing can be disabled entirely. Images can be also read back to verify they have been written properly. Readback will error if data to be written do not match what is in the file. Worker is spawned for each logical core to run the conversion in parallel. Number of workers can be overridden. If set to 1, conversion is sequential. Exit status: Zero if all went successfully, non-zero if there was an error. Upon a recoverable error, conversion will proceed with the next file. Options: -o, --output-dir DIRECTORY Output directory -l, --ldr-format TEXT LDR output format [default: tiff] -h, --hdr-format TEXT HDR output format [default: exr] -d, --dynamic-range [ldr|hdr] Override LDR/HDR auto-detection -m, --mipmaps Extract all mipmaps -s, --separate-channels Output the RGB/L and A channels separately -O, --overbright-factor FLOAT Multiplicative factor used for decoding compressed HDR textures [default: 16] --compress / --no-compress Control lossless compression --always-write / --no-write Write images --readback / --no-readback Readback images --num-workers INTEGER Number of workers for parallel conversion [x>=1] --no-progress Do not show the progress bar --version Show the version and exit. --credits Show the credits and exit. --help Show this message and exit.

See Also

External Links