Lighting Normals inverted?

Jul 14, 2009 at 5:55 AM


We are having a small issue with the lighting. Though it works on the Disk perfectly, it is lighting our imported models incorrectly.

The light passes near our objects ( a cube and a trebuchet) but the surfaces facing the light are lit on the incorrect side.

We put up a video to demonstrate the problem.

We do not know where to start to fix this issue. Any help or guidance you could provide would be greatly appreciated. :)

Jul 14, 2009 at 8:11 AM

What is your export process?


Jul 14, 2009 at 8:31 AM
Edited Jul 14, 2009 at 8:35 AM

Our artist is currently using 3dsMax 2009 to create the models.
Then he exports them using the kw-Xport Exporter to the .X format.

At first models he gave us rendered insideout so he then flipped the mesh inside out.
This made it render fine when not using lights but when we add a light to the scene it seems to have insideout lighting.

He uses the default settings in this plugin (other than above).

So is there any perticler settings that we should use?
Or any way of creating the models so they look correct in XNA/Xen?

Jul 14, 2009 at 9:10 AM

For the XNA coordinate system check these options:


Export Normals

Export Tangents

Make Y Up

Export Right-Handed Mesh



Jul 16, 2009 at 9:28 AM

Thanks man, that really helped :)

Jul 16, 2009 at 2:03 PM

Thanks Kludgy!, I wouldn't have been able to answer that :-)

Jul 16, 2009 at 2:41 PM

Sadly doing this with the kw-Xport exporter still makes bad models :( (these were the defaults for kw-Xport too)

However using these settings in the panda .x exporter works fine :)

Jul 17, 2009 at 3:34 AM
KW-port is not good in the Xen.
When i used KW-port, it didn't work well. However, using Panda-x, it works well.