Model Opt
Headless Blender decimation, atlas baking, and multi-clip FBX packager for mobile and web 3D models.
Automates cutting heavy Tripo/Meshy GLBs down to mobile/web triangle budgets, baking 2048px albedo/normal/metallic-smoothness/AO maps, merging animation clips into a single rigged FBX, and rendering before/after comparisons.
git clone https://github.com/BestRoiMedia/bestroi-game-tools.gitWhy we built it
AI-generated 3D meshes often ship with hundreds of thousands of triangles, unmerged animation GLBs, and oversized textures. Model Opt turns raw exports into engine-ready FBX + texture sets in one command.
Architecture & how it works
Invokes headless Blender (optimize_blend.py) to decimate geometry to the target triangle budget, bake PBR texture channels at 2048px (or custom resolution), combine anim_<clip>.glb takes onto one rig, and composite side-by-side compare.png previews.
Key capabilities
- Single-model (one) and JSON-manifest batch (batch) optimization pipelines
- Triangle-budget decimation preserving skin weights and skeletal rigs
- Merges separate anim_<clip>.glb files into named FBX animation takes
- Bakes albedo, normal, metallic-smoothness, and ambient occlusion PNG maps
- Generates before/after comparison renders and JSON size/triangle reports
Usage example
python3 model_opt/model_opt.py one ./raw_model/ --name hero --out ./opt/hero --tris 12000 --tex 2048
python3 model_opt/model_opt.py batch ./models_list.json --out-root ./opt/