Converts Three Layered Materials (TLMs) into Valve VMT/VTF textures for use in Source Engine mapping. (because RBXLX2VMF doesn't import custom RBX textures) Included:
- Roblox materials, with variants (mossy, rusty, ...)
- Roblox surfaces (studs, inlets, universal, glue) (RETRO)
- Dev surfaces (Wall, Grid)
- JSON with the 208 RBX BrickColors and 10 additionnal Dev Colors
It's because it has 3 "layers" to make one texture, a color tint, a material and an overlay/surface.
Here is exactly how the code builds the texture:
- Load material image
- Generate tint color from JSON
- Tint material via pixel-wise multiply
- Overlay surface texture on the tinted material
- Python 3
- Pillow (
pip install pillow) - External tool
vtfcmd(included inbin/)
-
Download entire repo and have it in a folder
-
Run
vtfbuilder.pyor usepython ./vtfbuilder.pyin a terminal,- add
--output-path "path/to/materials"to extract directly to your materials folder - add
--keep-png (true/yes/1)to keep the temporary pngs - Example
vtfbuilder.py --keep-png 1 --output-path "D:\Steam\steamapps\common\GarrysMod\garrysmod\materials"
- add
-
Select material(s):
- Use
smoothplasticif you just want the color,neonwill make the texture "glow" ($selfillum 1, no light emission.) - Script lists all images in
material/. - Type comma-separated names (without extension) or
all. - Each selected material will be processed via
ThreadPoolExecutor. - /!\ This means choosing to process one material at a time will be slower than selecting multiple at once
- Use
-
Select surface(s) similarly.
- Use
smoothif you want no overlay and just the tinted material.
- Use
-
Let the script do its work
-
Find results in
output/rbx/.... -
Move the
rbx/directory to your Source game'smaterialsfolder.