-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very slow export to GLB for files with animations #1913
Comments
Experiencing a very similar issue, where exporting a GLB with 3 simple animations causes the UI to freeze for 4 to 5 minutes during the export process. This is quite disruptive, as even transferring the files to a clean scene for exporting doesn't resolve the issue. |
Hello, Export animation needs to bake animation, and this require to go frame by frame for each if your animation. There are some way to avoid this on user side (for example baking animation, and export glTF without baking), and a few things to investigate on code side to try have better result. On your file => VRM 1.0 is much bigger the 0.0. Give me a few time to write a complete document about it. |
Me too. I've got 20min exports - three computers running these exports now to save time - fans blasting on full - feel like i'm bitcoin mining to get this done. |
Hello, I'm also running into this issue with exports taking a long time. I have four very simple, low-poly humanoid characters in a single blend file that I'm exporting. The characters are under 300 triangles each, and exporting a GLTF file with them takes upwards of four seconds because of the animations (which are also very simple). Their armatures are comprised of 12 bones. You mentioned exporting the GLTF without baking the animations - is that possible for me to specify when exporting my scene? |
Hello, Some refactoring should happen in 2023 semester 2, that will enhance export times.
|
Great to see that this is being worked on - I've encountered the same thing since upgrading from 3.1. I believe a key factor in this issue is having NLA animations in the file - the initial vrm1_0 example files have all animation as NLA. Specifically I tried exporting something with just actions in Blender 4.0 and it took ~6 seconds, converting them to NLA took the export time to around ~130 seconds. I've got more stats on my work PC, will drop them in here tomorrow. |
I'm a bit confused here.... Why does the animation need to be baked upon export frame by frame? Shouldn't the only animation information being exported be the keyframes? |
As a possible clue: What is making the difference for me between a few seconds and a much longer export seems to be the 'include all actions ' on the armatures' option in the export settings. However I deleted all other armatures from the scene.... so I'm wondering if the culprit could be some lingering homeless armatures/tracks? |
@cleverfrog There is lot of cases where you can't "simply" get the keyframes and use them as animation in glTF animation:
Using "include all actions" will try to export all armature actions for you single armature. Even if not assigned to your armature (active action or in NLA). |
I have all my characters and animations in a singular blender file because I want to retarget animations across multiple characters and I wrote some code in my game engine that breaks up all the meshes and armatures into separate files to be compiled later.
I have tried blender 3.6.8 but saw no improvement, 4.0.2 had a bit of an improvement (I think, I didn't measure it), has this enhancement been implemented in some capacity? If so which versions? |
Hello,
Seems there is still no known deadline for these 2 subjects, so maybe I should enable enhancement when it's possible, with fallback on current code when there are drivers on SK / armature |
@julienduroure Are there any plans to make the frame-by-frame baking multi-threaded? So multiple actions can be baked in parallel? Sorry if this question has been answered elsewhere. |
I am not sure Blender api bpy is thread safe. |
Thank you. GLTF export for my game character in very early stages takes close to five minutes each time, so multithreading, or even the enhancement you mentioned a few days ago would make things tremendously easier for me. |
One of the 2 solutions (copy drivers) seems to be ok on Blender side now. |
Would you mind walking me through how to implement this solution into my copy of blender? (if it's not already implemented.) |
This option is now implemented. |
Describe the bug
Blender appears to take extraordinary amount of time when exporting files containing animations, particularly for files imported from VRM 1.0.
To Reproduce
Extract
imported_from_vrm_1_0_6actions.blend
from vrm1_0.zip.Create
export_glb.py
with these lines:This is a reduced test case of what I was doing. My original file had 51 animations and it took 4 hours for the export to complete, during which blender UI was frozen.
Expected behavior
Export should complete within minutes.
.blend file/ .gltf
ZIP with offending model:
vrm1_0.zip
ZIP with a model that's pretty much identical, except it was VRM 0.0 as opposed to 1.0. This one exports to GLB much faster.
vrm0_0.zip
Version
Additional context
What prompted me to file this bug was the 4 hour export time for a VRM 1.0 model, compared to just a few minutes for VRM 0.0. Summary:
Details: results.txt
One relevant difference between VRM 0.0 and 1.0 might be due to the divided vertex buffers, according to this page:
https://vrm.dev/en/vrm1/changed.html#gltf-divided-vertex-buffer
I found an existing issue that might be related, but it's closed: #1078
The text was updated successfully, but these errors were encountered: