It could happen if computeVertexNormals() is applied an object that have seams (for uv unwrapping). computeVertexNormals doesn’t understand that face normals, calculated along the seam, need to be averaged with face normals across it. Incorrect normals will produce a mismatch in illumination.
I forgot to mention that the object I’m using is exported from blender as a glb file and I’m not sure how to use computeVertexNormals() since it seems to be a part of the BufferGeometry class.
I’m really new to all the 3D stuff, so I really can’t tell how their issue is related to mine.
Can you please explain it further?
If you link your .glb file here, then it’ll be possible to have a look at it and tell you for sure what causes the issue.
You can also post a simple working example of your code (including your scene and illumination) on jsfiddle or codepen.
I don’t know how to correctly load a file into jsfiddle (I’m getting CORS errors).
But I’ve made a rudimentary version you can just open within your browser.
The zip also includes the glb, but the html file uses the same glb through CORS.
It’s a cube transformed into a sphere. I learned that somewhere for another fix. Using a uv-sphere resulted in stretched textures at the poles.
Do you think that might be the cause?
I would have guessed that the uv-islands within the normal map are oriented the wrong way. But on the other hand the “continents and islands” on the planet are in place.
And yes, now I see the problem in Blender as well, when I crank up the normal map strength. It seems like the normal map is getting this problem during the baking process.
I don’t use Blender for baking, so it’s hard for me to tell what causes the issue.
Make a simple low-res example showing your problem and try to ask on Blender forums, with all the files attached, that’s probably the best way to solve this.