The cube in the blue circle has its shadow and lighted sides correct.
The objects in the red circle have their shadow and lighted sides inverted,
according to the direction of the light source.
How can I fix the normals so that the shadows are on the correct side ?
If they are indeed consistently exactly backwards then that’s weird that the library produces them that way.
To fix this in code the steps would be:
grab the mesh
get its Type.Normal VertexBuffer
grab the FloatBuffer from it
multiply all values in the FloatBuffer by -1 and set them back.
send the VertexBuffer back to the mesh… (at least I think there is a way you need to tell the Mesh that the buffer has changed… you can look at some of the mesh subclass’s updateXXX() style methods to see).
Reversing the normals solved the issue depicted in the screenshot, light and shadow went to the right side.
And reversing the winding solved another problem that I hadn’t mentioned, namely that the objects didn’t ‘receive’ shadow.