|Topic was automatically imported from the old Question2Answer platform.
Hi, I’m trying to use GLTF to export-import models from Blender but the size of the glb/gltf files seems to be extreme (dozens of mb). I found out that during exporting the character’s animation is transformed from key-to-key interpolation into frame-by-frame animation. I know I can increase “Sampling Rate” in the settings during exporting but in the “Why we should all support glTF 2.0 as THE standard asset exchange format for game engines” article they claim that GLTF also supports “many key interpolation types”. But I don’t see it anywhere.
Is it possible to fix it in Blender or I have to import it as it is and rework animation in Godot manually?
what about materials ? They take plenty of space in gltf, while in Godot You can just use one material with various colours. Only export materials “as placeholder”
Inces | 2022-07-22 21:03
Without materials the size is reduced by several hundreds kb.
AzureOrc | 2022-07-23 06:38
Ok. But did You already determined, that it is animation responsible for the size ?
How much faces does your model have, how much bones does it use ?
If You only have one character like this, it is not a big deal. But if all of your models are of this size, You should think if is there anything all models can share for optimization. Like communal armature or animations.
Inces | 2022-07-23 06:51
Yes, it is animation. The model is a rigged character. The model has 6205 triangles. GLB files with no materials have size 19mb exported with animations and 320kb exported without animations. No shape keys in both versions.
Another example, here’s animation key in Blender before exporting
Then I exported the model and imported in blender again
As you can see the exporter just destroyed all the interpolation putting keys in every frame. There’s an option in exporter that allows to adjust the gape among keys (for instance, to put a frame every 10 frames and not every frame) but it doesn’t work for me
AzureOrc | 2022-07-23 07:24
So theoretically, could You remove interpolation handles in Blender, export sole keyframes, and add interpolation handles in Godot ?
Even if You could, that would be crippling workflow I guess, You would have to create new animation based on imported one before remaking it. This would make reimporting updated/tweaked animation extremely tedious.
Inces | 2022-07-23 08:52
Yes, that’s the problem. I wouldn’t even actually care but this makes the game’s resources extremely heavy.
I have just found animation optimization that removes duplicated keyframes and it reduces the file size to 8-9 mb but it’s still too big. Godot optimizes it somehow again and .anim file is getting size of 2-3 mb. It’s way better but the problem stays because I can’t just use GTB/TF formats in Godot, I have to convert everything in Godot resources which makes the assets workflow awfully exhausting.
AzureOrc | 2022-07-23 09:04