Lighting artifact

Started by
2 comments, last by Muse 19 years, 3 months ago
In this shot, the camera position is also the light position. As you can see, the lighting is split somehow; afaict, the left face of the cube is mirrored. This particular lighting method is attenuation maps with self shadowing, but the same error appears when I use dot3 lighting. I suspect it's some kind of problem with the normals, but I'm not sure what to look for. [EDIT] The same artifact appears in hardware TnL. [Edited by - Promit on January 6, 2005 7:20:51 PM]
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Advertisement
Try drawing the normals of the object and verify they point the right direction. This is most easily done by drawing a line from (vertex position) to (vertex position) + (normal).
Some of the normals are indeed pointing in the wrong direction.

As it turns out, this box has 20 vertices. I'm not entirely sure what the hell kind of box has 20 vertices (especially given that it's indexed), but I blame MS3D.

So, solved. I guess.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
That is how MS3D handles the possibility of a discontinuous texture unwrap--which is to say in the worst possible way.
-david

This topic is closed to new replies.

Advertisement