Thanks Cedric.

Regarding this change I made:
> - If the total weight of the animations is less than 1 then the 
> remainder of the weight will be filled in with the base pose. This 
> also means that stopping all animations has the effect of resetting 
> the animation to the base pose, rather than just leaving it paused.

I see you haven't included the code for this so I presume the change in
behaviour conflicts with one of your requirements. Can we come to some
solution for this?
My problem with things as they stand is:
a) a user of my app adds a single animation. They change the weight of
the animation but they see no effect.
b) a user of my app adds a single animation. They remove the animation,
but the model remains frozen in its last pose.

If you can tell me your requirements I'll come up with a solution that
satisfies them all - maybe a "normalizeMode" parameter to switch between
different behaviours.
Cheers


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Cedric Pinson
Sent: 26 August 2009 10:25
To: OpenSceneGraph Submissions
Subject: Re: [osg-submissions] osgAnimation Blending animations

Hi Michael,

I reviewed the code everything sound good. I am not sure about the slerp
because slerp is not commutative i would prefer to keep the lerp.
there is a link here that explain stuff.
http://number-none.com/product/Understanding%20Slerp,%20Then%20Not%
20Using%20It/

Re reading the code i forget to renormalize the quaternion in normalize
function (i just rescaled it). I adjusted this part to renormalize the
quaternion correctly.



Cheers,
Cedric
-  
+33 659 598 614  Cedric Pinson mailto:[email protected]
http://www.plopbyte.net


On Tue, 2009-08-18 at 09:11 +0100, Michael Platings wrote:
> Hi Cedric/Robert
> at present if you have 2 animations of equal priority on 1 model, each

> with a weight of 0.5, one animation will have an effective weight of
> 2/3 and the other one will have an effective weight of 1/3. Which one 
> gets the higher weight depends on which one happens to appear first in

> the list of playing animations.
> Another problem is that stopping an animation effectively pauses the 
> animation rather than removing its influence as one would expect.
> A separate issue is that quaternions are interpolated without using 
> slerp giving unpredictable interpolated values.
>  
> This submission makes the following changes:
> - Animations with equal priority are now weighted correctly relative 
> to each other.
> - Quaternions are interpolated correctly using slerp
> - (minor) Channels no longer store their weight as the only time it's 
> used is in update() when Animation can pass in the weight directly.
> - If the total weight of the animations is less than 1 then the 
> remainder of the weight will be filled in with the base pose. This 
> also means that stopping all animations has the effect of resetting 
> the animation to the base pose, rather than just leaving it paused.
>  
> Thanks
> -Michael Platings
> 
> ______________________________________________________________________
> This email and any files transmitted with it are confidential and 
> intended solely for the use of the individual or entity to whom they 
> are addressed. If you have received this email in error please notify 
> the system manager.
> 
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscene
> graph.org

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

______________________________________________________________________
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to