No vtf: Difference between revisions
Jump to navigation
Jump to search
Tip:Compressed HDR textures are automatically detected by the presence of the string "hdr" near the end of the filename.

(Update help to version 4.0.0) |
(no_vtf v5.1.1) |
||
(28 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{stub}}{{DISPLAYTITLE:no_vtf}} | {{stub}}{{DISPLAYTITLE:no_vtf}} | ||
{{SoftwareBox | |||
<!-- Basic info --> | |||
| title = no_vtf | |||
<!-- Details --> | |||
| developer = {{u|B5327157}} | |||
| initial_release = Apr 8, 2022 | |||
| stable_release = Jun 14, 2025 (v5.1.1) | |||
| written_in = python | |||
| type = Texture converter | |||
| distribution = Free and open-source | |||
| website = [https://git.sr.ht/~b5327157/no_vtf/ Homepage]<br>[https://pypi.org/project/no-vtf/ PyPI] | |||
<!-- Operating system(s)--> | |||
| linux = 1 | |||
| windows = 1 | |||
| macos = 1 | |||
<!-- Target engine(s)--> | |||
| source = 1 | |||
}} | |||
{{SoftwareBox | |||
<!-- Basic info --> | |||
| title = no_vtf-desktop | |||
<!-- Details --> | |||
| initial_release = Oct 6, 2023 | |||
| stable_release = Dec 13, 2024 (v0.1.4) | |||
| type = Desktop integration | |||
| distribution = Free and open-source | |||
| website = [https://git.sr.ht/~b5327157/no_vtf-desktop Homepage]<br>[https://pypi.org/project/no-vtf-desktop/ PyPI] | |||
<!-- Operating system(s)--> | |||
| linux = 1 | |||
}} | |||
{{no_vtf|3}} is an open source alternative to {{vtf2tga|4}}. 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. | |||
{{tip|Compressed HDR textures are automatically detected by the presence of the string "hdr" near the end of the filename.}} | {{tip|Compressed HDR textures are automatically detected by the presence of the string "hdr" near the end of the filename.}} | ||
Line 6: | Line 45: | ||
{{License|type=lgpl|version=3}} Help from no_vtf run without an input file: | {{License|type=lgpl|version=3}} Help from no_vtf run without an input file: | ||
{{codeblock| | {{codeblock| | ||
Usage: {{font color| | Usage: '''{{font color|{{no vtf|col}}|no_vtf}} {{font color|lightgray|[OPTIONS] [--] PATH...}}'''<br> | ||
Convert Valve Texture Format files into standard image files.<br> | Convert Valve Texture Format files into standard image files.<br> | ||
PATH can be either file | PATH can be either a file or a directory (in which case it is recursively | ||
searched for .vtf files | searched for .vtf files; symbolic links are not followed). Multiple paths | ||
may be provided.<br> | may be provided.<br> | ||
As the output path, it is possible to specify either file or directory.<br> | As the output path, it is possible to specify either a file or a directory.<br> | ||
Specifying the output file is useful mostly for single-file conversions, | Specifying the output file is useful mostly for single-file conversions, | ||
with filters to ensure the output file will be written only once.<br> | with filters to ensure the output file will be written only once.<br> | ||
If the output directory is not specified, images are output into the source | If the output directory is not specified, images are output into the source | ||
directories (in-place conversion). Otherwise, directory tree for any | directories (in-place conversion). Otherwise, the directory tree for any | ||
files will be reconstructed in the chosen directory.<br> | found files will be reconstructed in the chosen directory.<br> | ||
Output LDR/HDR format is selected by its common file name extension. It is | Output LDR/HDR format is selected by its common file name extension. It is | ||
recommended selecting one of the specifically supported image formats (PNG, | recommended selecting one of the specifically supported image formats (PNG, | ||
APNG, TGA, TIFF, EXR). Other image formats have not been validated to work, | APNG, TGA, TIFF, EXR). Other image formats have not been validated to work, | ||
but can be | 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 | animated image files can be selected after '|' (see default LDR format as an | ||
example). The "skip" format can be used to skip the | example). The "skip" format can be used to skip the R/W step entirely.<br> | ||
For the specifically supported image formats, compression is configurable | For the specifically supported image formats, compression is configurable | ||
when saving the image. Lossless compression is enabled by default. Lossy | when saving the image. Lossless compression is enabled by default. Lossy | ||
Line 32: | Line 71: | ||
height), and by frames/faces/slices. The former supports exact or closest | height), and by frames/faces/slices. The former supports exact or closest | ||
match. The latter supports selection by single index or via Python slicing: | match. The latter supports selection by single index or via Python slicing: | ||
https://python-reference.readthedocs.io/en/latest/docs/brackets/slicing.html<br> | https://python-reference.readthedocs.io/en/latest/docs/brackets/slicing.html | ||
It is also possible to specify multiple indices/slices separated by commas.<br> | |||
Face index mapping: right (0), left, back, front, up, down, sphere map (6).<br> | Face index mapping: right (0), left, back, front, up, down, sphere map (6).<br> | ||
After applying filters, only the highest-resolution mipmap is converted by | After applying filters, only the highest-resolution mipmap is converted by | ||
Line 39: | Line 79: | ||
Animated textures are converted into an animated multi-frame image file by | Animated textures are converted into an animated multi-frame image file by | ||
default. Alternatively, they can also be converted into single-frame images | default. Alternatively, they can also be converted into single-frame images | ||
| when animation is disabled.<br> | ||
The RGB/L and A channels are packed into one file by default. When output | 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".<br> | separately, resulting file names will be suffixed with "_rgb", "_l", or | ||
"_a".<br> | |||
By default, image files are only written if they do not exist already. | By default, image files are only written if they do not exist already. | ||
Alternatively, they can be overwritten, or writing can be disabled entirely.<br> | Alternatively, they can be overwritten, or writing can be disabled entirely.<br> | ||
Images can also be read back to verify they have been written properly. | Images can also be read back to verify they have been written properly. | ||
Readback will error if | Readback will error if would-be-written data does not match what is in the | ||
| file.<br> | ||
| 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.<br> | |||
Exit status: Zero if all went successfully, non-zero if there was an error. | 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.<br> | Upon a recoverable error, conversion will proceed with the next file.<br> | ||
<u>Options</u>: | <u>Options</u>: | ||
{{font color|#D78700| | {{font color|#D78700|'''Conversion mode: '''}} | ||
--animate / --no-animate Output animated image file (default) / | --animate / --no-animate Output animated image file (default) / | ||
output each frame individually | output each frame individually | ||
--raw Extract image data as-is (without decoding)<br> | --raw Extract image data as-is (without decoding)<br> | ||
{{font color|#D78700| | {{font color|#D78700|''' Extraction: '''}} | ||
-m, --mipmaps Extract all mipmaps | -m, --mipmaps Extract all mipmaps | ||
--low-res-img Extract low resolution image | --low-res-img Extract the low-resolution image | ||
--min-resolution INTEGER Minimum mipmap resolution {{font color|gray|[x>=1]}} | --min-resolution INTEGER Minimum mipmap resolution {{font color|gray|[x>=1]}} | ||
--max-resolution INTEGER Maximum mipmap resolution {{font color|gray|[x>=1]}} | --max-resolution INTEGER Maximum mipmap resolution {{font color|gray|[x>=1]}} | ||
Line 68: | Line 111: | ||
--slices INDEX|[START]:[STOP][:STEP] | --slices INDEX|[START]:[STOP][:STEP] | ||
Slices to extract<br> | Slices to extract<br> | ||
{{font color|#D78700| | {{font color|#D78700|''' Image decoding (not used with --raw): '''}} | ||
--dynamic-range [ldr|hdr] Override LDR/HDR auto-detection | --dynamic-range [ldr|hdr] Override LDR/HDR auto-detection | ||
--overbright-factor FLOAT Multiplicative factor used for decoding | --overbright-factor FLOAT Multiplicative factor used for decoding | ||
compressed HDR textures [default: 16.0]<br> | compressed HDR textures [default: 16.0]<br> | ||
{{font color|#D78700| | {{font color|#D78700|''' Image postprocessing (not used with --raw): '''}} | ||
--hdr-to-ldr Convert HDR from linear sRGB to sRGB and | --hdr-to-ldr Convert HDR from linear sRGB to sRGB and | ||
output as clipped LDR | output as clipped LDR | ||
--separate-channels Output the RGB/L and A channels separately<br> | --separate-channels Output the RGB/L and A channels separately<br> | ||
{{font color|#D78700| | {{font color|#D78700|''' Image output (not used with --raw): '''}} | ||
-f, --ldr-format SINGLE[|MULTI] | -f, --ldr-format SINGLE[|MULTI] | ||
LDR output format [default: tiff|apng] | LDR output format [default: tiff|apng] | ||
Line 84: | Line 127: | ||
[default: 5] | [default: 5] | ||
--compress / --no-compress Control lossless compression<br> | --compress / --no-compress Control lossless compression<br> | ||
{{font color|#D78700| | {{font color|#D78700|''' Read/write control: '''}} | ||
--always-write / --no-write Write images | --always-write / --no-write Write images | ||
--readback / --no-readback Readback images<br> | --readback / --no-readback Readback images<br> | ||
{{font color|#D78700| | {{font color|#D78700|''' Output destination: '''}} | ||
-o, --output-dir PATH Output directory | -o, --output-dir PATH Output directory | ||
-O, --output-file PATH Output file<br> | -O, --output-file PATH Output file<br> | ||
{{font color|#D78700| | {{font color|#D78700|''' Miscellaneous: '''}} | ||
--num-workers INTEGER Number of workers for parallel conversion | --num-workers INTEGER Number of workers for parallel conversion | ||
{{font color|gray|[x>=1]}} | {{font color|gray|[x>=1]}} | ||
--no-progress Do not show the progress bar<br> | --no-progress Do not show the progress bar<br> | ||
{{font color|#D78700| | {{font color|#D78700|''' Info: '''}} | ||
--shell-completion [SHELL] Setup shell completion. | |||
-h, --help Show this message and exit. | -h, --help Show this message and exit. | ||
--version Show the version and exit. | --version Show the version and exit. | ||
Line 101: | Line 145: | ||
}} | }} | ||
== See | == See also == | ||
* | * {{vtf2tga|4}} | ||
* | * {{vtfedit|4}} | ||
* {{vtfeditrld|4}} | |||
== External | == External links == | ||
* [https://sr.ht/~b5327157/no_vtf/ 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
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.

Help text

The following work is licensed under the GNU General Public License 3.0
This work is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License; version 3 as published by the Free Software Foundation. This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See version 3 of the GNU Lesser General Public License for more details.
This work is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License; version 3 as published by the Free Software Foundation. This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See version 3 of the GNU Lesser General Public License for more details.
Help from no_vtf run without an input file:
See also
External links
|