-
Notifications
You must be signed in to change notification settings - Fork 324
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
Exporter freezes when exporting with animation #327
Comments
Try shortening the animation range, or disabling "Export within playback range", otherwise it is baking out 50,000 keyframes and that will take a long time. Unfortunately even so there are some issues. I don't know the cause of those, but maybe they are solveable by applying modifiers and joining meshes? |
Oh one note, I'm working of this branch will be merged soon: KhronosGroup/glTF-Blender-Exporter#166. But I'd expect the results on the master branch to be the same here. |
Thanks for the reply. I tried lowering the animation range to 65 frames and it did the trick. It's still a giant .bin file (32.5MB, attached) Even after applying all my modifiers and merging all objects into one mesh, I do get still get black artifacts and odd bugs given the only thing that moves is her head (right foot is twisted). I don't really know, but could the black artifacts be specific to Babylon.js? I don't know what viewer you used for the .gif above, yours also seem to be missing the toon-effect black outlines on the character. Maybe the black artifacts stems from the outlining? I've attached the cleaned up .blend, and resulting .gltf and .bin here. |
Getting closer! 😅 I'm viewing the model in https://gltf-viewer.donmccurdy.com/ (based on three.js), and the toon-black outlines are intact but subtle. The main issue here is that there are many (~20) joint influences per vertex. Most realtime engines support only 4. You can reduce this in Blender with the Limit Total option. The result looks much better:
Even with that fix, there is a remaining issue in one foot (for both engines) and an additional problem in BabylonJS, which I think is related to the outline? I would file an issue with BabylonJS about that. BabylonJS: |
Lookin' great @donmccurdy! That explains the glitchiness! I've read about the max 4 joint-influences thing somewhere in the Babylon.js forums before, but never knew what going past it would look like. Now I do :) How did you find out there was too many joint influences? Was it somewhere in the blender file? I'm relatively new in Blender (this is not my model, it is a user named "Ctool"'s at Sketchfab. https://sketchfab.com/models/fbfbac4c809741838fb6882fda3da175 ), all I did was simplify the model to use it to learn rigging and test out toon-effects in WebGL. Did the babylon.js version animate? I don't know if the issue in the last pic is due to the outlining effect (it's made with extra geometry) since Babylon.js renders everything fine in my very first screenshot at the top of this thread, without animations exported, but I can open an issue if I can get a copy of the .gltf/.glb you used for the last screen. |
I don't know how to find the number of joint influences in Blender (surely there's a way!) but in the Each of those The BabylonJS model does animate yes, although it has that same foot deformation issue as in three.js. Here's the file — |
Just guessing here, but BabylonJS might have a bug handling uint32 indices. That toon outline uses one, while most other parts of the model do not. |
I investigated this a bit with BabylonJS. I'm not sure where the culprit is, but there are lots of vertices where all the weights are zero. This isn't valid. I'm not sure why three renders this correctly. From the GwenSimp - w_limited_weights.gltf: {
"attributes" : {
"COLOR_0" : 29,
"JOINTS_0" : 30,
"NORMAL" : 26,
"POSITION" : 25,
"TANGENT" : 27,
"TEXCOORD_0" : 28,
"WEIGHTS_0" : 31
},
"indices" : 24,
"material" : 1
}, |
The weights are also not normalized. |
Can this be closed? This model now exports and displays with no obvious visual problem in Three/Babylon. The validator reports that there are still zero weights, but that is tracked by #308. |
I have a model I downloaded and re-rigged myself and have been testing with Babylon.js. It is a mostly vertex-painted model with the solidify modifier to add the cartoon outline effect.
It exports and loads fine, armature and all, in Babylon.js. without animations.
So I added a simple Head Turn animation for starters. Nothing too fancy.
I tried the latest version of Kupoman's gltf exporter as of today and it exports without error but the animations are incorrect - the head distorts instead of turns, and the character doesn't turn her head a full 90 degrees each direction.
In the older version of this exporter (latest from October 2 2017), it exports without error and seems to animate properly, but many other bones seem to be displaced and there are black artifacts everywhere.
In the latest version of this exporter, however, it exports fine without animations but the moment I check [export skinning] it will never finish exporting. Blender stops responding and I'm forced to close it.
Oddly enough, the older version of the exporter manages a smaller gltf (5MB) than the newest one (10MB). Is this supposed to happen?
Here is the file for reference:
GwenSimp - w_head_turn.zip
The text was updated successfully, but these errors were encountered: