Collada + DSQ = (Solved)
by Kevin Mitchell · in Torque 3D Professional · 08/15/2009 (4:02 am) · 13 replies
All I do is keep the same setup for my character that I had for the collada Export. I added back the bounding box, added the sequence object, loaded a root animation, marked the start and end and exported... Everything completed with no errors. I load up the player in my game and get this...

Any ideas/ has this happened to anyone else?

Any ideas/ has this happened to anyone else?
About the author
Riding Solo since 2005. Current Project: Fated World 2005-Present RPG Engine Tool Kit - Now available.
#2
08/15/2009 (5:45 am)
Collada NextGen that i got from the collada web site for 3DS Max 2009
#3
08/15/2009 (6:00 am)
Actually take that back I'm using the FBX the next gen exports my character as a cluster freak of meshing.
#4
All results that have me using a biped and bip animations fail.
Custom animations are rotated 90 degrees the wrong way and has my torso in the ground.
Can anyone make light to my last 12 hours of exporting and epic fail?
08/15/2009 (5:31 pm)
I've tried like every exporting possibility and plugin and i can't export this animation, I've tried blend mode, remaking the character bone structure, tripple checking the character docs on the site, imbeding the animation into the collada ,and all 3 collada export types. All results that have me using a biped and bip animations fail.
Custom animations are rotated 90 degrees the wrong way and has my torso in the ground.
Can anyone make light to my last 12 hours of exporting and epic fail?
#5
What has anyone used to successfully export collada players ?
Blender ? Maya ? XSI ?
08/16/2009 (12:46 am)
I have a question,..What has anyone used to successfully export collada players ?
Blender ? Maya ? XSI ?
#6
If only i could get my custom animations to work.
08/16/2009 (4:16 am)
I've gotten the player to export correctly with, 3DS Max + Autodesk FBX exporter, it works fine with the animation pack and the default torque animations. The hovering effect that many people have seen I've fix by exporting my character with the Bip01 set to 0 0 0 XYZ this fixes the problem for the levitation glitch. If only i could get my custom animations to work.
#7
08/16/2009 (12:58 pm)
I have gotten characters with multiple animations to export from 3DSMax 9 into T3D (at least in Betas 3 and 4, still porting to 5). I used the collada exporter from wherever the GG documentation suggested (don't recall at the moment). However, my character models are twice the size of the default models (I don't like the defaults - I feel like a gnome).
#8
Also about the size my characters are about 10 max units tall that's a pretty good size on import compared to gallion or what ever the robots name is.
08/16/2009 (1:03 pm)
The animation were they exported separately as a dsq and using Biped animation files?Also about the size my characters are about 10 max units tall that's a pretty good size on import compared to gallion or what ever the robots name is.
#9
1. You exported a collada (DAE) model with no animations. It displays correctly in T3D. (in the shape editor for example).
2. You then modified the scene to add a sequence helper and exported a DSQ with a single animation. When this animation is applied to the model from step 1, it is stretched out as shown in your picture.
If this is the situation, there's a couple of things that spring to mind:
1. Different scale between DAE and DSQ exports. The scale of the collada export is usually the units your 3d app works in (eg. 1 unit=1 meter). Look in the DAE file (it's just XML) for the <unit > element. This will tell you the scale factor that the T3D loader applies on import. Try changing it to 1.0, or set the same scale for your DSQ export (some DTS/DSQ exporters allow you to specify a global scale factor).
2. Nodes being culled/collapsed on DSQ export. Collada exporters tend to dump the entire scene, whereas DTS/DSQ exporters usually collapse unwanted nodes. This shouldn't be a problem, but you could try disabling CollapseTransforms for DSQ export using a DTS config file.
If your collada model does not display correct in T3D even BEFORE you apply the animation to it, please send it to me and I will take a look.
08/16/2009 (11:26 pm)
Just for clarification, is the following correct?1. You exported a collada (DAE) model with no animations. It displays correctly in T3D. (in the shape editor for example).
2. You then modified the scene to add a sequence helper and exported a DSQ with a single animation. When this animation is applied to the model from step 1, it is stretched out as shown in your picture.
If this is the situation, there's a couple of things that spring to mind:
1. Different scale between DAE and DSQ exports. The scale of the collada export is usually the units your 3d app works in (eg. 1 unit=1 meter). Look in the DAE file (it's just XML) for the <unit > element. This will tell you the scale factor that the T3D loader applies on import. Try changing it to 1.0, or set the same scale for your DSQ export (some DTS/DSQ exporters allow you to specify a global scale factor).
2. Nodes being culled/collapsed on DSQ export. Collada exporters tend to dump the entire scene, whereas DTS/DSQ exporters usually collapse unwanted nodes. This shouldn't be a problem, but you could try disabling CollapseTransforms for DSQ export using a DTS config file.
If your collada model does not display correct in T3D even BEFORE you apply the animation to it, please send it to me and I will take a look.
#10
...
Man I didn't know about this. I thought that the character units from max to torque were translated differently where the rules for character size when exporting the collada was different. When I followed the regular DTS exporting rules my character imported and looked like a ant compared to the orc.
So just to follow up. When exporting your character. Keep the same unit size when originally creating an export for a DTS character and when I export always edit the file and change:
<unit meter="0.025400"/>
to
<unit meter="1"/>
Is there a way to avoid editing the collada every time? When messing with the export Units Changing it to yards, this changes the scaled unit meter to:
<unit meter="0.914400"/>
But if this is my only problem then I'm happy its better than having stretch arm strong as a character.
Thanks so much Chris now I can go back to being sane. There's so many things that are a mystery in this engine thanks for the help.
O_Ov
08/17/2009 (6:48 am)
AHHHHHHH I think i see what's going on, so when I export the collada file the actual size of the model is modded down to a smaller size than what I actually see in the 3D World in 3ds max, and thus I think that the size is the same size for the DSQ but the DSQ file does not have a scale down effect, so when the animation is played for the scaled down colada it stretched the character since the scales are different. ...
Man I didn't know about this. I thought that the character units from max to torque were translated differently where the rules for character size when exporting the collada was different. When I followed the regular DTS exporting rules my character imported and looked like a ant compared to the orc.
So just to follow up. When exporting your character. Keep the same unit size when originally creating an export for a DTS character and when I export always edit the file and change:
<unit meter="0.025400"/>
to
<unit meter="1"/>
Is there a way to avoid editing the collada every time? When messing with the export Units Changing it to yards, this changes the scaled unit meter to:
<unit meter="0.914400"/>
But if this is my only problem then I'm happy its better than having stretch arm strong as a character.
Thanks so much Chris now I can go back to being sane. There's so many things that are a mystery in this engine thanks for the help.
O_Ov
#11
Exactly. The <unit> element in the collada file is actually a really good idea. It means you can work in sensible and meaningful units in your modeling app.
For example, if you were modeling a character, it might make sense to work in inches (1 MAX unit = 1 inch), but if you were modeling a building, it might make more sense to work in feet (1 MAX unit = 1 foot). If you export both models to collada, T3D will automatically scale them appropriately. 1 T3D unit = 1 meter, so the character would be scaled down by 0.0254, and the building scaled down by 0.3048, given them both the correct scale relative to each other.
Yes. If you change the Export Units to meters, the collada element should be set to <unit meter="1">, but then you lose the advantage of actually working in units that make sense.
You could also use TSShapeConstructor to override the <unit> scale value. See Artist Section/TSShapeConstructor in the official docs. eg. just create a script in the same folder as your model with the same filename (but .cs extension) and the following contents:
08/17/2009 (9:11 pm)
Quote:so when the animation is played for the scaled down colada it stretched the character since the scales are different.
Exactly. The <unit> element in the collada file is actually a really good idea. It means you can work in sensible and meaningful units in your modeling app.
For example, if you were modeling a character, it might make sense to work in inches (1 MAX unit = 1 inch), but if you were modeling a building, it might make more sense to work in feet (1 MAX unit = 1 foot). If you export both models to collada, T3D will automatically scale them appropriately. 1 T3D unit = 1 meter, so the character would be scaled down by 0.0254, and the building scaled down by 0.3048, given them both the correct scale relative to each other.
Quote:Is there a way to avoid editing the collada every time?
Yes. If you change the Export Units to meters, the collada element should be set to <unit meter="1">, but then you lose the advantage of actually working in units that make sense.
You could also use TSShapeConstructor to override the <unit> scale value. See Artist Section/TSShapeConstructor in the official docs. eg. just create a script in the same folder as your model with the same filename (but .cs extension) and the following contents:
singleton TSShapeConstructor(MyShapeDae)
{
baseShape = "./myShape.dae";
unit = "1.0"; // override <unit> to be 1.0
};
#12
That's a crazy stretched out character by the way! Glad to see it was such a simple fix.
08/18/2009 (3:31 am)
Ignore me, off-topic, but couldn't resist :DQuote:but then you lose the advantage of actually working in units that make sense.What's so nonsensical about the scientific standard of the metric system. It's mostly us Americans who persist in using nonsense units such as inches and feet ;)
That's a crazy stretched out character by the way! Glad to see it was such a simple fix.
#13
I wasn't meaning that meters were nonsensical => but that specifying the meaning of a unit in your modeling app is a good idea. Whether those units be cm/meters or inches/feet is completely up to the user. The COLLADA <unit> tag tells T3D how to convert your arbitrarily chosen units into meters, so models should end up with the correct relative scale.
Setting the "Export Units" to meters when you were actually working in inches just so the <unit meter="1"> is a bad idea. Better to correct your modeling workflow.
08/18/2009 (4:10 am)
Quote:What's so nonsensical about the scientific standard of the metric system. It's mostly us Americans who persist in using nonsense units such as inches and feet ;)
I wasn't meaning that meters were nonsensical => but that specifying the meaning of a unit in your modeling app is a good idea. Whether those units be cm/meters or inches/feet is completely up to the user. The COLLADA <unit> tag tells T3D how to convert your arbitrarily chosen units into meters, so models should end up with the correct relative scale.
Setting the "Export Units" to meters when you were actually working in inches just so the <unit meter="1"> is a bad idea. Better to correct your modeling workflow.
Torque Owner TheGasMan
G.A.S. [+others]
[BTW, I have not tried a player model since the collada testing in TGEA...and I received similar results back then.]