Game Development Community

Importing collada files. Node names are truncated when they contain a space.

by Joel Stephens · in Technical Issues · 10/18/2010 (6:36 am) · 5 replies

I am importing a collada file I made in blender into torque3d. Everything looks ok except that any node names in the skeleton are truncated if they contain a space. So instead of Bip01 Pelvis the name is changed to Bip01A.
I have checked inside the collada file itself and the nodes are named correctly.
I know I can change the node names in torque but then I have to change them every time I export the file.
I am still just learning the basics so I've been exporting small changes in the file for each step.
The spaces are necessary so that I can use the standard biped node names for the built in dsq animations.
Is there a simpler way around this problem other than renaming the nodes each time I export the file? Or even better is there a possibility of an update that fixes this problem in the near future?

#1
10/18/2010 (6:56 pm)
have you tried the older version of blender with the blender-dts exporter ?

Also, if you can find Chris Robertson's email address around here, you should contact him directly.
#2
10/21/2010 (5:46 pm)
I've experimented with both methods. I really like the new version of blender and torque supposedly supports the collada file format now so I was hoping to go with the new tools.

I would like to be learning with the new tools rather than the old ones, but I guess I will have to stick with what works until torque fully supports the collada format.
#3
10/21/2010 (9:33 pm)
Hi Joel,

I assume you're using the binary version of T3D. There have been numerous fixes and improvements to the collada importer since then, though they are currently only available to Pro licensees.

1. I can't remember any such limitation on node names in the collada importer - can you post a section of the DAE file, or send it to me? (email in profile, remove the NULL).

2. Try changing the spaces to underscores '_' in blender. I can't remember whether this went in before or after the T3D binary release, but there is code in T3D to search for _ instead of spaces in node names when loading DSQs.
#4
10/21/2010 (9:48 pm)
Here is a link to the collada file. http://dl.dropbox.com/u/10327232/big_man.dae
Here is a section of the dae file where the noes start:
<node id="Armature_001" type="NODE">
<translate sid="location">1.47719e-4 0.001164317 2.61784e-4</translate>
<rotate sid="rotationZ">0 0 1 0</rotate>
<rotate sid="rotationY">0 1 0 0</rotate>
<rotate sid="rotationX">1 0 0 0</rotate>
<scale sid="scale">1 1 1</scale>
<node id="Armature_001_Bip01_Pelvis" name="Bip01 Pelvis" sid="Armature_001_Bip01_Pelvis" type="JOINT">
<translate sid="location">0 -0.1557133 7.975743</translate>
<rotate sid="rotationZ">0 0 1 1.09323e-5</rotate>
<rotate sid="rotationY">0 1 0 1.49677e-6</rotate>
<rotate sid="rotationX">1 0 0 80.49132</rotate>
<scale sid="scale">1 1 1</scale>
<node id="Armature_001_Bip01_Spine" name="Bip01 Spine" sid="Armature_001_Bip01_Spine" type="JOINT">
<translate sid="location">1.45519e-11 2.070694 0</translate>
<rotate sid="rotationZ">0 0 1 -1.88118e-6</rotate>
<rotate sid="rotationY">0 1 0 180</rotate>
<rotate sid="rotationX">1 0 0 7.17707</rotate>
<scale sid="scale">1 0.9999998 1</scale>
<node id="Armature_001_Bip01_Spine1" name="Bip01 Spine1" sid="Armature_001_Bip01_Spine1" type="JOINT">
<translate sid="location">0 0.9505711 0</translate>
<rotate sid="rotationZ">0 0 1 -8.69376e-8</rotate>
<rotate sid="rotationY">0 1 0 -1.19339e-5</rotate>
<rotate sid="rotationX">1 0 0 -0.4103527</rotate>
<scale sid="scale">1 1 1</scale>
<node id="Armature_001_Bip01_Spine2" name="Bip01 Spine2" sid="Armature_001_Bip01_Spine2" type="JOINT">
<translate sid="location">0 1.03879 2.38419e-7</translate>
<rotate sid="rotationZ">0 0 1 2.94449e-6</rotate>
<rotate sid="rotationY">0 1 0 1.1404e-6</rotate>
<rotate sid="rotationX">1 0 0 -22.56627</rotate>
<scale sid="scale">1 0.9999999 0.9999999</scale>
<node id="Armature_001_Bip01_Neck" name="Bip01 Neck" sid="Armature_001_Bip01_Neck" type="JOINT">
<translate sid="location">0 2.755863 0</translate>
<rotate sid="rotationZ">0 0 1 2.72894e-7</rotate>
<rotate sid="rotationY">0 1 0 7.80564e-8</rotate>
<rotate sid="rotationX">1 0 0 -2.118979</rotate>
<scale sid="scale">1 0.9999999 1</scale>


I'll try the underscores for the node names. That seems like a good work around if it works.
I certainly hope a pro license is not required to fix a bug.
#5
10/22/2010 (7:28 pm)
The underscores work. The nodes are recognized correctly and the animations play. I'm still having issues with the animations looking right though. There are some weird rotations going on or something. I'll probably experiment with them and maybe make a new post on that later.