Jump to content

Separate Skeleton and Animations


hen
 Share

Recommended Posts

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
 

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?
 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...