Hi Michael,

I understand your point of view, i have to think about it. Anyway i am
agree this feature should be implemented. I will try to write code in
BasicAnimationManager to see how it changes the logic, then I will have
more element to select one solution or the other.
I will continue to update osgAnimation submissions and i will go back to
this point after.

Thank you for the explanation.

Cheers,
Cedric

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


On Wed, 2009-08-26 at 18:28 +0100, Michael Platings wrote:
> I see where you're coming from with reducing logic, I totally agree the
> code should be as clean, lean & fast as possible. However, by
> simplifying Target, significantly more code must be added elsewhere to
> work around this - the base animation must be created somehow and must
> be added to the animation manager as a special case.
> BasicAnimationManager::stopAll() can no longer be used and instead new
> logic must be added to check whether each animation is a base animation
> to decide whether it can be stopped.
> Whether it's better to have the extra _baseValue member or not depends
> on how probable you think it is that users of the library are going to
> want to stop animations. What do you think? 
> 
> -----Original Message-----
> From: Cedric Pinson [mailto:[email protected]] 
> Sent: 26 August 2009 17:14
> To: Michael Platings
> Cc: OpenSceneGraph Submissions
> Subject: RE: [osg-submissions] osgAnimation Blending animations
> 
> Hi Michael,
> 
> I thought you introduced this base only because of the unknown behavior
> when normalizing with only one animation and a weight that would be
> different of 1.0. I removed it too because i would prefer to avoid logic
> in Target as much as possible, and the behavior you described can be
> done playing a default base animation of one frame that loop with a
> lowest priority. Here how i setup it for my game:
> basicAnimationManager->playAnimationManager(baseAnimation, -1); 
> basicAnimationManager->playAnimationManager(actionTakeit, 0);
> 
> Maybe i miss something does it sounds correct to you ?
> 
> Cheers,
> Cedric
> 
> -  
> +33 659 598 614  Cedric Pinson mailto:[email protected]
> http://www.plopbyte.net
> 
> 
> On Wed, 2009-08-26 at 16:08 +0100, Michael Platings wrote:
> > 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-opensce
> > > ne
> > > 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 
> > ______________________________________________________________________
> > 
> 
> ______________________________________________________________________
> 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 
> ______________________________________________________________________
> 

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to