question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use animation mixing

See original GitHub issue

Hello, on DragonBones features page, it mentions animation mixing using layers (normal weighting) and groups (additive weighting).

Can someone shed a light on how to use these features ? I do know there are parameters for them in DragonBone.Animation.FadeIn method, but I’m not exactly sure how to use them. Also, I see no option for animation layers or groups in DragonBonesPro Editor.

I’d really appreciate any help, since I’m getting pretty desperate because of lack of documentations. Thanks in advance !

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
toadietechnikacommented, Jan 10, 2017

Here you go (The one in Bold-Italic is the parameter, so it’s the fourth one. The default layer is 0, so if you play an animation in another layer then it will mix with its other animation layer/s.

DragonBone.Animation.FadeIn( string animationName, float fadeInTime = -1.0f, int playTimes = -1, int layer = 0, string group = null, AnimationFadeOutMode fadeOutMode = AnimationFadeOutMode.SameLayerAndGroup, bool additiveBlending = false, bool displayControl = true, bool pauseFadeOut = true, bool pauseFadeIn = true )

Sample: Armature.Animation.FadeIn("Shoot", 0.05f, -1, 0); // a shooting animation that plays in loop (-1) Armature.Animation.FadeIn("Kick", 0.025f, 0, 1); // while shooting, he also kicks in one round. Not sure if that 0 plays once though, but I hope you get my point :D

1reaction
toadietechnikacommented, Jan 11, 2017

Yeah, it’s in the codes of Dragon Bones. I’ve had difficulties too at first because of lacking documentations, fortunately we can also view and analyze their codes and see what they do 😄

In response to your question: I haven’t tried that, but my guess for now (… and someone would also enlighten me on this if I gave some wrong information haha but anyway - ) is you can’t overlap animations that way (of just getting bones from this animation, overriding the other bones of that animation). So I think blending is the only way to achieve that.

That would also depend on the keyframes affecting on the animations. When blending, the bones without keyframes of this animation will affect from the blending animation, otherwise it would mess up (sort of-).

To be honest, I haven’t heard of a “Mecanim’s Mask System” on Dragonbones so I gotta see what else is there. Glad you’re doing well on it, keep it up!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to blend animations from Mixamo in Blender [2.9] NLA ...
Mixamo: https://www.mixamo.com/#/ Timeline: 0:00 Introduction 0:38 Exploring Mixamo 1:25 Importing Mixamo Animations 2:40 Blending Animation ...
Read more >
Animation Blending Basics
The basic idea is that for two identical skeletons with different animation clips, for each joint rotation, you compute in-between values.
Read more >
Animation Mixing
Rive allows you to mix animations from the same artboard at runtime, creating more interesting ways for you to add interactivity to your...
Read more >
Animation blending, how does it work when it comes to ...
The way many current animation systems work with this is "weighted blending" where each animation is weighted 0->1 and the heavy animations get ......
Read more >
Anim State Graph Blending
This is achieved by creating transitions. Right click the Idle animation and select Add transition from the context menu, then select the Punch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found