Godot Version
4.4.1.stable
Question
Mesh3D cast shadows appear incorrect
Hi.
I’m using a Mesh3D that generates the terrain for my map. Here’s what that looks like:
I spent some time and added elevation in a really simple way, with individual hexagons having random elevation.
I have then added a directional light 3D. My thinking was to animate the rotation of the directional light to act as a simple day/night indicator for the game, with the terrain casting shadows.
However I’m unhappy with the shadows. For example what I circled above. The terrain to the left of the red circle should be casting a shadow facing NE-ish. This appears to kinda be happening, since you can see the end of the shadow, however, at the self-shaded base of the tile (in the rear side), its not only not shaded, it appears bright.
Is there an issue with the approach with directional light, or some issue with my Mesh?
Here’s some extra info:
- I dont’ provide normals for the mesh to the
add_surface_from_arrays
call, just vertices. Would computing normals help here? - Ideally I’d like shadows to end up looking nice and crisp like the example shown here: https://www.wolfire.com/blog/2008/11/high-detail-terrain-shadows/ . I understand the terrain detail is much higher there, but the current approach I have feels much much worse.
- I have the directional shadow max distance set to 8192. The terrain maps I’m generating are much bigger than this is there a way I can increase this, or have some different solution ?