What is wrong with this model, why so slow?

Has anybody actually taken a look at the glb file? It doesn’t seem to have 12k meshes. I’m not sure why it’s showing up this way in babylonjs. @omerization If you open this file in blender first then save it you should be seeing around 240 draw calls, which should run way better.

This is a bizarre glb file, and you’ll have to confirm nothing is missing, but it doesn’t seem like it has even remotely close to 12k parts. I do CAD conversion on a daily basis and have developed blender add-ons to automate reduce of draw calls through a number of techniques depending on our goal with the final file. I plan to post the blender script here soon as well as other (three.js) forums. I’ll try to remember to ping you if you’re interested in using them.

Another nice thing for compressing these (usually giant) STEP → GLB files is draco compression. I suggest using draco on the meshes, once you’re saving your final copy, to reduce the file size substantially. Me and @notmike101 are also releasing a tool called pack3d, which will be able to quickly assist in this process too.

TLDR
This file shouldn’t have 12,000 draw calls, it is a bug of some sort. I have seen hundreds of crazy broken glb / fbx files that come from CAD conversions and it is infuriating. Not sure what is causing the issue on this one, but just save the file through blender and it will be fixed. If you want to automate this I suggest writing a small Python script and you can use blender as a command line tool to save the file in order to fix it.

4 Likes