-
Notifications
You must be signed in to change notification settings - Fork 47
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
Use the default pose instead of frame 0 for base pose #113
Comments
No this feature is not available because in a great many cases Maya fails to restore the binding pose because of constraints, expressions, scripts etc... But you can pick any frame for the default pose, e.g. -100 or so. You pass this with the |
Although the documentation states that this should be possible by disabling all modifiers, this didn't always work for us.. The code for going to the bind pose and using that as the default one could be added again, it might work in most cases. |
Hi, Ziriax, below are just my two cents for what it's worth, please correct me if any information is wrong: In situations like exporting I don't think we need or want to restore the bind pose in the scene, as that might mess up the animation. What can be done though is to fetch the bind pose transform data and use those as the default pose for the skeleton in the exported data. That way we can get accurate skeleton pose data from the output. There's just too many situations where having to manually create bind pose in the animation timeline is inconvenient especially if the animator for one reason or another forgot to do it before hand and Maya fails to restore bind pose. |
Very true. Do you know a reliable way of getting to the bind pose transform data? Please note that Maya2glTF is a world-space-sampler. After 20 years of Maya and 3D hacking, we found this to be the only reliable way to export scenes, because complex rigs always have a lot of expressions, constraints, nodes, etc... So if the bind pose transform data can be extracted, we need it in world space, not local space (most likely it is) |
@ziriax I'm not familiar with the c++ package for Maya, in python we can fetch the joint(bone) bind pose with cmds.getAttr(bone + ".bindPose") to get the bind pose matrix. It's part of the attribute for the joint node. I believe the matrix is in world space, but I could be wrong. Those same data should be fetch able in c++ as well. (Edit: added some extra info) The follow attributes are available in python/mel as well for bind pose: |
I will investigate this attribute, thanks for the info! The other problem is what default weights to pick for the blend shapes. I guess all zero should work, if this is not desired, then one should apply an animation that contains the desired weights The same question must be answered for the transforms of all other non-joint nodes, and cameras what are the defaults? To solve all these problems we just ask the artist to create a single frame that provides the "pose" |
Hm, that's a very good question lol. I was thinking only in terms of character animation, but I'll take a crack at this. Let's see, the objects themselves should have a starting point for the animation, since the animation data are technically just offsets applied onto their starting transform. So if we can somehow strip away animation data or access the default transforms pre-animation, we should be able to get accurate starting transform (and attributes) for those nodes. I'll poke around in Maya and see if I can find anything for this. |
On the other hand, the two concepts (binding pose matrices and initial non-animated scene values) are orthogonal. So it should be possible to use your |
Hi,
Is it possible to use the default pose rather than frame 0?
It causes problems when the artist use frame 0 as an animation frame.
The text was updated successfully, but these errors were encountered: