[SOLVED] Blending animations together

I’m trying to blend two animations together (a run and a walk) so it isn’t so abrupt of a change

(from the wiki to get some context)

channel_walk.setAnim(“Walk”,0.50f); Start the animation named “Walk” on channel channel_walk.

The float value specifies the time how long the animation should overlap with the previous one on this channel. If set to 0f, then no blending will occur and the new animation will be applied instantly.

However my model’s arms “Flap” during the blend, i think this has something to do with the rest position being in the usual “T” shape… I thought about changing the rest position of the model, but it will destroy all my animations and i will have to redo them. Has anyone else run into this problem/has a good solution

SOLVED This appears to be an issue with the a certain build of JME (I think the stable) If you update to the latest the problem will go away

1 Like

my advice is to create a full length walk to run animation and vice-versa but I did try with my own code with your blend value but could see no noticeable “flap” as u say… however I use beta… how do you transition your animations

i do something like:

[java] } else if ((!“sprint”.equals(animationChannel.getAnimationName() ) && !isShooting && isRunning)){

animationChannel.setAnim(“sprint”, 1.75f);





the walk animation is modified to run by holding shift in my game but again I dont think that should matter I also handle this in simple update

also if u use 2.6 u need to be very careful how u construct the animation track I not comfortable with that yet, so I still use 2.49

1 Like

What do you mean by “be careful” how you construct the track?

I blend them much like you did in your example, however it seems like instead of blending from one animation into the other, it looks like it’s using rest position data (on the location of the armatures) so that instead of blending from “walk” into “run” it appears that it goes “walk” to “rest” to “run” causing the “flapping” when ever i change animations

1 Like

empty keyframes,large gaps in the track, mistakenly keying a restpose it could be any number of things you should scrub through the NLA track in blender see if u dont get weirdness there, on the jme side increase the blend time to about 1.5 or so and roll your eyes over it see if u pick up issues, I get no flapping here from jme but as I said I use 2.49 which uses actions to build the skeleton file, I find the NLA track thing in the 2.6 version to be cumbersome.

there is a video tut on the 2.6 export process some where…around here might provide some hints on what might be going wrong



1 Like

Thanks for the help, i appreciate it, i haven’t seen anything weird in blender when i play the whole NLA track… One thing is that i start my animations in blender on frame 1 instead of 0, i think i saw that was how to do it… but i wasn’t 100% sure

1 Like

@Momoko_Fan i see your name on a lot of the Animation library files, any suggestions what maybe going wrong here?

1 Like

There was a similar issue posted earlier (blending from two animations passes through the bind pose in the middle). It was fixed in SVN/nightly build, please update if you can and see if it fixes the issue.

If it does not help, can you post a test case showing the issue? You may include a test model if needed, or use one of the preexisting jme3 models.

1 Like

The update fixed the issue… Fantastic :slight_smile:

1 Like