-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Blender export bones rotation pivot #10273
Comments
skeletal sounds cool ... |
/ping @arturitu |
About the yz are flipped perhaps you need to reset all of these data before export your model > And about pivot point, I use this settings to export timeline based animation (where Morph animation isn't selected, is selected 'Keyframe animation' and on 'Skeletal animation' is selected 'Pose' not 'Rest'> Anyway, this is a link with a tutorial step by step to export a bone animated model with all the source code and blender files if you want to compare >http://unboring.net/workflows/animation.html I hope with this you don't have any problem. |
Interesting! Looks like both animations and flipped values work well when just exporting the model and not the scene. That's good enough for me. I would still consider it a bug that it gets wrong when exporting scene/hierarchy but for my purposes I can get it to work like this. Thanks! |
The JSON Blender exporter has been removed with Also see: https://threejs.org/docs/#manual/introduction/Loading-3D-models |
Description of the problem
In Blender I've created a mesh, attached armature and a simple rotation animation on one of the bones, called "head" (connected to another, named "stomach").
When exporting to Three.js I get two issues. The first is that for position yz are flipped, similar for rotation. This was easy to solve by hacking the exported animationKeys to flip them to work with threejs. How I did that was inside the
parseAnimation
function, under the comment// ...assume skeletal animation
I added this:I suppose that is mostly a hack to get it to work for me, it should really be in the exporter python script, I'll look into that later. That was just the context, the second issue is what this post is about.
When running the animation the pivot point for the "head" bone's rotation looks to be at 0,0,0 while in Blender it's relative to it's position (parent?). The result is the following:
I tried to "hack" in a way to set pivot point myself, just to see if I could get it to work, but I couldn't find how.
The export settings I use are the following (although I've tried pretty much every variation of settings I could think of):
This is an issue but I'm not 100% sure how it's supposed to work (regarding pivot points for bones).
Three.js version
0.82.1 (latest from npm at time of writing)
The text was updated successfully, but these errors were encountered: