Improvement to additive blending using deltas?

What it says on the tin: a place to discuss proposed new features.
Post Reply
BSer
Halfling
Posts: 93
Joined: Fri Dec 23, 2005 8:46 pm
Location: Niskayuna, NY
Contact:

Improvement to additive blending using deltas?

Post by BSer » Sun Jan 31, 2010 6:09 pm

In my use of additive blending in Ogre, I've been unable to make it work satisfactorily. It would add two animations together in an undesirable way that would impact every bone. For example, I wanted to add an animation where the eyes blink, but with Ogre, his body contorted in the extreme, because this eye blinking animation had the character in an idle pose. The transformations for that pose were all additive, contorting the body in the extreme.

Some might suggest that I redo the animation and put it in the binding pose, but in my situation I cannot. I would like a way to run an animation as additive, but in a manner that uses the deltas of that animation, not adding the full transformations and causing extreme contortions of all bones.

Other engines, such as Unity, seem to do this by default when doing additive blending. It proves far more useful.

Maybe Ogre already supports what I'm looking to do. If so, then sorry about that.
0 x

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7147
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 16

Re: Improvement to additive blending using deltas?

Post by Kojack » Mon Feb 01, 2010 11:29 pm

One way to get around it is to use blend masks.
Animation States have an optional blend mask which is a floating point weight per bone. You could create a blend mask for your blink animation which sets all the bones to zero (so they have no effect in the animation) except for the eyes which are set to one.
The methods in AnimationState to take a look at are: createBlendMask, setBlendMaskEntry, destroyBlendMask (and some more with similar names, but those are the main ones).
0 x

User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1668
Joined: Mon Jan 21, 2008 10:26 pm

Re: Improvement to additive blending using deltas?

Post by madmarx » Tue Feb 02, 2010 12:04 am

Yes, and this works only if the OP is using bones.

In other case, what is extremely common is Pose animation (which I use fairly often with Ogre3d), and which stores the 'delta' of a mesh against an idle pose. It's the same as 'blendshape' in maya and blender, or 'morpher' in 3DSMAX. Please note that you will need to export your animation as PoseAnimation and **not** as MorphAnimation (otherwise it will not work correctly).
0 x
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7147
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 16

Re: Improvement to additive blending using deltas?

Post by Kojack » Tue Feb 02, 2010 4:52 am

Yes, and this works only if the OP is using bones.
Well, he did say bone twice, so I'm guessing there's bones involved.
0 x

User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1668
Joined: Mon Jan 21, 2008 10:26 pm

Re: Improvement to additive blending using deltas?

Post by madmarx » Tue Feb 02, 2010 1:15 pm

Damn me, I missed these lines!
:mrgreen:
0 x
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0

Post Reply