Closed emnh closed 9 months ago
That's interesting, but feels a little bit out of the scope of this project. Although I'm sure it would be useful to some people. If your scripts do not require any changes in codebase of m3addon, I think it would be better to off-load them to another repository.
We could add a section Tools & resources
to README file, and link scripts like these, and pretty much anything that takes use of m3addon
.
I have 2 small scripts for batch conversion from M3 to GLTF 2.0 via FBX using Blender and M3Addon and https://github.com/facebookincubator/FBX2glTF for 3D and ImageMagick to convert DDS to JPG. They are hackish and will need editing for binary locations before run, but would you like me to create a pull request? Put them in a batch/ folder? I'll just copy-paste them in the issue for now.
I also have a demo page that shows how to both skin and instance a GLTF 2.0 model for drawing mass quantities of units using THREE.js (1 million units (http://emh.lart.no/publish/csb/million-mutas2.png) at 3 FPS, 20k animated units with simple physics at 144 FPS on RTX 2080 Ti). This one is better kept as separate repository due to usefulness apart from M3 and because of a few dependencies and is not ready for publishing yet, but could be linked to later if you want to. Or people can just find it through the issue since I saw you do not have capacity for taking pull requests at the moment. I will post a link on this issue thread when I push it to github.
Script for batch conversion from FBX to GLTF 2.0. Run with blender -P or just let the other script call it.
batch_convert.py
Here is the main script, which searches for M3 files specified in $PWD/../../mods and converts them. Edit and use at will. I ran the script under Windows Subsystem for Linux on Windows. Should work on Linux as well if you replace the path to Blender. Also edit path to FBX2glTF-linux-x64 and m3addon.
assimilate.sh