hen Posted October 6, 2016 Share Posted October 6, 2016 Hi, this is a question to the Babylon Core Devs... Would it might be possible to change how the skeletons work in Babylon? I am asking because the current implementation with the skeleton holding the keyframes has several limitations. One problem is that the bones cannot be transformed/scaled at runtime. Another major one is that it makes dynamic player interactions with animation related objects impossible. Here some examples about typical game features that doesnt work right now: - Character body customization by bone scaling (really common in many games and without alternative) - Interaction with objects that require specific animation takes, such as furniture like chairs where a model specific animation is required, cars or guns where each asset requires unique fitting animation - Dynamic Character emotes such dance animations selected from a pool of takes - Sequencing between multiple animations - Event based animation like gestures Of course some of those are possible right now when the scope is small enough that animations can be preloaded with the initial character. But we do have to implement a really huge amount of animations, wich seems impossible with the current skeleton. What i would recomment is to remove the keyframes from the bones and add a animation take property where multiple takes can be pushed to array. As well as an animation mixer (similar to three.js) wich allows to trigger a take by index and to interpolate between them (sequencing). I know that some other guys here has been running in to similar problems. No idea how big this change really is, but i am ready to help working on it fulltime because it has high priority for us. Regards Hen Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 7, 2016 Share Posted October 7, 2016 Is your data in Blender? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 7, 2016 Share Posted October 7, 2016 I'm open to every improvement we can make. But I don't see why having animations hold elsewhere will fix your issue The way we support multiple animation now is through AnimationRange; https://github.com/BabylonJS/Babylon.js/blob/master/src/Bones/babylon.skeleton.ts#L76 you can have multiple animation range per skeleton and switch between them using beginAnimation(name): https://github.com/BabylonJS/Babylon.js/blob/master/src/Bones/babylon.skeleton.ts#L177 So it is (from my understanding) the same as what you call 'take'. We also support animation blending: http://doc.babylonjs.com/tutorials/Animations#animation-blending Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 7, 2016 Share Posted October 7, 2016 On your question(in another thread) regarding loading animations. You can load animations using ImportMesh and then add them at the end of your current animation list. so let's say you have a first animation from key 0 to 100. You can then add the following one from 101 to 200 and so on. I could possibly(if this works) add a mergeAnimations function for you on skeleton. Dad72 1 Quote Link to comment Share on other sites More sharing options...
hen Posted October 7, 2016 Author Share Posted October 7, 2016 1 minute ago, Deltakosh said: On your question(in another thread) regarding loading animations. You can load animations using ImportMesh and then add them at the end of your current animation list. so let's say you have a first animation from key 0 to 100. You can then add the following one from 101 to 200 and so on. I could possibly(if this works) add a mergeAnimations function for you on skeleton. yes thats exactly what i was looking for! Actually i would probably not use the importmesh function but create some alternative binary format wich holds only the animation related properties. Reason is to keep files small as possible, because we have to load them at runtime. By the way, i saw an info about an collada loader in a older babylon release note. Does that one still exists? Because i cant find it on the repo. I dont plan to load the collada format, but it would help alot to write some conversion tools. @JCPalmer Our assets are all fbx, they could be imported to blender, but we usually dont work with it. JCPalmer Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 10, 2016 Share Posted October 10, 2016 Ok sounds good: If you can provide me simple sample of a mesh with two animations I can create the mergeAnimations function Collada can be loaded using the FBX exporter Quote Link to comment Share on other sites More sharing options...
hen Posted October 11, 2016 Author Share Posted October 11, 2016 23 hours ago, Deltakosh said: Ok sounds good: If you can provide me simple sample of a mesh with two animations I can create the mergeAnimations function Collada can be loaded using the FBX exporter Thanks. If you dont mind i would create a merge and remove feature and push it to the repo. Is it actually possible to compile the fbx exporter for linux/ubuntu? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 11, 2016 Share Posted October 11, 2016 I don't think so as it uses the FBX windows SDK (I dunno if there is a linux version) Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 11, 2016 Share Posted October 11, 2016 http://usa.autodesk.com/adsk/servlet/pc/item?id=24735038&siteID=123112 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 11, 2016 Share Posted October 11, 2016 On 07/10/2016 at 4:44 PM, Deltakosh said: I could possibly(if this works) add a mergeAnimations function for you on skeleton. This could be very useful 'mergeAnimations'. Good idea. Quote Link to comment Share on other sites More sharing options...
hen Posted October 11, 2016 Author Share Posted October 11, 2016 16 minutes ago, JCPalmer said: http://usa.autodesk.com/adsk/servlet/pc/item?id=24735038&siteID=123112 Ha.. i was just about to post same Wondering how this could be turned in to a linux converter. Actually babylon has no conversion tools to run server side, this would be a big win. Quote Link to comment Share on other sites More sharing options...
getzel Posted October 13, 2016 Share Posted October 13, 2016 Yes it would be cool to access and change rotation (and maybe position) of bones with simple functions (like meshes). hen 1 Quote Link to comment Share on other sites More sharing options...
hen Posted October 13, 2016 Author Share Posted October 13, 2016 2 hours ago, getzel said: Yes it would be cool to access and change rotation (and maybe position) of bones with simple functions (like meshes). Actually you can change the rotation. Just not the scale/size. 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.