Game Development Community

[BUG v1.0] Importing of spot lights via collada have bad result - LOGGED

by Scott Peal · in Torque 3D Professional · 10/05/2009 (9:40 pm) · 4 replies

FYI,

I imported a building with spot lights from Softimage to T3D via collada with the import lights checkbox on. The spot lights showed up in the world editor, but were in the wrong position and facing the wrong direction.

Also the names of the spot lights did not come over.

#1
10/09/2009 (1:10 pm)
It looks like when a spot light is imported, it is rotated 90 degrees in the green direction. I think that is the Y direction. It is also moved a few units in the Y direction as well.

Any chance this can be fixed in v1.1?
#2
10/21/2009 (3:58 am)
Hi Scott,

I've seen lights imported correctly before, though that was from MAX. Could you check if your lights are imported correctly if you use the import dialog to:

a) override the scale factor to 1.0
b) override the up_axis to Z_UP
#3
05/31/2010 (7:28 pm)
This issue was due to T3D incorrect import of the COLLADA <lookat> element. Fixed in 1.1 beta 2, or if you can't wait (colladaUtils.h):

/// Collada <lookat>: [eye, target, up]
template<> inline MatrixF vecToMatrixF<domLookat>(const domListOfFloats& vec)
{
   Point3F eye(vec[0], vec[1], vec[2]);
   Point3F target(vec[3], vec[4], vec[5]);
   Point3F up(vec[6], vec[7], vec[8]);

   Point3F fwd = target - eye;
   fwd.normalizeSafe();

   Point3F right = mCross(fwd, up);
   right.normalizeSafe();

   up = mCross(right, fwd);
   up.normalizeSafe();

   MatrixF mat(true);
   mat.setColumn(0, right);
   mat.setColumn(1, fwd);
   mat.setColumn(2, up);
   mat.setColumn(3, eye);
   return mat;
}
#4
06/10/2010 (11:15 am)
Logged TQA-334