armory icon indicating copy to clipboard operation
armory copied to clipboard

Can't play more than one animation in the same armature

Open knowledgenude opened this issue 3 years ago • 2 comments

I guess we should be able to play more than one animation in the same armature if those animations doesn't affects the same bones. Apparently the unused bones transforms reset. This can be a duplicate of layered animations issue.

Test file: anim-test.zip

knowledgenude avatar May 20 '21 10:05 knowledgenude

Hi, I just started working on this issue. Currently Iron supports having one main animation and one optional blend animation. These animations control all bones in that particular armature, even if they are not used by the animation.

My idea is to use Blender's bone layers as a mask to control which layer/s will be affected by that particular action at runtime. image

What do you think of this approach?

QuantumCoderQC avatar May 20 '21 11:05 QuantumCoderQC

Hello, @QuantumCoderQC ! That is a good idea of course! I just fear the way Armory is handling animations currently. Looks like Armory is touching the unanimated bones. Another issue in this aspect is for example if you play an animation that have 15 frames and stop it in frame 10, then when you play another animation the blending doesn't follow the last pose (instead it blends for the animation beginning, shouldn't just blend with last pose without restart the previous animation?). For me this doesn't looks hard to solve, but requires a good understanding about the BoneAnimation class and bones transforms (which i don't have atm).

I supose if animation 1 is paused, it shouldn't be played again if a blending is happening. The blending should be from the paused current pose to the running animation. What do you think about this? I guess in bge/upbge is like that and is the only reference i have :/

Anyway I wish you good luck in the amazing work you are doing now on that!

knowledgenude avatar May 20 '21 13:05 knowledgenude