Error with a shadow on a custom model

I recently returned to godot and made a low poly model of a bridge with a rim for a test scene. The DirectionalLight3D sun, placed in a separate node, gives a shadow in the place of this rim and as you can see, if you compare the shadow of the character’s capsule and the bridge, you see that the shadow is very uneven and if you move the camera away, it’s even worse, resulting in this effect. I have never loaded my models into the editor before, so maybe I missed something. My model has the following characteristics:

  1. Low poly and made in blender.
  2. No scan or material and smoothing when exporting.
  3. Exported to obj and added as a mesh in MeshInstance3D.

The image clearly shows that the built-in mesh in godot casts a normal shadow, so I think it’s the model’s fault.

Try with a CSGBox3D similar to the edge of your model ? Just to see if the issue is the model or not.

1 Like


Apparently, the plane of my bridge somehow distorts the end of the shadow, if you put CSGBox3D, its shadow that falls on the plane of the bridge will also be distorted at the end. In the example of the character capsules, this is not visible because their shadow end falls outside the bridge.

I can try to attach the model if it helps somehow.

Try with a Godot simple plane mesh to see if you have the same issue

You can try to tweak with shadow rendering (bake a LightMap, increase resolution somehow…), or try to increase/decrease number of vertices on the bridge plane

1 Like

I’ve packed the model file, so you may be able to check it in the editor. The Plane mesh casts the same shadow with jagged edges. Baking it didn’t solve the problem and nothing changed at all.