Fabian Schempp Posted January 18, 2016 Share Posted January 18, 2016 Hi, I'm very new to babylon.js. But I have a lot of experience with Blender and worked with other 3D Engines like Unity3D. I try to get a bone driven animation from Blender working in babylon.js. It works but it seems that the last keyframe of the animation used as the restpose for the animation, which gives totaly wrong results. Has this happen to anyone else? What can cause this behavior? Best, Fabian Quote Link to comment Share on other sites More sharing options...
gryff Posted January 18, 2016 Share Posted January 18, 2016 Hi Fabian - welcome to the BJS forum. Good to have another experienced Blender user on this forum. Can you give us some more detail about what the "totally wrong results" are? And perhaps a .blend file to look at ? cheers, gryff GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 18, 2016 Share Posted January 18, 2016 Gryff is probably the best to look at your scene. I was wonder the version you are using? If not 4.2, which was put out Friday, maybe test with 4.1. This was changed to support actions. DK, bringing up the rest position. Was wondering if maybe the matrix passed in bone constructor might be cloned off as a _rest member, with getter & returnToRest method? I am not really sure why, but think it might be important for re-targeting. DBawel has not been back lately to weight in. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 18, 2016 Share Posted January 18, 2016 @JCP: Yep good idea. I was thinking about something similar Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 19, 2016 Share Posted January 19, 2016 Possibly another 1 post wonder as not back since post. Either way, when I went to bone.ts I found a _baseMatrix member. It is reference copied in constructor, not cloned. It has a getter, but not a returnTo method. Is this supposed to be for resting? Perhaps, just change the name to be more recognizable. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 19, 2016 Share Posted January 19, 2016 yep! feel free to do these changes, I see no issue on my side Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 20, 2016 Share Posted January 20, 2016 Ok, I have a new version of the exporter ready to go, v 4.2.1. I made a typo fix for Blender Nodes, & expanded the set of inverse kinematic bones to ignore to having '.ik', '.IK', 'ik.', & 'IK.' in the name. Also, the matrix being passed for a bone is not the 'rest' position, but the current pose. The rest position looks sometimes like a crucification pose. That is the one useful for skeleton re-targeting, I think. Added a separate "field" on a .babylon for a bone: {"name":"LeftUpLeg","index":2, "matrix":[-0.1241,0.9922,0.0117,0,0.3019,0.0265,0.953,0,0.9452,0.1218,-0.3028,0,0,4.0173,0,1], "rest":[-0.1146,0.9926,0.0412,0,0.2379,-0.0129,0.9712,0,0.9645,0.1212,-0.2347,0,0,4.0173,0,1], Will PR after I have modified Parse & constructor. _rest will be defined as a constructor arg with a default of null. If null, _rest will be cloned from matrix. Will add a returnToRest() for a bone. Also will add a skeleton version which does all bones, as that is how it is likely to be called. As far as why this topic was started, I am guessing at what he meant, but think this was a reference to what happens when having translation in the animation of the root bone. I am trying to address this in my QI extension. I have the advantage of being beforeRender based, which by definition makes me mesh based. The BJS animation of skeletons is skeleton based, and can have multiple meshes & multiple root bones, so not so easy to handle internally. I just tell them to drop dead if there are multiple root bones. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 20, 2016 Share Posted January 20, 2016 Thank you for this hard work Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.