Weird shadows with Orthogonal Camera3D

Godot Version

Godot 4.3

Question

Hello people,

I have recently changed my Camera3D to Orthogonal and started having problems with some weird shadows, more precisely these shadowed stripes that are visible in the game screen.

My game is not as dark as in the screenshots, but I started “turning off” the lights to check which one was causing the issue. Unfortunately I could not pinpoint the problem to any light source (I am using a DirectionalLight3D, a WorldEnvironment with Sky reflections and also some light points (OmniLight3D) inside the scene. Even if I turn off all of them I can still see these weirs shadow stripes.

The shadows follow the character as he moves and they are lerping behind him, which made me think that this is somehow related to the Camera3D (that has a lerp behavior to follow the character). At the same time, changing the camera angle doesn’t keep the shadow stripes aligned with the camera (it seems aligned with the top of the character), so I don’t know.

My camera is attached to a SpringArm3D that has a SeparationRayShape3D shape. Using the smae SpringArm + Camera in Perspective does not generate these shadows artifacts. The artifacts are not seen in the Editor as well. It is visible only when the game runs.

I have tried tweeking the Far distance of the camera as I have found some references online about the interaction of the orthogonal camera Far distance and shadows, but it totally didn’t help. I see the shadows behavior changing when I change the Far distance, but the artifacts are still there.

I have lost many hours on it and any help on this issue is appreciated :slight_smile:

So, I finally got to at least find out what was my problem. I had SDFGI enabled in my WorldEnvironment and apparently it doesn’t interact well with the orthogonal camera. Might be a bug, might be a me problem, idk :smiley: But I tried to tweak the SDFGI values in the inspector but it didn’t help. Every time I got to values where the stripes didn’t show up, I was also not getting the visual effects I wanted.

What I did was disabling SDFGI and now I am working with SSIL, trying to get to similar visuals. Not quite the same, but it’s good enough for what I want, I would say.