Skip to content

Convert PBR materials to VMT and VTF files that imitate PBR properties in Source engine games like Garry's Mod.

License

Notifications You must be signed in to change notification settings

hampta/FastValveMaterial

Repository files navigation

Releases License

FastValveMaterial

Convert PBR materials to VMT and VTF files that imitate PBR properties in Source engine games like Garry's Mod.

Dependencies:

Usage:

  • Download the latest release from the Releases tab
  • Extract to a folder
  • Change the settings in config.ini
  • Run FastValveMaterial.exe

Use arguments:

  • -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

Usage from source (or linux):

  • 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)
  1. Adjust config.ini
  2. Drop all texture files into your input folder
  3. Run FastValveMaterial.py

CMD

git clone https://github.com/hampta/FastValveMaterial
cd FastValveMaterial
git submodules init
git submodules update
pip install -r requirements.txt
python FastValveMaterial.py

Notes and Troubleshooting:

  • 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.

Examples:

  • With FVM: 1
  • Witout FVM: 2

TODO

  • binary (.exe) build for windows
  • rewrite textures finder
  • rewrite main function
  • multithreading support

About

Convert PBR materials to VMT and VTF files that imitate PBR properties in Source engine games like Garry's Mod.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.0%
  • Batchfile 2.0%