Convert PBR materials to VMT and VTF files that imitate PBR properties in Source engine games like Garry's Mod.
- pillow (PIL)
- VTFLibWrapper (https://github.com/Ganonmaster/VTFLibWrapper)
- Download the latest release from the Releases tab
- Extract to a folder
- Change the settings in
config.ini
- Run
FastValveMaterial.exe
-c
or--config
- Config file to use-i
or--input
- Input folder to use-o
or--output
- Output folder to use-t
or--threads
- Thread count to use-d
or--debug
- Enable debug messages-f
or--fast-export
- Enable fast export (no compression)-e
or--export
- Export images-h
or--help
- Show help message
- If you're using the release version, you don't need to do anything else
- On the other hand, when cloning the source, make sure to also pull and initialize VTFLibWrapper ("
git submodules init
" + "git submodules update
") pip install -r requirements.txt
- You will need the following textures:
- Diffuse/Color map
- Normal map
- Metalness map
- Glossiness map (If you have a roughness map, set "Material Type" in
config.ini
to "rough") - Optional: Ambient Occlusion map (If no image is given, the script defaults to a white image as the AO map)
- Adjust config.ini
- Drop all texture files into your input folder
- Run
FastValveMaterial.py
git clone https://github.com/hampta/FastValveMaterial
cd FastValveMaterial
git submodules init
git submodules update
pip install -r requirements.txt
python FastValveMaterial.py
- Make sure your images are in RGBA8888 format. While the script can understand many different color formats, if you're getting errors, check if this is the case.
- texture maps presets in
config.ini
(your metallic is in the alpha channel of the normal map, and roughness is in the alpha channel of the diffuse or any other “format”. So that you can make a preset for certain formats and use them without separating them in a photo editor) binary (.exe) build for windowsrewrite textures finderrewrite main functionmultithreading support