The problem with displaying the faces

Hello, there is a problem, I took the code from the example to create a complex shape, and when light falls on a plane, the shadow line does not fall on the face of the plane, but on its diagonal, which makes the edges seem out of place. Please tell me, is this a problem in the incident of light or the construction of the figure and how it can be solved?

it’s just the way you’ve setup lighting,
here’s some revolving light to show different orientations and converted to flat shaded to visualize better.

2 Likes

Hello and welcome :slight_smile:

It’s a problem mainly due to the use of smooth shading on a hard angles.
Smooth shading makes so that the normal along the surface is interpolated from a face to another. It’s ok when the angles between two faces is very narrow, for example a sphere :


But for wide angles, such as a cube, it will always look very bad

This behavior is not a bug, it’s the known behavior when interpolating normal along 90° angles :slight_smile:

2 Likes

oh my bad I misread the post I thought edges being dark was the problem lol