Additive Animation Request
The kind of additive animation I would like to see is that a animation could be played on top of any existing animation being played but not overriding all bones just because it has a weight of 1 for it, just for the bones that should be affected that animation does. for example lets say we have a IDLE animation being played, main animation, secondary animation a weapon specific pose for lets say for the AR2, while the bottom legs have movement specific animations for different directions.
currently if we do this now with how it works one of these will override all bones even if they don't animate in that specific animation. the kinds of "gesture" animation are only animations that animated specific bones say like a flinch or pose , or some sort of movement that affect these sections, most modern engines have a way to add these additive animations in their own way. and this would help many devs. specifically would help cut down on the amount of animations we would need to use.
now I could add a masking system to solve it but figured I'd put this together so we have an idea how it should work.
perhaps we could introduce some sort of index layer number to determine what order any extra animations are played on top to determine for example IDLE and other movements could be on 0 (main animation), arm pose animations on 1, and flinches and others on layer index 2 as an example
The example video given was the medic doing a flinch animation when he was hurt. while he is in his primary animation , in this case his primary weapon animation standing idle but it is also applied if running or air born since those are layered under the flinch. The 2nd example is my player model doing a layered animation for a battle cry, this works for any position or animation.
hopefully this explains what I would need for future projects.
https://github.com/turanszkij/WickedEngine/assets/6700701/da9c3b30-735e-46dc-a152-94dee8d176dc
https://github.com/turanszkij/WickedEngine/assets/6700701/cbaefefe-d764-4719-bf95-9dc587c6153f
currently if we do this now with how it works one of these will override all bones even if they don't animate in that specific animation
In this case why is the bone contained in the animation? If only the hand animates, then only those hand bones should be in the anim, and then you can blend them on top of the idle/crouch anim. You could also consider using this technique in the current system.
To make animations additively blendable, we would need to store the animation data in relative to parent's T-pose transform, while they are currently stored in relative to their parent world transform. Not sure yet at which point this should be computed and what to do with currently existing animation datas.
As far as I know they shouldn't have any keys, only the parts that are animated, when I tried last time but I will look later. but regardless it would be nice to have in general since many others have this capability.
Is this an approximation of what you need?
https://docs.unrealengine.com/5.3/en-US/using-layered-animations-in-unreal-engine/
Like the montages yes something like that, with the layer blending. It would be rather bad to have to make say a pain flinch animation for every weapon pose/ stance
yeah, totally agree with you. in a pinch, however, you can do the blending in Blender and export as a "binary" to the engine. You would have your flinch anim, then the poses, then Blender does the blending and bakes into an animation, which then your code just reads dynamically depending on the anim tree state.
https://blender.stackexchange.com/questions/137483/how-to-bake-animation-in-blender-2-8
that is how i did ragdolls without ragdolls in the past. baked and prerecorded around 100 different variations in Blender, and in code, had a random integer to dynamically load the anim. death_001, death_002, etc.