Jump to content

Inconsistent animation speed


ozRocker
 Share

Recommended Posts

7 hours ago, JCPalmer said:

copyAnimationRange() basically just copies from an Animation to another.  It does NOT change the framePerSecond member of those Animation objects.  They are probably not the same.  If these skeletons were exported from Blender, then make sure that they have this set the same.

FPS.JPG.b6bd0528c21b254292d13a2a53e9a665.JPG

Did you mean the FPS of the animation files or the FPS of the avatar files?  In this example I'm using just the one animation file and copying that to the avatar skeletons so those animations should have the same FPS

Link to comment
Share on other sites

ok, it looks like there is something different between the avatars that's causing the problem.

I made a new playground using 2 different avatars and they are synced perfectly. https://playground.babylonjs.com/#BCU1XR#191

I don't have access to the original files so I'm trying to find a way to fix up the sync with Babylon.js code

Edit:

The animations are for skeletons with 62 bones (fingers and toes in there).  Some of the avatars have a different number of bones because they might not have the same number of fingers/toes.  If I use copyAnimationRange like that it will complain about different number of bones, so I wrote a function RemoveExtraBones that will remove the bones in the animator's skeleton that don't exist in the avatar's skeleton.

In the 1st playground the bearded guy has 62 bones but the 2nd guy has 38 bones and the result is out-of-sync

In the 2nd playground they both have 38 bones and the result is perfectly synced.

Could number of bones have something to do with the speed?

 

Edit edit:

https://playground.babylonjs.com/#BCU1XR#192 Number of bones doesn't seem to make a difference.  I made sure they both had 38 bones but it didn't help

Link to comment
Share on other sites

First, to be clear, the animations are on each of the bones not the skeleton.  I would check the .log files to see if either the skeletons a have an action assigned / exported.  Would look like this for RUN:

Quote

    processing begun of skeleton:  base_male1, id:  0
        processing begun of bone:  hips, index:  0
        processing begun of bone:  thigh.L, index:  1
        ...
        processing action RUN:  in[1 - 45], out[0 - 45]

 

If this export had an AnimationRange copied to it, the FPS in the bones would from the avatar blend.  I manually changed the the FPS of the first bone of each.  Looks like that synced the root bone.  Either delete the strays actions or make sure the avatar .blends match on FPS

Link to comment
Share on other sites

12 hours ago, JCPalmer said:

First, to be clear, the animations are on each of the bones not the skeleton.  I would check the .log files to see if either the skeletons a have an action assigned / exported.  Would look like this for RUN:

If this export had an AnimationRange copied to it, the FPS in the bones would from the avatar blend.  I manually changed the the FPS of the first bone of each.  Looks like that synced the root bone.  Either delete the strays actions or make sure the avatar .blends match on FPS

Thank you @JCPalmer  I got it working now

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...