Bug: Animated Collada Files Exported from Modo are choppy.
by Greg G · in Collada Test · 05/27/2010 (4:38 pm) · 5 replies
I'm not sure who is in charge of Collada at Garage Games, but I would be willing to send them a test file. Any time I export a Collada file using Modo's Collada the animation lurches forward or jumps every time it approaches a key frame. This happens on something as simple as a rotating box.
If I import the same Collada file to 3dsmax or Maya and re-export using open Collada then it works fine.
If you think this is an issue with Modo's exporter I would be happy to submit a bug but first I need to figure out if this is Torque specific or not.
If I import the same Collada file to 3dsmax or Maya and re-export using open Collada then it works fine.
If you think this is an issue with Modo's exporter I would be happy to submit a bug but first I need to figure out if this is Torque specific or not.
#2
Also are you exporting at 30fps in Modo? If you do not then when Torque imports the model it will attempt to interpolate between frames and can cause issues if there is a huge difference, Open Collada might be changing this for you without you knowing.
Just a couple of suggestions to try and see what is happening.
06/01/2010 (12:38 pm)
Have you compared the two collada files to see what if anything has changed in the final files from the Modo's Collada and the Open Collada export? Might be a start.Also are you exporting at 30fps in Modo? If you do not then when Torque imports the model it will attempt to interpolate between frames and can cause issues if there is a huge difference, Open Collada might be changing this for you without you knowing.
Just a couple of suggestions to try and see what is happening.
#3
Here is what he told me:
Hi Greg,
Not sure how familiar you are with the collada spec, but I will do my
best to explain what I think is happening. Animations are stored in
collada as a set of keyframes, with associated information about how to
interpolate between them (ie. tangents for the input (time) and output
curves along with an interpolation type like bezier, linear etc).
Collada also allows modeling apps to export custom data into the DAE
file that they can use to support features that are not part of the
collada spec.
Each animation curve in the modo DAE contains the usual input, output,
in-tangent, out-tangent values, but it also contains a "modo 401"
profile with custom data for the in-tangent and out-tangent values. The
maya DAE does not contain the "modo 401" custom data, but interestingly,
the standard in-tangent/out-tangent values are different to those in the
modo DAE.
Still with me? What I think is happening is that modo is exporting
animation curves with custom interpolation data that maya understands,
but T3D does not. When maya imports the modo DAE, I think it ignores the
standad in-tangent/out-tangent values and uses the custom modo data
instead. When it exports the maya DAE, it uses standard collada data
which then works as expected in T3D.
My thinking at the moment is that this is technically a bug in the modo
exporter. The standard collada intangent/outtangent values in the modo
DAE appear to be the reason for the 'choppy' animation you described,
and Maya conveniently ignores them and uses the custom modo data
instead. I could modify T3D to do the same thing, but I don't want to
workaround an exporter bug if I can help it.
As an experiment, try setting the 'sample animation' option when
exporting from modo to see if that helps. This should sample the
animation curves prior to export so T3D won't have to worry about
interpolating them.
Cheers,
Chris
06/01/2010 (1:49 pm)
Thanks for the ideas. I am at 30 FPS and I did compare the files. I also sent the files to Chris and he checked them out as well.Here is what he told me:
Hi Greg,
Not sure how familiar you are with the collada spec, but I will do my
best to explain what I think is happening. Animations are stored in
collada as a set of keyframes, with associated information about how to
interpolate between them (ie. tangents for the input (time) and output
curves along with an interpolation type like bezier, linear etc).
Collada also allows modeling apps to export custom data into the DAE
file that they can use to support features that are not part of the
collada spec.
Each animation curve in the modo DAE contains the usual input, output,
in-tangent, out-tangent values, but it also contains a "modo 401"
profile with custom data for the in-tangent and out-tangent values. The
maya DAE does not contain the "modo 401" custom data, but interestingly,
the standard in-tangent/out-tangent values are different to those in the
modo DAE.
Still with me? What I think is happening is that modo is exporting
animation curves with custom interpolation data that maya understands,
but T3D does not. When maya imports the modo DAE, I think it ignores the
standad in-tangent/out-tangent values and uses the custom modo data
instead. When it exports the maya DAE, it uses standard collada data
which then works as expected in T3D.
My thinking at the moment is that this is technically a bug in the modo
exporter. The standard collada intangent/outtangent values in the modo
DAE appear to be the reason for the 'choppy' animation you described,
and Maya conveniently ignores them and uses the custom modo data
instead. I could modify T3D to do the same thing, but I don't want to
workaround an exporter bug if I can help it.
As an experiment, try setting the 'sample animation' option when
exporting from modo to see if that helps. This should sample the
animation curves prior to export so T3D won't have to worry about
interpolating them.
Cheers,
Chris
#4
Changing this manually to:
makes the animation play nice and smoothly. Recommend you download the latest version of the exporter (sourceforge.net/projects/colladamodo/) and check if the problem still occurs. If so, report it as a bug to Modo.
Using a sample rate of 30fps, and setting the Sample Animation option prior to export should work around the problem, as this will avoid having to interpolate the animation curves (so the in-tangent data won't matter).
06/01/2010 (5:08 pm)
After closer examination of the Modo exported DAE file, it appears there is a bug in the Modo exporter (build 34686). The exporter is pointing the IN_TANGENT (used for animation curve interpolation) at the outtangent data:<input semantic="IN_TANGENT" source="#mainBodyControllerNode_RotationZ.ANGLE-outtangents" /> <input semantic="OUT_TANGENT" source="#mainBodyControllerNode_RotationZ.ANGLE-outtangents" />
Changing this manually to:
<input semantic="IN_TANGENT" source="#mainBodyControllerNode_RotationZ.ANGLE-intangents" /> <input semantic="OUT_TANGENT" source="#mainBodyControllerNode_RotationZ.ANGLE-outtangents" />
makes the animation play nice and smoothly. Recommend you download the latest version of the exporter (sourceforge.net/projects/colladamodo/) and check if the problem still occurs. If so, report it as a bug to Modo.
Using a sample rate of 30fps, and setting the Sample Animation option prior to export should work around the problem, as this will avoid having to interpolate the animation curves (so the in-tangent data won't matter).
#5
06/01/2010 (5:33 pm)
I tested it on the latest version and the issue still occurs. I altered the developers.
Associate Chris Robertson
I'd be happy to take a look at your model for you (email is in my profile, just remove the null).