I’m banging my head at this. I have a point light but it seems to light up the other side of an object. It’s like the opposite of the way it lights up the sphere in the examples.
It’s a relatively simple scene, but I can’t put it in the playground due to the side of the materials and i’m not sure how to simplify it down for demo.
Hello and welcome to the Babylon community! That does look weird… are you able to share the model with us, even if not on the playground? A github, dropbox link, anything works!
Thank you for sharing your project! I’m taking a look at it now. The normals do look strange…
(I changed the chair’s materials to the default mesh material to see if it wasn’t anything on the materials side. Also turned off all the lights except one and moved it a bit around)
Opened up the model on Blender to take a look and the normals make a lot more sense here! (Vertex normals in dark blue and face normals in light blue). You can mainly see this in the back of the chair, where they’re actually pointing to the opposite direction instead of up. Since Babylon uses a Left-handed, Y-Up coordinate system by default, and Blender uses a Right-handed, Z-Up one, that would be my prime suspect…
Since there is no clear convention for OBJ files, unfortunately we can only read the values as they are passed. Through, if the entire file were using a different coordinate system, I’d expect the chair itself to also be sideways, not only the normals, so it seems there are two different coordinate systems in the file? But Blender is usually good at fixing this stuff automatically, so I exported the model from Blender to a new obj file, using these settings and the lighting makes sense now:
I forgot to properly import the groups into Blender but I’m going to do that now
But yeah, for issues where the lighting looks “weird”, like in this case where they were lighting the opposite direction, normals are the usual suspects. A good bet for debugging these is checking the “Render Vertex Normals” option in the Inspector, and also simplifying the scene down, like removing materials, turning off all the other lights, etc…
If the normals do look weird, it might be an export issue like that. I usually rely on Blender to fix meshes, since it’s free, but I think any big 3D modeling program should let you chose a coordinate system when exporting.