Ah sorry, my GitHub mesh changes were not updated so that last comment is out of date.
My problem is that I have a global light used for all meshes in the scene, but when I rotate this glTF mesh, the shading cast by this global light source does not update. It’s like the model used to transform the rays is not updated.
So I just tried to import the glTF object into Blender and I found that the lighting works when I move around the light source, however, when I take a look at the edges and the normals, I see nothing except this at the very bottom of the mesh:
I’m not sure what is going on with the Blender scene, but it looks like from the glTF that the skin is scaling the vertices so that the model is bigger. The normals are working as far as I can tell.
I’m not sure exactly what the problem is. I rotate the light or rotate the root node and everything updates correctly. What exactly is the issue?
I’ve uploaded a video recorded from the babylonJS scene showing the issue here:
In the video, you can see the light is coming from the camera, pointing at the mesh.
When I rotate the mesh around without moving the light source, the diffuse shading looks like it’s baked on the mesh. The way I reproduce this is by going to Inspector > root > Transformations > Rotation > Y .
I just noticed the specular shading seems to update on rotations too I think.
Also, changing the light direction in the inspector does seem to work.
You can try to export your character scene with a directional light trained on the mesh, and animate the character spinning around the Y (Z in blender) axis to see how it imports in different engines via the glTF viewer VSCode plugin