Page 1 of 1

[fixed]MS3D animated mesh not lit correctly

Posted: Tue Nov 20, 2007 10:42 pm
by hey_i_am_real
Hi.

Linux, SVN1063, OpenGL.

The light is at the same position than the camera.
When the mesh rotates (the rotation is part of the animation of the mesh. This is just a rotation of the root bone), the back of the ninja should be lit but is not.

Image

Posted: Wed Nov 21, 2007 3:06 pm
by Luke
try:

((ISkinnedMesh*)mesh)->updateNormalsWhenAnimating(true);

Posted: Wed Nov 21, 2007 6:15 pm
by hey_i_am_real
Thanks for this tip.

ISkinnedMesh is not documented in the online API documentation.

Unfortunately, I need to reorganize my code before being able to test the effect of updateNormalsWhenAnimating(true); ...

Posted: Mon Nov 26, 2007 1:08 pm
by hybrid
I have changed the default state to animate normals. Since we also have lighting enabled by default this seems to make more sense, even if it's slower.