# Light behavior is not correct

Although the normal vectors of the faces looks correct, the way the object is illuminated by the light source is wrong:

As you can see the light source is very close to the left side of the cube, yet it's not fully visible, but the front face is fully visible, and if I look the right side of the cube, I see this:

Which is also...weird.

What am I doing wrong? What and where should I check? If it matters, I generate an .obj file which I import later into Blender.

Here is the .blend file I'm using:

• Have you actually rendered it? You may also consider editing you question and post your .blend file using blend-exchange.giantcowfilms.com – Dontwalk Feb 2 '18 at 7:06
• Why does it matter? By the way, I switched to "Rendered" mode, but it looks like the same. And thanks for the idea to upload the .blend file, haven't knew about this, it's really cool feature. – Arklur Feb 2 '18 at 7:34
• It may not matter... But I was asking questions to try and help you because there wasn't a lot there. I'm sure someone will help especially with the .blend. I don't have time to look at it. Will look again tomm – Dontwalk Feb 2 '18 at 7:40
• Okay, I didn't mean to be "offensive", I was just curious. I know there might be some differences between "Rendered" and "Material" view (e.g. resolution), but likely not how a light source works (against an object). And thanks for the help, hope you (or someone else) will see the problem in it! – Arklur Feb 2 '18 at 7:44
• @Dontwalk someone already answered the question, my normal vectors were wrong (although I don't understand why do they look correct in Blender O.o). – Arklur Feb 2 '18 at 11:13

The light behaviour is working as it should. Your mesh isn't...

You have been playing with the normals of your object, and they are all wrong. They should be perpendicular to each face, but instead they are tangents to the faces. This was probably something you did in python since there's no interface to do it in the UI.

For a quick fix:

Properties Editor> Object Data> Geometry Data> Clear Custom Split Normals Data

I advise you to review your python code to avoid future situations like this one.

• Indeed that was the problem. But what I don't understand is why does it look like the normal vectors are correct? – Arklur Feb 2 '18 at 11:12
• The Face Normals drawing in the viewport just shows the normals of the Face. But these are overriden by the normals stored in the face loops (custom nornals)...If you change to 'show vertex-per-face normals', you'll notice the oddity of them, as they are rotated 90º CW in the Z axis. – Secrop Feb 2 '18 at 11:26
• Oh, I see now: i.imgur.com/7KIj6Qs.png. Thanks again for the help, you likely saved many hours for me! – Arklur Feb 2 '18 at 11:43