Problem exporting bones in shape
by James Urquhart · in Torque Game Engine · 11/02/2003 (11:02 am) · 1 replies
Hi there,
Yet again i am having the irritating problem of bone positions not quite exporting properly in my blender exporter. (written in python)
Firstly, here is the information about the export my blender exporter writes :
And heres what it looks like in blender, vs torque :

I seem to have got the default node Quaternion's and Translations right (since the CAL3D exporter exports the same values, and that works.. well at least in *CAL3D*...)
However, the Node Transform Matrixes are a bit puzzling.
I have used the milkshape 3d exporter as a reference when making my exporter. Here's what my setNodeTransform function looks like :
Any ideas what i'm doing wrong?
Thanks for any help.
Yet again i am having the irritating problem of bone positions not quite exporting properly in my blender exporter. (written in python)
Firstly, here is the information about the export my blender exporter writes :
Quote:
DTS Exporter running...
> Adding Armature
>> Root
^^ Child (parent 0)
^^ Child (parent 1)
> Adding Object Cylinder
> Added Materials from Object
<< Writing Mesh
Mesh being exported as Skin Mesh
Setting node transform for node 1 in mesh
Quaternion 0 is : -0.000000 -0.000000 0.000913 1.000000
DEBUG: node Transform is set to :
0.999998, -0.001827, -0.000000, -6.311581,
0.001827, 0.999998, 0.000000, 0.095335,
0.000000, -0.000000, 1.000000, -0.000000,
0.000000, 0.000000, 0.000000, 1.000000,
Setting node transform for node 0 in mesh
Quaternion 1 is : 1.000000 0.000000 0.000000 0.000000
DEBUG: node Transform is set to :
1.000000, 0.000000, 0.000000, 4.167397,
0.000000, -1.000000, 0.000000, 0.000000,
0.000000, 0.000000, -1.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000,
Setting node transform for node 2 in mesh
Quaternion 2 is : 0.000000 0.000000 -0.013241 0.999912
DEBUG: node Transform is set to :
0.999649, 0.026480, 0.000000, -2.945829,
-0.026480, 0.999649, -0.000000, -6.033503,
-0.000000, 0.000000, 1.000000, -0.000000,
0.000000, 0.000000, 0.000000, 1.000000,
Getting Detail 0
> Generating Triangle Strips for object...
> Done.
> Imported Data from Mesh
> Making Detail Levels...
> Adding Detail Levels...
DEBUG : Looking at detail level
DEBUG : mesh Cylinder is 0 -> +1
DEBUG : SubShape 0 0 0 3 1 0
DEBUG : Detail Level Detail-1 0 0 22 0 0 224
> Adding Sequences...
> Finishing...
Writing out DTS file...
Writing Skin Mesh...
Writing Sequences and Materials
Done.
DEBUG: Node Default Translation : -4.167397 0.000000 0.000000
DEBUG: Node Default Quaternion : 1.000000 0.000000 0.000000 0.000000
DEBUG: Node Default Translation : 3.155891 -0.040460 0.000000
DEBUG: Node Default Quaternion : -0.000000 -0.000000 0.000457 1.000000
DEBUG: Node Default Translation : -0.005397 2.953865 -0.000000
DEBUG: Node Default Quaternion : 0.000000 0.000000 -0.006849 0.999977
And heres what it looks like in blender, vs torque :

I seem to have got the default node Quaternion's and Translations right (since the CAL3D exporter exports the same values, and that works.. well at least in *CAL3D*...)
However, the Node Transform Matrixes are a bit puzzling.
I have used the milkshape 3d exporter as a reference when making my exporter. Here's what my setNodeTransform function looks like :
def setNodeTransform(self, node, t, q): t = q.inverse().apply(-t) row = [] row.append(t.x()) row.append(t.y()) row.append(t.z()) row.append(1) self.nodeTransforms[node] = q.toMatrix() print "Quaternion %d is : %f %f %f %f" % (node, q[0], q[1], q[2], q[3]) self.nodeTransforms[node].setCol(3,row) print "DEBUG: node Transform is set to :" for x in range(0, 4): for y in range(0, 4): print "%f," % (self.nodeTransforms[node].get(x,y)), print " " del row(node is the node index, t is a vector, q is a quat)
Any ideas what i'm doing wrong?
Thanks for any help.
About the author
Associate Kyle Carter