Contact shadows only appear at certain zoom levels, changing bias/distance/thickness doesn't help

I have a scene lit with an HDRI and a sun light. I’m not great at lighting, so this is my usual setup with no problems, but I’m having a problem today. The difference between two zoom levels (one scroll of the MMB):

2022-10-17 11_07_06-Window
2022-10-17 11_07_02-Window

This isn’t just a viewport annoyance- this is unfortunately affecting my camera view as well:

2022-10-17 11_07_19-Window

I have contact shadows turned on on the sun light, and I’ve tried changing the settings for that. They make a difference, but it’s not a good one:

No combination of those three settings gives me anything other than that, and the shadow in question should look like this:

2022-10-17 11_09_03-Window

For completeness, here’s my HDRI setup:

I’m inclined to think this is a scaling issue- I’m working in real-world units across a space of about a third of mile square, which is a lot- is that level of distance more than Eevee can handle, or am I missing something?

If anyone wants the file to take a look at, let me know - I have a bunch of sculpting brushes saved in it (about 34 MB worth) that prevent me from making this small enough to upload directly, but I can always use WeTransfer :slight_smile:

Did you try changing the clipping settings? Does that make any difference?

1 Like

On the camera? Yeah, no difference. Or is there a way to change that for the light?

The problem is that I don’t understand much about Eevee. I will try to find some ideas here. :joy::joy:

1 Like

Do you see the clipping properties on she shadows setings of the light? Don’t that change anything?

Oh, Now I see I am only repeating what you said. :joy::joy::joy::joy: That doesn’t change anything. That’s really strange. That’s why I thought it could be a clipping problem. Like those that affect the viewport and make geometry look scrambled.


I do not:
2022-10-17 12_38_23-Window
Am I looking in the wrong place?

Oh. I had the wrong light type selected. That only appears for point lights and not sun.

1 Like

It also happens here. If I zoom it further after certain distance the shadows disappear.

1 Like

So it’s a bug, or a feature :thinking: I’m going to wait for someone else to weigh in before making a bug report, but if this really is a bug, I’m going to be really unhappy about it. This essentially makes it impossible to make real-size scenes in Eevee

It really looks more like a clipping, as I said. I was lucky and the zoom factor had the coincidence to catch exactly the point where the shadows start to disappear. This shadow was supposed to be a square, but a side of it is “clipped”.

1 Like

Clipping distance has no effect for me:

Increasing the minimum clipping distance solved the problem in the viewport.

Edit, Actually, id did for a few centimeters, but doesn’t solve the problem. It seems to be one of the limitations of Eevee.

1 Like

Not for me, sadly:

I can’t begin to believe that a modern rendering engine can’t handle shadows at a distance of a third of a mile. I’m confident I’ve seen people making bigger scenes than this in Eevee with no issues :thinking:

Is it possible that they made everything in a smaller scale?

1 Like

The docs say that:

The distance of action of Contact Shadows should remain quite small. They are not accurate enough to shadow the entire scene.

But there’s no real solution provided. How are you supposed to light a scene with contact shadows if contact shadows only work for a small portion of it? :thinking:

1 Like

Role of Contact shadows is to add small shadows for small details.

Something as big as a tree should produce a shadow with contact shadows turned off.

From your screencapture, it looks like your scene has a depth over 500 meters.
But Max Distance of Cascaded Shadow Map is set to 200 meters.

Just set Max Distance value for Cascaded Shadow Map equal to depth of your scene.


That worked perfectly, thank you! I knew there had to be a simple solution to this. @Calandro thanks for your help as well :slight_smile:

1 Like

Yes, that explains the clipping effect.

1 Like