Easy .material Creation Script
Zavaro
Tucson, Arizona Join Date: 2005-02-14 Member: 41174Members, Super Administrators, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Shadow, WC 2013 - Silver, Subnautica Playtester, NS2 Community Developer, Pistachionauts
Hello fellow mappers,
So, I've been super tired of manually creating and writing .material files with the proper shaders, so I decided to take it upon myself and learn python last night. It's fairly simply, and there's still some room for error, but if anything it bypasses the horribly tedious steps of creating files and entries one by one.
Features!
It's available on my near empty GitHub, so feel free to use it an modify it, but please give me permission! I plan on updating it a lot over the next few days, with new features and whatnot else.
Click download ZIP on the top right and extract anywhere!
It requires Python 3.5, so please use the newest version available here.
FYI: Python is not backwards compatible, so you do need Python 3.5, not 2.7!
Known Issues!
So, I've been super tired of manually creating and writing .material files with the proper shaders, so I decided to take it upon myself and learn python last night. It's fairly simply, and there's still some room for error, but if anything it bypasses the horribly tedious steps of creating files and entries one by one.
Features!
- It adds a shader based on files with the same base name as the original file, for instance: if you have a *_normal map, it will automatically set Model.surface_shader automatically.
- Specifically sets shaders for files with "glass" and "decal" in their names to the correct shaders!
- It automatically will add any present special mappings to the .material list. If you have a *_spec or and *_alpha, it will add these!
- It also has some smart features, like automatically setting the surface type by name (if it has rock in the name, sets as rock!) or by prompt, your choice!
- Works with Skyboxes!
- Works with folders in folders in folders!
It's available on my near empty GitHub, so feel free to use it an modify it, but please give me permission! I plan on updating it a lot over the next few days, with new features and whatnot else.
Click download ZIP on the top right and extract anywhere!
It requires Python 3.5, so please use the newest version available here.
FYI: Python is not backwards compatible, so you do need Python 3.5, not 2.7!
Known Issues!
- Doesn't work with anything outside of the materialsrc directory, that said, I might create an addition for model textures in the future.
- It deletes .material files which exist in the directory prior to the script. This is just necessary cleanup for these individual files. Remember to back up any previous .material files!
- It's not perfect.