Skip to content

Flerp/Batch-VMAT-Maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Batch-VMAT-Maker

This is a bulk VMAT Maker
As with any scripts grabbed from the internet, make sure to backup your texture files before running this, in the event anything goes wrong

Powershell Script Version

Place the powershell script in your materials/foldername/ folder, alongside your texture files
The texture files must be named with sbox's preferred suffixes (_color, _rough, _selfillum, _metal, _trans)
The powershell script will search for texture files with the _color suffix
Once it finds something with that suffix it scans for other texture files with the same name, but with the additional suffixes
The vmat output will include all extra maps that are found

tl;dr: If the script finds texture_brick_color.png it will search for the _rough, _selfillum, _metal , and _trans suffixed texture files
if it finds them it will add them to the vmat in the appropriate place with default settings

Batch File Version (old and not maintained/updated)

Basic Instructions

Place this script file into your materials/basetexturefiles/ folder alongside your texture files
Run the script
The options are outlined below

1. CREATE BASIC VMAT FILES

This will create a VMAT file for every image file in the basetexturefiles folder
It create a vmat with the complex shader and uses the image file(s) for the "color" option

2. CREATE PBR VMAT FILES

This will create VMAT files with color, metalness, normal, and metalness
This option expects all texture files to be the same file format
This option also expects the files to be named per the specifications of sbox (texturename_color, texturename_metal, texturename_normal, texturename_rough)

3. CLEANUP UNCOMPILED VMAT FILES

This option scans your vmat files and checks for vmat_c files
If it doesn't find a vmat_c file corresponding with the vmat file it will remove the vmat file
This option is mainly for cleaning up any unused materials from the final folder

4. CLOSE BATCH VMAT MAKER

Closes the script

Error Handling

This script has some basic error handling that should prevent it from running wild and going through multiple operations at once.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published