Game Development Community

Collada lighting crazyness.

by James Brad Barnette · in Torque 3D Professional · 06/23/2009 (3:02 pm) · 7 replies

Ok I have a weird situation and for some reason when I export a collada file and then bring it into Torque 3D I'm only getting ambient lighting on it no direct lighting anyone have any idea what would cause this?

#1
06/23/2009 (4:34 pm)
Sounds like it doesn't have good normals.

Load it as a TSStatic into Torque 3D. In the inspector find the 'renderNormals' field and set it to 1.

If you have good normals on your object you should see a bunch of colored lines of the same 1 meter length... these are the normals.

If you don't see lines your normals haven't been exported properly.
#2
06/23/2009 (8:50 pm)
I use the DTS exporter and it comes out fine though and both have the exact same things in the inspector thing. It only does it the Collada file.
I can send you the file in the morning if you want to take a look. it is not just the one Collada file they all seem to be doing it. DTS files using the Exporter work come out perfect as well.
#3
06/24/2009 (10:56 am)
Sure... email me the Collada file, textures, and material.cs.
#4
06/24/2009 (12:43 pm)
nevermind, I sorted it out it was over on the second page of the collada export dialog there is a "export xsi normals" check box that I was not checking I was just using the defaults.

Thanks for offering to help though I appreciate it.

one more question though there seems to be a difference in scale. When I use the XSI 2 DTS exporter to export say the torque orc I get a mesh that is the exact same as the dts from the the stronghold mission but when I use collada I have to scale my mesh by a factor of 10x to match the size of the same model exported via DTS.

Any Thoughts?
#5
06/24/2009 (1:04 pm)
There is usually a unit conversion that occurs. In the DAE file if you open it up you'll see near the top...

<unit meter="1.000000" />

That is what defines the size of a meter in the Collada file. This should be set properly by the XSI exporter, so i would look for some other setting your missing there.
#6
06/24/2009 (1:20 pm)
there is not setting for scale in the collada exporter at least it is something that is easy to figure out. it is exactly x10 to match DTS exported objects.
#7
06/24/2009 (1:59 pm)
If its 10x like you say it sounds like XSI has its units set to decimeters.