Eevee next shadow buffer

I just found out something quite annoying about eevee next, and I would like to learn more about it.

I have this huge project from 2021 which was rendered in eevee. Now the client wants to update it a bit and I am doing so in blender 4.5.1 and eevee next.

However I found out that eevee next seems to have a much more restricting “shadows policy”.

The previous project never gave these problems, but now I am often getting shadow buffer full errors and although the renders get to the end there are several frames where the shadows go nuts.

I have a 4090 with 24gb of vram, I increased the shadow pool to 1gb.

Nothing.

I tried to get rid of some lights, or at least deactivate the shadows. Still getting the problem.

At this point I think I have to learn more about how shadows and the buffer works in eevee next. What are the settings which affect the shadows? What other things I could do to avoid this issue?

I am using a lot of new blender feature, so going back to the original version isn’t an option I am afraid (I can’t even remember what it was, probably around 3.0 in 2021?)

I also tried with cycles, however to get rid of noise, while still fast, is about 2-3 times slower than eevee and I have about 23k frames to render so render time is essential

Thank you in advance!

For context:
This is a normal frame

This is a bad frame as you can see also parts of the mesh disappear… is that something related to the shadow problem or shall I also be looking for other issues?

In Eevee Next, the shadow resolution is much higher than it was before and it now defaults to the maximum. Go to the render settings, in the shadow section. There, you will find a global resolution slider. Try reducing it. There is usually quite a bit of room to reduce without it being visually apparent. As a bonus, this will also make the render faster.

The softer your shadows are, the more you should be able to reduce the resolution, because in Eevee next, the shadow map isn’t projected directly onto objects. There is an extra raytracing step that is used to blur it and create the softness, and that blurring will make lower resolutions more forgiving.

While you are in the shadow settings, I would also recommend increasing the “shadow steps” to the maximum of 16. It’s not very expensive to do so and will avoid you the risk of light leaks with softer shadows. However, this has its limits, so I wouldn’t recommend using massive area lights (what you have is fine, but any softer and Eevee next would start to have a hard time).

If you have an important light source that’s very wide and produces extremely soft shadows, you might want to activate jittered shadows on it (also activate it in the main render settings if you want to see the effect in the viewport). This will give you a much higher quality shadow that acts like it used to in old Eevee (stacking hard shadows until they add up to accurate softness). Only do this for important lights that really need it though, as it’s more expensive.

2 Likes

thank you very much for your reply, this is really helpful.

However I’ve noticed something. The vram usage just keeps growing and growing frame after frame, until it saturates the vram and then it seems to free most of it immediately, to then start its rise again.

I have the feeling (will check) that those peaks are when things start to go nuts in my render.

image

I wonder: is this normal? Shouldn’t the vram usage stabilize on a certain level instead of rising like that all the time?

EDIT: even more insteresting. The problem seems to occur only with command line rnedering, not by rendering directly in blender

image

1 Like

Sounds like you have a legit bug here. I haven’t seen such problems, but I have not tried command line rendering with Eevee Next. I can at least confirm it doesn’t when rendering from within Blender.

yes it looks like it’s a bug connected with using vulkan backend. With openGL is fine. However I cannot replicate it on a new blend file so I can’t report it for now. I also learned that it is something apparently devs are aware of.

For now I will have to revert back to openGL for rendering

1 Like