Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature: Adding delta animations onto a base animation #68

Open
TobyLobster opened this issue Sep 13, 2016 · 3 comments
Open

New feature: Adding delta animations onto a base animation #68

TobyLobster opened this issue Sep 13, 2016 · 3 comments

Comments

@TobyLobster
Copy link

As a new feature, it would be really useful to be able to script adding animations together, e.g. A "crouch" animation plays, lowering the body and head to new positions, a separate "head movement idle" animation plays on top (the extra head idle movement adding on top of the head's crouching position), and, say, her eyes blink fast as a third animation on top.

Then, some moments later, the crouch animation transitions to a walk animation, then to a run, but the other animations continue to play on top.

Note this is not the same as blending. In this scenario we start with 100% of the crouch animation. We then take the difference between the transform of the current frame of the head movement idle animation as compared to the first frame of the same animation, and add this difference on top of the crouch.

For the blinking animation, the eyelids are animated, and we could choose to configure so that the local transform of these eyelid bones overrides any other of our animation's local transforms of these eyelid bones.

I'm not entirely sure here, but it sounds to me like this degree of control is more flexible than SubEntities. It's controlled by script in the runtime, doesn't require special authoring, allows the same bones to be affected by more than one animation, and generally gives customisable control as to how and when animations are added together.

Such a system could then be extended to (a) allow more than two animations to be blended together, (b) allow customisation of how transforms are calculated. e.g. If you always want one bone's transform to be 50% between that of two other bones.

@loodakrawa
Copy link
Owner

loodakrawa commented Sep 13, 2016

Good idea. If I'm not mistaken, this is just like the current blending except this would calculate transforms by adding data from multiple animations (with different weights) instead of interpolating them. Did I get that right?

@loodakrawa
Copy link
Owner

Just realised (+ you mentioned it) that the superimposed animation(s) should add relative transforms to the base animation, not add everything together.

What about animations with different sprites? Should superimposed animation sprites always take precedence over the base animation? It feels like they should - but I'm trying to analyse this from every angle.

@TobyLobster
Copy link
Author

Yes, that sounds reasonable - a new sprite on the superimposed animation should probably override the base animation's sprite, since it's effectively being applied after the effects of the base animation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants