[WF-General] Animation Blending

Dean Bouvier demarii.wf at gmail.com
Mon Feb 27 10:03:01 PST 2012


Great, I'll build that branch locally and play around with it and then come
to you with some working examples, and thoughts and we'll hash things out
further.

As for the variable weights... I can see a case for them but I think at
this stage its not worth worrying about them, I'm really most interested in
seeing the interaction between the states, and how well I can leverage the
bonegroups as they are, come up with a sense of the workflow, where we want
things to go and what future issues could arise so we can plan for them now.

/Dean

On Mon, Feb 27, 2012 at 6:56 AM, Erik Ogenvik <erik at ogenvik.org> wrote:

> Hi, I've now added some code for this in the "animation_blend_mask" branch
> of Ember. It's a bit experimental since I think we need some back and forth
> until we've figured out how to do this the best way.
>
> As it is now, you can add animation blend masks by adding a "bonegroups"
> element after the "lights" element in the modeldef file.
> Here's an example:
>       <model>
>       ...
>       <lights />
>           <bonegroups>
>             <bonegroup name="arms">
>                 <animations>
>                     <animation>trns_walk</animation>
>                 </animations>
>                 <bones>
>                     <bone index="1" />
>                     <bone index="2" />
>                     <bone index="3" />
>                     <bone index="4" />
>                 </bones>
>             </bonegroup>
>         </bonegroups>
>       </model>
>
> The "name" of the bonegroup has no bearing; it's just something to aid in
> authoring etc.
> When a blend mask is applied to an animation, it means that all of the
> bones that are not in the blend mask get 0 weight, and those that are get 1
> weight. We could of course add support for specifiying these numbers, but I
> don't see any need of it. Tell me if it's needed.
>
> One great change is that if a model has bonegroups, the animation blend
> mode of the skeleton will be switched from "average" to "cumulative". This
> can have some subtle effects if one's not careful.
>
> /Erik
>
>
> 2012/2/4 Dean Bouvier <demarii.wf at gmail.com>
>
>> Ahh great I'm glad to hear that I was on the right track. That should
>> work out really good actually as I should have a good base of default
>> animations for use to test blending, using that method will definitely add
>> some great versatility to things, I'm looking forward to it.
>>
>>
>> On Thu, Feb 2, 2012 at 2:01 PM, Erik Ogenvik <erik at ogenvik.org> wrote:
>>
>>> Hi, using BlendMasks as described in those post sound like the right way
>>> forward.
>>> I also think your addition to the modeldefinition format is the correct
>>> way for Ember. I'll whip up something, might take a week or two though.
>>>
>>> /Erik
>>>
>>>
>>> 2012/1/28 Dean Bouvier <demarii.wf at gmail.com>
>>>
>>>> I did some initial tests using multiple Animations and even when I
>>>> completely remove All Upper Body bones from one animation track and All leg
>>>> bones from the other they are still somehow being averaged between the two
>>>> tracks possibly against another default animation track or possible their
>>>> initial orientation. This results in animations that are half of what they
>>>> should be together. In the case of the arms they are out to the side like a
>>>> big far man grabbing his belly after a big meal, and the legs only move at
>>>> half their full range of motion.
>>>>
>>>> I did a little reading and I think what is needed is to use Blend
>>>> Masks, and expose the Bone weights individually in some manner.  I'm not
>>>> sure if the current blending system is using this Blend Mask method they
>>>> are referring, perhaps it is the Averaging type rather then the
>>>> Accumulative one. So I figured I would ask...
>>>>
>>>> See Forum post:  http://www.ogre3d.org/forums/viewtopic.php?f=2&t=47798 in
>>>> particular Kojak's post seems to give an example of how to use Blend Masks
>>>> and the Accumulative method.
>>>>
>>>> Do you think we could apply this as an extension of the current XML
>>>> system in use?
>>>>
>>>> Given that the current Exporter I am using doesn't exclude bones even
>>>> when they don't have any keyframes this might solve the issue I have with
>>>> having to hand edit all my skeleton files to remove unused bones from a
>>>> track as well. But even with hand editing I'm unable to get a proper blend
>>>> between Upper and Lower body animations.
>>>>
>>>> In my latest trials what I've been doing is splitting the Upper and
>>>> Lower Body bones at the hips, and also planning to have Hands and the
>>>> Head/Jaw, so basically I'm thinking of four main groups. Right now my focus
>>>> is completely on the Upper and Lower body mixing, as these are the bones
>>>> which are directly tied to MoCap data.
>>>>
>>>> Because of this, perhaps instead of having to apply 0 bone weight to
>>>> each bone individually as Kojak suggested, it might be easier to create a
>>>> set of bone groups, and then define what groups we expect to use from a
>>>> track simply by use of a track naming convention, or by defining a group as
>>>> part of the declaration....
>>>>
>>>> <animationpart name="trans_walk_arms" weight="1.000000" group="arms"/>
>>>>   would be a simple example using both methods.
>>>>
>>>> and the arms group could be earlier defined in the modeldefinition like
>>>> so...
>>>>
>>>>                     <bonegroup name="arms" >
>>>>                         <bones>
>>>>                             <bone index="23" />
>>>>                             <bone index="24" />
>>>>                             <bone index="25" />
>>>>                             <bone index="26" />
>>>>                             ...
>>>>                         </bones>
>>>>                     </bonegroup>
>>>>
>>>> The nice about this method is while I like the idea of breaking
>>>> animation tracks into pieces as it could potentially lead to a much smaller
>>>> overall skeleton file size, being able to use any animation and blend them
>>>> and decide which bones of a track to weight on or off means even full body
>>>> animations can potentially be used in piece with other animations to create
>>>> something totally new.
>>>>
>>>> There is also a blend tree animation system which could be looked at as
>>>> well.
>>>>
>>>> http://www.ogre3d.org/forums/viewtopic.php?f=11&t=45260
>>>>
>>>> What do you think Erik, any ideas on a clean way to approach this?
>>>>
>>>> Thanks,
>>>> Dean
>>>>
>>>> On Wed, Jan 18, 2012 at 4:32 AM, Dean Bouvier <demarii.wf at gmail.com>wrote:
>>>>
>>>>> Great I'm glad to hear this will work, I'll definitely be looking
>>>>> closely at things and defining all the tracks in such a way as to make the
>>>>> best use out of such a system.
>>>>>
>>>>> Thanks for the input.
>>>>> Dean
>>>>>
>>>>> On Tue, Jan 10, 2012 at 2:42 PM, Erik Ogenvik <erik at ogenvik.org>wrote:
>>>>>
>>>>>> Hi, this sounds like an excellent approach.
>>>>>>
>>>>>> The current system is pretty basic, but what you describe isn't
>>>>>> something that would be too hard to implement. It's mainly an issue of
>>>>>> extending the current system. When doing these things I usually start with
>>>>>> defining the data format (in xml), since everything flows from that. I can
>>>>>> see if I can whip up an example.
>>>>>>
>>>>>> /Erik
>>>>>>
>>>>>> 2012/1/9 Dean Bouvier <demarii.wf at gmail.com>
>>>>>>
>>>>>>>  Hi Erik,
>>>>>>>
>>>>>>> I've sent this to this general list so others can be aware of the
>>>>>>> discussion and provide input if they desire, also cc'd Jayr too as I'm not
>>>>>>> sure he watches the list anymore and his input would be welcome.
>>>>>>>
>>>>>>> I have a few questions regarding the animations I'm working on for
>>>>>>> the new standardized humanoid rig and my work schedule is alot less hectic
>>>>>>> these days with only a few small jobs on the go so I plan to make use of it
>>>>>>> by finishing this initial animation work I started on.
>>>>>>>
>>>>>>> Since Ember supports Animation blending, I'm thinking that I should
>>>>>>> consider breaking animation tracks into separate body parts so that these
>>>>>>> can be blended to achieve a great range of motion. Let me give an example
>>>>>>> based around kneeling.
>>>>>>>
>>>>>>> Currently I have two forms of kneeling, one legged kneel like you
>>>>>>> would see from a knight kneeling before his lord, or two legged kneeling
>>>>>>> like that of a martial artist. Now some actions, which might be performed
>>>>>>> from kneeling position, like digging in the ground with a trowel, working
>>>>>>> something their hands, waving, speaking, looking around etc. all use bones
>>>>>>> that are not directly tied to the legs. So it seems to me that if I were to
>>>>>>> create 2 looping kneeling forms which only affect the leg, and then make
>>>>>>> other animations which only deal with hands and arms, and then create a few
>>>>>>> "one-shot" animations of getting down into these two kneeling positions,
>>>>>>> and rise from them, and these should be able to blend together to achieve a
>>>>>>> greater range of desired animations and lower the overall size of the
>>>>>>> standard rig. It would simply require calling multiple tracks in the case
>>>>>>> of selected game actions, like in the case of digging with a trowel a
>>>>>>> kneeling action would be called, then a kneeling loop would play for the
>>>>>>> duration and the digging action would be called and blended with it. Or the
>>>>>>> case of a knight you would have him kneel to one leg, loop that one legged
>>>>>>> kneel and then blend in fist to the chest animation.
>>>>>>>
>>>>>>> This seems like a better approach to animating the characters then
>>>>>>> creating a number of full body animations that perform all of the action
>>>>>>> needed, as it will result in a smaller skeleton in memory, and also allow
>>>>>>> world builders to define more variation in actions.
>>>>>>>
>>>>>>> The one thing I was wondering about is whether it is possible to
>>>>>>> delay some animations a set length of time so another animation can play
>>>>>>> first, or maybe perform a "one-shot" animation before going into loop
>>>>>>> animation(s). For instance in the kneeling example the process of going
>>>>>>> from standing to kneeling does generally use all the body with the person
>>>>>>> supporting their weight on one hand as they get down onto their knees, but
>>>>>>> once there the arms could go to a default or neutral position and be
>>>>>>> blended into and out of. Is it possible to do this sort of thing with the
>>>>>>> current system somehow?
>>>>>>>
>>>>>>> Do you have any ideas, thoughts, or questions regarding this idea?
>>>>>>>
>>>>>>> I'm at the stage now where I have a fairly good range of motion
>>>>>>> capture data for default actions, and a longer list of future data once I
>>>>>>> get the defaults completed as you can see at:
>>>>>>>
>>>>>>>
>>>>>>> https://docs.google.com/spreadsheet/ccc?key=0ArUzXoR0hnBzdGVzaGNjQkdvclg5Yy12UmlCWlRiOWc
>>>>>>>
>>>>>>> Since I'm now at the stage of taking the BVh's into blender, working
>>>>>>> on cleaning, and refining the data and saving them into action strips to
>>>>>>> share with other modellers, now is the time to consider if separating these
>>>>>>> further for blending is the best course of action. It makes sense to me,
>>>>>>> but I wanted your opinion and direction on this matter, especially since
>>>>>>> I'm not sure how or if the "one-shot" into looping animations can be
>>>>>>> achieved, or whether blending multiple animations might have other
>>>>>>> unforseen affects as opposed to just using full body animations for game
>>>>>>> actions.
>>>>>>>
>>>>>>> Thanks
>>>>>>> Dean
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> General mailing list
>>>>>>> General at mail.worldforge.org
>>>>>>> http://mail.worldforge.org/lists/listinfo/general
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> General mailing list
>>>>>> General at mail.worldforge.org
>>>>>> http://mail.worldforge.org/lists/listinfo/general
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> General mailing list
>>>> General at mail.worldforge.org
>>>> http://mail.worldforge.org/lists/listinfo/general
>>>>
>>>>
>>>
>>> _______________________________________________
>>> General mailing list
>>> General at mail.worldforge.org
>>> http://mail.worldforge.org/lists/listinfo/general
>>>
>>>
>>
>> _______________________________________________
>> General mailing list
>> General at mail.worldforge.org
>> http://mail.worldforge.org/lists/listinfo/general
>>
>>
>
> _______________________________________________
> General mailing list
> General at mail.worldforge.org
> http://mail.worldforge.org/lists/listinfo/general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.worldforge.org/pipermail/general/attachments/20120227/fd48327d/attachment-0001.html>


More information about the General mailing list