ozRocker Posted October 23, 2018 Share Posted October 23, 2018 I've noticed animations run on different speeds depending on the mesh they're applied to. Is there a way to make animation always end at the same time? Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 23, 2018 Share Posted October 23, 2018 Does grouping them help? Quote Link to comment Share on other sites More sharing options...
Guest Posted October 23, 2018 Share Posted October 23, 2018 Can you repro on the playground? This should not be the case (unless there is something else ;)) Quote Link to comment Share on other sites More sharing options...
ozRocker Posted October 29, 2018 Author Share Posted October 29, 2018 On 10/23/2018 at 6:57 PM, JohnK said: Does grouping them help? Not sure if I'm doing something wrong, but I can't get this working with skeleton animatables. It only accepts animation objects. Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 29, 2018 Share Posted October 29, 2018 I just knew grouping existed, sorry I do not know about its limitations. Seems like DK's suggestion is the way to go forward. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted October 29, 2018 Author Share Posted October 29, 2018 Here we go: https://playground.babylonjs.com/#BCU1XR#190 2 guys with the same animation applied. One guy breakdances faster than the other guy. How can I make them dance the same speed? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 29, 2018 Share Posted October 29, 2018 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. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted October 29, 2018 Author Share Posted October 29, 2018 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. 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 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted October 29, 2018 Author Share Posted October 29, 2018 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 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 30, 2018 Share Posted October 30, 2018 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 ozRocker 1 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted October 31, 2018 Author Share Posted October 31, 2018 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 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.