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.
Improvement to additive blending using deltas?
-
BSer
- Halfling
- Posts: 95
- Joined: Fri Dec 23, 2005 8:46 pm
- Location: Niskayuna, NY
- Contact:
- Kojack
- OGRE Moderator

- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 538
Re: Improvement to additive blending using deltas?
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).
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).
- madmarx
- OGRE Expert User

- Posts: 1671
- Joined: Mon Jan 21, 2008 10:26 pm
- x 51
Re: Improvement to additive blending using deltas?
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).
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).
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
- Kojack
- OGRE Moderator

- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 538
Re: Improvement to additive blending using deltas?
Well, he did say bone twice, so I'm guessing there's bones involved.Yes, and this works only if the OP is using bones.
- madmarx
- OGRE Expert User

- Posts: 1671
- Joined: Mon Jan 21, 2008 10:26 pm
- x 51
Re: Improvement to additive blending using deltas?
Damn me, I missed these lines!

Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0