No vtf: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Fix after breaking change in Template:SoftwareBox)
(no_vtf v5.1.1)
 
(6 intermediate revisions by 2 users not shown)
Line 8: Line 8:
| developer = {{u|B5327157}}
| developer = {{u|B5327157}}
| initial_release = Apr 8, 2022
| initial_release = Apr 8, 2022
| stable_release = Dec 7, 2023 (v4.2.0)
| stable_release = Jun 14, 2025 (v5.1.1)
| written_in = python
| written_in = python
| type = Texture converter
| type = Texture converter
| distribution = Free and open-source
| distribution = Free and open-source
| website = [https://sr.ht/~b5327157/no_vtf/ Homepage]<br>[https://pypi.org/project/no-vtf/ PyPI]
| website = [https://git.sr.ht/~b5327157/no_vtf/ Homepage]<br>[https://pypi.org/project/no-vtf/ PyPI]


<!-- Operating system(s)-->
<!-- Operating system(s)-->
| linux = 1
| linux = 1
| win = 1
| windows = 1
| mac = 1
| macos = 1


<!-- Target engine(s)-->
<!-- Target engine(s)-->
Line 30: Line 30:
<!-- Details -->
<!-- Details -->
| initial_release = Oct 6, 2023
| initial_release = Oct 6, 2023
| stable_release = Dec 7, 2023 (v0.1.2)
| stable_release = Dec 13, 2024 (v0.1.4)
| type = Desktop integration
| type = Desktop integration
| distribution = Free and open-source
| distribution = Free and open-source
Line 47: Line 47:
Usage: '''{{font color|{{no vtf|col}}|no_vtf}} {{font color|lightgray|[OPTIONS] [--] PATH...}}'''<br>
Usage: '''{{font color|{{no vtf|col}}|no_vtf}} {{font color|lightgray|[OPTIONS] [--] PATH...}}'''<br>
&nbsp;&nbsp;Convert Valve Texture Format files into standard image files.<br>
&nbsp;&nbsp;Convert Valve Texture Format files into standard image files.<br>
&nbsp;&nbsp;PATH can be either file, or directory (in which case it is recursively
&nbsp;&nbsp;PATH can be either a file or a directory (in which case it is recursively
&nbsp;&nbsp;searched for .vtf files, symbolic links are not followed). Multiple paths
&nbsp;&nbsp;searched for .vtf files; symbolic links are not followed). Multiple paths
&nbsp;&nbsp;may be provided.<br>
&nbsp;&nbsp;may be provided.<br>
&nbsp;&nbsp;As the output path, it is possible to specify either file or directory.<br>
&nbsp;&nbsp;As the output path, it is possible to specify either a file or a directory.<br>
&nbsp;&nbsp;Specifying the output file is useful mostly for single-file conversions,
&nbsp;&nbsp;Specifying the output file is useful mostly for single-file conversions,
&nbsp;&nbsp;with filters to ensure the output file will be written only once.<br>
&nbsp;&nbsp;with filters to ensure the output file will be written only once.<br>
&nbsp;&nbsp;If the output directory is not specified, images are output into the source
&nbsp;&nbsp;If the output directory is not specified, images are output into the source
&nbsp;&nbsp;directories (in-place conversion). Otherwise, directory tree for any found
&nbsp;&nbsp;directories (in-place conversion). Otherwise, the directory tree for any
&nbsp;&nbsp;files will be reconstructed in the chosen directory.<br>
&nbsp;&nbsp;found files will be reconstructed in the chosen directory.<br>
&nbsp;&nbsp;Output LDR/HDR format is selected by its common file name extension. It is
&nbsp;&nbsp;Output LDR/HDR format is selected by its common file name extension. It is
&nbsp;&nbsp;recommended selecting one of the specifically supported image formats (PNG,
&nbsp;&nbsp;recommended selecting one of the specifically supported image formats (PNG,
&nbsp;&nbsp;APNG, TGA, TIFF, EXR). Other image formats have not been validated to work,
&nbsp;&nbsp;APNG, TGA, TIFF, EXR). Other image formats have not been validated to work,
&nbsp;&nbsp;but can be still selected. A secondary format specifically used to output
&nbsp;&nbsp;but can still be selected. A secondary format specifically used to output
&nbsp;&nbsp;animated image files can be selected after &apos;&#124;&apos; (see default LDR format as an
&nbsp;&nbsp;animated image files can be selected after &apos;&#124;&apos; (see default LDR format as an
&nbsp;&nbsp;example). The &quot;skip&quot; format can be used to skip the write step entirely.<br>
&nbsp;&nbsp;example). The &quot;skip&quot; format can be used to skip the R/W step entirely.<br>
&nbsp;&nbsp;For the specifically supported image formats, compression is configurable
&nbsp;&nbsp;For the specifically supported image formats, compression is configurable
&nbsp;&nbsp;when saving the image. Lossless compression is enabled by default. Lossy
&nbsp;&nbsp;when saving the image. Lossless compression is enabled by default. Lossy
Line 71: Line 71:
&nbsp;&nbsp;height), and by frames/faces/slices. The former supports exact or closest
&nbsp;&nbsp;height), and by frames/faces/slices. The former supports exact or closest
&nbsp;&nbsp;match. The latter supports selection by single index or via Python slicing:
&nbsp;&nbsp;match. The latter supports selection by single index or via Python slicing:
&nbsp;&nbsp;https://python-reference.readthedocs.io/en/latest/docs/brackets/slicing.html<br>
&nbsp;&nbsp;https://python-reference.readthedocs.io/en/latest/docs/brackets/slicing.html
&nbsp;&nbsp;It is also possible to specify multiple indices/slices separated by commas.<br>
&nbsp;&nbsp;Face index mapping: right (0), left, back, front, up, down, sphere map (6).<br>
&nbsp;&nbsp;Face index mapping: right (0), left, back, front, up, down, sphere map (6).<br>
&nbsp;&nbsp;After applying filters, only the highest-resolution mipmap is converted by
&nbsp;&nbsp;After applying filters, only the highest-resolution mipmap is converted by
Line 78: Line 79:
&nbsp;&nbsp;Animated textures are converted into an animated multi-frame image file by
&nbsp;&nbsp;Animated textures are converted into an animated multi-frame image file by
&nbsp;&nbsp;default. Alternatively, they can also be converted into single-frame images
&nbsp;&nbsp;default. Alternatively, they can also be converted into single-frame images
&nbsp;&nbsp;with animation disabled.<br>
&nbsp;&nbsp;when animation is disabled.<br>
&nbsp;&nbsp;The RGB/L and A channels are packed into one file by default. When output
&nbsp;&nbsp;The RGB/L and A channels are packed into one file by default. When output
&nbsp;&nbsp;separately, resulting file names will be suffixed with &quot;_rgb&quot;, &quot;_l&quot; or &quot;_a&quot;.<br>
&nbsp;&nbsp;separately, resulting file names will be suffixed with &quot;_rgb&quot;, &quot;_l&quot;, or
&nbsp;&nbsp;&quot;_a&quot;.<br>
&nbsp;&nbsp;By default, image files are only written if they do not exist already.
&nbsp;&nbsp;By default, image files are only written if they do not exist already.
&nbsp;&nbsp;Alternatively, they can be overwritten, or writing can be disabled entirely.<br>
&nbsp;&nbsp;Alternatively, they can be overwritten, or writing can be disabled entirely.<br>
&nbsp;&nbsp;Images can also be read back to verify they have been written properly.
&nbsp;&nbsp;Images can also be read back to verify they have been written properly.
&nbsp;&nbsp;Readback will error if data to be written do not match what is in the file.<br>
&nbsp;&nbsp;Readback will error if would-be-written data does not match what is in the
&nbsp;&nbsp;Worker is spawned for each logical core to run the conversion in parallel.
&nbsp;&nbsp;file.<br>
&nbsp;&nbsp;Number of workers can be overridden. If set to 1, conversion is sequential.
&nbsp;&nbsp;Workers are spawned for each logical core to run the conversion in parallel.
&nbsp;&nbsp;Sequential conversion enables more verbose errors to be printed.<br>
&nbsp;&nbsp;The number of workers can be overridden. If set to 1, conversion is
&nbsp;&nbsp;sequential. Sequential conversion enables more verbose errors to be printed.<br>
&nbsp;&nbsp;Exit status: Zero if all went successfully, non-zero if there was an error.
&nbsp;&nbsp;Exit status: Zero if all went successfully, non-zero if there was an error.
&nbsp;&nbsp;Upon a recoverable error, conversion will proceed with the next file.<br>
&nbsp;&nbsp;Upon a recoverable error, conversion will proceed with the next file.<br>
Line 97: Line 100:
{{font color|#D78700|'''  Extraction: '''}}
{{font color|#D78700|'''  Extraction: '''}}
&nbsp;&nbsp;&nbsp;&nbsp;-m, --mipmaps                Extract all mipmaps
&nbsp;&nbsp;&nbsp;&nbsp;-m, --mipmaps                Extract all mipmaps
&nbsp;&nbsp;&nbsp;&nbsp;--low-res-img                Extract low resolution image
&nbsp;&nbsp;&nbsp;&nbsp;--low-res-img                Extract the low-resolution image
&nbsp;&nbsp;&nbsp;&nbsp;--min-resolution INTEGER      Minimum mipmap resolution  {{font color|gray|&#91;x&gt;&#61;1&#93;}}
&nbsp;&nbsp;&nbsp;&nbsp;--min-resolution INTEGER      Minimum mipmap resolution  {{font color|gray|&#91;x&gt;&#61;1&#93;}}
&nbsp;&nbsp;&nbsp;&nbsp;--max-resolution INTEGER      Maximum mipmap resolution  {{font color|gray|&#91;x&gt;&#61;1&#93;}}
&nbsp;&nbsp;&nbsp;&nbsp;--max-resolution INTEGER      Maximum mipmap resolution  {{font color|gray|&#91;x&gt;&#61;1&#93;}}
Line 135: Line 138:
&nbsp;&nbsp;&nbsp;&nbsp;--no-progress                Do not show the progress bar<br>
&nbsp;&nbsp;&nbsp;&nbsp;--no-progress                Do not show the progress bar<br>
{{font color|#D78700|'''  Info: '''}}
{{font color|#D78700|'''  Info: '''}}
&nbsp;&nbsp;&nbsp;&nbsp;--shell-completion &#91;SHELL&#93;    Setup shell completion.
&nbsp;&nbsp;&nbsp;&nbsp;-h, --help                    Show this message and exit.
&nbsp;&nbsp;&nbsp;&nbsp;-h, --help                    Show this message and exit.
&nbsp;&nbsp;&nbsp;&nbsp;--version                    Show the version and exit.
&nbsp;&nbsp;&nbsp;&nbsp;--version                    Show the version and exit.
Line 147: Line 151:


== External links ==
== External links ==
* [https://sr.ht/~b5327157/no_vtf/#application-bundle Download]
* [https://git.sr.ht/~b5327157/no_vtf/#application-bundle Download]


{{sdktools|cat=0|0}}
{{sdktools|cat=0|0}}
[[Category:Material System]][[Category:Third Party Tools]]
[[Category:Material System]][[Category:Third Party Tools]]

Latest revision as of 13:58, 14 June 2025

Stub

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

no_vtf
Developer(s)
Initial release
Apr 8, 2022
Stable release
Jun 14, 2025 (v5.1.1)
Written in
Python
Operating system
Windows MacOS Linux
Type
Texture converter
Target engine(s)
Source
Distribution
Free and open-source
Website
no_vtf-desktop
Initial release
Oct 6, 2023
Stable release
Dec 13, 2024 (v0.1.4)
Operating system
Linux
Type
Desktop integration
Distribution
Free and open-source
Website

no_vtf is an open source alternative to VTF2TGA 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

Help from no_vtf run without an input file:

Usage: no_vtf [OPTIONS] [--] PATH...

  Convert Valve Texture Format files into standard image files.
  PATH can be either a file or a directory (in which case it is recursively   searched for .vtf files; symbolic links are not followed). Multiple paths   may be provided.
  As the output path, it is possible to specify either a file or a directory.
  Specifying the output file is useful mostly for single-file conversions,   with filters to ensure the output file will be written only once.
  If the output directory is not specified, images are output into the source   directories (in-place conversion). Otherwise, the 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. It is   recommended selecting one of the specifically supported image formats (PNG,   APNG, TGA, TIFF, EXR). Other image formats have not been validated to work,   but can still be selected. A secondary format specifically used to output   animated image files can be selected after '|' (see default LDR format as an   example). The "skip" format can be used to skip the R/W step entirely.
  For the specifically supported image formats, compression is configurable   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.
  It is possible to filter images to convert by min/max resolution (width &   height), and by frames/faces/slices. The former supports exact or closest   match. The latter supports selection by single index or via Python slicing:   https://python-reference.readthedocs.io/en/latest/docs/brackets/slicing.html   It is also possible to specify multiple indices/slices separated by commas.
  Face index mapping: right (0), left, back, front, up, down, sphere map (6).
  After applying filters, only the highest-resolution mipmap is converted by   default. Alternatively, all mipmaps of the high-resolution image can be   converted.
  Animated textures are converted into an animated multi-frame image file by   default. Alternatively, they can also be converted into single-frame images   when animation is disabled.
  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 also be read back to verify they have been written properly.   Readback will error if would-be-written data does not match what is in the   file.
  Workers are spawned for each logical core to run the conversion in parallel.   The number of workers can be overridden. If set to 1, conversion is   sequential. Sequential conversion enables more verbose errors to be printed.
  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:   Conversion mode:     --animate / --no-animate Output animated image file (default) /                                   output each frame individually     --raw Extract image data as-is (without decoding)
Extraction:     -m, --mipmaps Extract all mipmaps     --low-res-img Extract the low-resolution image     --min-resolution INTEGER Minimum mipmap resolution [x>=1]     --max-resolution INTEGER Maximum mipmap resolution [x>=1]     --closest-resolution Fallback to the closest resolution if no                                   exact match     --frames INDEX|[START]:[STOP][:STEP]                                   Frames to extract     --faces INDEX|[START]:[STOP][:STEP]                                   Faces to extract     --slices INDEX|[START]:[STOP][:STEP]                                   Slices to extract
Image decoding (not used with --raw):     --dynamic-range [ldr|hdr] Override LDR/HDR auto-detection     --overbright-factor FLOAT Multiplicative factor used for decoding                                   compressed HDR textures [default: 16.0]
Image postprocessing (not used with --raw):     --hdr-to-ldr Convert HDR from linear sRGB to sRGB and                                   output as clipped LDR     --separate-channels Output the RGB/L and A channels separately
Image output (not used with --raw):     -f, --ldr-format SINGLE[|MULTI]                                   LDR output format [default: tiff|apng]     -F, --hdr-format SINGLE[|MULTI]                                   HDR output format [default: exr]     --fps INTEGER Frame rate used for animated image files                                   [default: 5]     --compress / --no-compress Control lossless compression
Read/write control:     --always-write / --no-write Write images     --readback / --no-readback Readback images
Output destination:     -o, --output-dir PATH Output directory     -O, --output-file PATH Output file
Miscellaneous:     --num-workers INTEGER Number of workers for parallel conversion                                   [x>=1]     --no-progress Do not show the progress bar
Info:     --shell-completion [SHELL] Setup shell completion.     -h, --help Show this message and exit.     --version Show the version and exit.     --credits Show the credits and exit.

See also

External links