Game Development Community

Y and Z motion on an animation

by Andy Schatz · in Torque 3D Professional · 09/21/2009 (3:12 pm) · 8 replies

This issue has been brought up before with previous iterations of the engine and never answered: how do I deal with an animation that has movement on the root node so that that motion is NOT extracted. It appears that the engine extracts all Y and Z motion from the animation (but NOT the X motion). Does anyone know where in the code this happens so that I can disable it? Is there a workaround without having to bake the motion down onto the rest of the skeleton? Thanks!

#1
09/21/2009 (7:29 pm)
Quote:This issue has been brought up before with previous iterations of the engine and never answered

This is the first I've heard of it. Do you have links to previous threads?

There's certainly nothing in the DTS or Collada loaders that discards Y and Z translation on the root node.
#2
09/21/2009 (9:37 pm)
www.garagegames.com/community/forums/viewthread/70436

This one may be a Max issue:
www.garagegames.com/community/forums/viewthread/22583

I can send you the dae via email if you want to take a look...
#3
09/21/2009 (9:40 pm)
BTW, I'll have to check wtih my artist in the morning but I suspect it has to do with the bounding box parentage...
#4
09/21/2009 (11:24 pm)
Quote:I can send you the dae via email if you want to take a look...

That would be helpful, thanks.

Quote:I suspect it has to do with the bounding box parentage...

That's what I was thinking too. Animated DTS (exported) and Collada (imported) node transforms are relative to the bounds node, so if the bounds node moves along with the root node, then the root node will be considered stationary.
#5
09/22/2009 (1:51 pm)
Sent it to you just now. It doesn't appear that there is any animation on the bounding box. It DOES appear that there should be movement on the Y and Z axis of the root node.
#6
09/22/2009 (10:40 pm)
Found the problem. Nothing to do with bounds node; just a bug in the collada importer. Fix should be in the next build of T3D, but is trivial to apply to your own codebase:

Just remove the 'break' statement from the 2 AnimatedElement::getValue
functions (lines 679 and 713) in colladaUtils.h.
#7
09/23/2009 (12:10 pm)
@Chris

Would that be AnimatedElement::getValue and AnimatedElementList::getValue ?
#8
09/23/2009 (8:39 pm)
Yes.