realXtend / tundra

realXtend Tundra SDK, a 3D virtual world application platform.
www.realxtend.org
Apache License 2.0
84 stars 70 forks source link

3DSMAX => Tundra integration Issue (Skeletal Animation correctness prob) #391

Open mcapuano opened 12 years ago

mcapuano commented 12 years ago

We are trying to accomplish the following: • Model an avatar in 3DSMAX • Place the avatar in a neutral stance, arms at side for Frame0 • Apply various animations to the avatar (e.g.) o Animation1 - LArmWaistHigh 0 – 5 o Animation2 - LHandGripA 10 - 15 o Animation3 - LArmHeadHigh 20 - 25 o Animation4 - LHandGripB 30 – 35 • Export the avatar and animations with OgreMax • Import the avatar and animations into Tundra • Combine and execute the animations via a single avatar

Animation process: • In MAX, the avatar starts at relaxed neutral stance, arms at side = Frame0 • I copy Frame0 and re-use it as the starting point for all animations: o Frame0 copied to Frame10, Frame 20, Frame30 • I DO NOT apply ANY animation to the R arm. It remains at avatars side from Frame0 thru Frame35

Now, after importing to Tundra, the idea is to "combine" the animations. For example, Animation1 (move the L arm to waist ht) then ADD Animation2 (Change the grip of the L hand to GripA) ... while the L arm remains at waist ht. This works … sort of …

When I attempt to combine the animations in Tundra (not thru script but by using the AnimationController dialog box to invoke the function(s)), the L arm does combine the animations ... HOWEVER ... the R arm moves also (e.g. across the avatar's chest) and depending on the order (Animation1 + Animation2 ... vs ... Animation2 + Animation1), the L arm will also move to an unexpected location (e.g. across the chest instead of straight out) when the animations are applied in the opposite order.

Q’s • Why does the R arm move when no animation is applied to it? • Why does the order in which the animations is applied to the L arm make a difference?

Any help is appreciated

thanks,

Michael

antont commented 12 years ago

One possibility is that the animation data is incorrect -- for example that the bones of R arm have weights also for the L arm, accidentally authored in Max or due to some exporter bug or Max vs. Ogre skel incompatibility.

Ogre has a set of restrictions for how skeletal animations must be authored, we at least have often needed to ensure that some rig works by trial and error. Most safe is to have a continuous chain with one root from where everything branches. Would be nice to have a clear definite documentation of this but I'm not aware of any.

In case the data is correct, there are some functions in EC_AnimationController which may be relevant: SetAnimationWeight at least can be use to define how much a certain animation affects .. but that's only when there'd be a R arm moving anim playing actively: http://www.realxtend.org/doxygen/class_e_c___animation_controller.html#a491c92e830d8ebb12bbd549180eda945

It would help debugging if you could provide the data -- with the export I could test what happens with playback too (and the XML files have the weight assignments etc. in human readable format so they might be very helpful actually). I don't have Max, but at Ludocraft they do so might have a chance of looking at the anims in Max. A screenshot of the skel in Max could be helpful too to see if the skel looks like something that should work in Ogre.

mcapuano commented 12 years ago

Toni,

Thanks for the response. We will definitely discuss your great notes

Michael

-----Original Message----- From: Toni Alatalo [mailto:reply@reply.github.com] Sent: Wednesday, March 07, 2012 7:48 PM To: Capuano, Michael R Subject: Re: [naali] 3DSMAX => Tundra integration Issue (#391)

One possibility is that the animation data is incorrect -- for example that the bones of R arm have weights also for the L arm, accidentally authored in Max or due to some exporter bug or Max vs. Ogre skel incompatibility.

Ogre has a set of restrictions for how skeletal animations must be authored, we at least have often needed to ensure that some rig works by trial and error. Most safe is to have a continuous chain with one root from where everything branches. Would be nice to have a clear definite documentation of this but I'm not aware of any.

In case the data is correct, there are some functions in EC_AnimationController which may be relevant: SetAnimationWeight at least can be use to define how much a certain animation affects .. but that's only when there'd be a R arm moving anim playing actively: http://www.realxtend.org/doxygen/class_e_c___animation_controller.html#a491c92e830d8ebb12bbd549180eda945

It would help debugging if you could provide the data -- with the export I could test what happens with playback too (and the XML files have the weight assignments etc. in human readable format so they might be very helpful actually). I don't have Max, but at Ludocraft they do so might have a chance of looking at the anims in Max. A screenshot of the skel in Max could be helpful too to see if the skel looks like something that should work in Ogre.


Reply to this email directly or view it on GitHub: https://github.com/realXtend/naali/issues/391#issuecomment-4384327