Advanced Lighting Inconsistent lights
by Martin Banks · in Torque 3D Professional · 10/15/2009 (7:04 pm) · 12 replies
I'm having a problem with every model that I have imported as a collada file. Advanced lighting will light the objects, characters, etc. inconsistently. I have 2 spotlights set up in an interior, along with two point lights. The lights are static. When I look at an object, it appears lit. I then rotate the object in place, and it becomes lit differently, as if I rotated the light around it instead.
See these pictures. The first is of a character facing forward where you can see the light on his pants and shirt etc. The next is of the same character rotated in the same place, now facing backward. The character is black.
Light on:

Light not on:

The shadows fall as expected, which in this case is behind the character. It is only the lights that are whacky.
I don't get this problem with the stock models, like Gideon. These models are all exported to collada from Maya.
Anyone else have this problem?
Thanks in advance.
See these pictures. The first is of a character facing forward where you can see the light on his pants and shirt etc. The next is of the same character rotated in the same place, now facing backward. The character is black.
Light on:

Light not on:

The shadows fall as expected, which in this case is behind the character. It is only the lights that are whacky.
I don't get this problem with the stock models, like Gideon. These models are all exported to collada from Maya.
Anyone else have this problem?
Thanks in advance.
About the author
#2
2 What is your GPU?
3 Try enable/disable AdvancedLightMappingSupport in LevelInfo.
4 Does the same sort of thing happen in Basic Lighting?
5 Did you sort out smoothing groups correctly (I don't know Maya)
10/15/2009 (7:16 pm)
1 Have you checked your models normals?2 What is your GPU?
3 Try enable/disable AdvancedLightMappingSupport in LevelInfo.
4 Does the same sort of thing happen in Basic Lighting?
5 Did you sort out smoothing groups correctly (I don't know Maya)
#3
10/15/2009 (7:41 pm)
It almost looks like a problem with the smoothing groups - Try exporting without smoothing at all and see if it still happens?
#4
@Steve - 1. Yes, and they are aimed out as expected. 2. nvidia 9600 3.No difference
4.same in basic
5. no smoothing groups
@Sven - there were no smoothing groups exported.
What seems to have worked was to do a combine pass on the character models.
Does this mean that the models need to be created as a continuous geometry, rather than separate pieces?
10/16/2009 (12:30 pm)
@Manoel - the blending mode is none. there is nothing translucent.@Steve - 1. Yes, and they are aimed out as expected. 2. nvidia 9600 3.No difference
4.same in basic
5. no smoothing groups
@Sven - there were no smoothing groups exported.
What seems to have worked was to do a combine pass on the character models.
Does this mean that the models need to be created as a continuous geometry, rather than separate pieces?
#5
Do toggleNormalsViz in the console and take a screenshot of that.
10/21/2009 (2:55 am)
That looks like bad normals to me.Do toggleNormalsViz in the console and take a screenshot of that.
#6
maya collada file normals
torque normal viz toggle
front view

I'm don't know what values or directions the colors correspond to, but depending on the character's orientation, they change. That seems wrong to me since the normals don't change relative to the character's orientation.
10/21/2009 (12:16 pm)
@Tom - The normals could be bad, but they could have only gotten that way on export since the face and vertex normals both are consistent in Maya. Anyhow, here are the screenshots.maya collada file normals
torque normal viz toggle
front view
I'm don't know what values or directions the colors correspond to, but depending on the character's orientation, they change. That seems wrong to me since the normals don't change relative to the character's orientation.
#7
Edit: Actually the normals on most of that geometry do not look correct.
10/21/2009 (12:31 pm)
The normals are stored in view-space. This is what accounts for the normals changing as you turn. The normals on that mesh do not look right at all, is there a normal map on the mesh?Edit: Actually the normals on most of that geometry do not look correct.
#8
10/21/2009 (10:31 pm)
@Martain - Export your collada from Maya then reimport the Collada into Maya... are the normals still correct?
#9
@Tom - that is what the picture from maya above demonstrates. As you can see, the normals in Maya look fine.
10/22/2009 (11:17 am)
Quote:@Martin - Export your collada from Maya then reimport the Collada into Maya... are the normals still correct?
@Tom - that is what the picture from maya above demonstrates. As you can see, the normals in Maya look fine.
#10
10/22/2009 (9:24 pm)
@Martin - If you can post your Collada file somewhere maybe Chris can jump in and look at it. It sounds like Torque is then not reading the normals from a Maya collada file correctly.
#11
http://www.garagegames.com/community/forums/viewthread/104415
10/23/2009 (11:46 am)
@Tom - that is exactly what is happening. I have described it more as a bug here:http://www.garagegames.com/community/forums/viewthread/104415
Associate Manoel Neto
Default Studio Name