My current set up is using cascaded shadow maps and once you are within the dynamic shadow range, those dynamic shadows kick in. However, on some objects, the dynamic shadows ruin the look. It would be great if those objects could just stick with their baked shadows.
I’ve queried some AI models and they are confident that I just need to tick dynamic shadow off. However, that results in no shadow at all when I’m in the dynamic shadow range.
The AI models are half-right, here. There are three different light types, static, stationary, or dynamic. You’d want stationary, where static objects have baked shadows and dynamic objects have dynamic shadows. If you want an object to have a baked shadow, then you set it to static and it will get one. You shouldn’t need to mess with those settings per se.
But once you get in range of the “Dynamic Shadow Distance”, their baked shadows are replaced with dynamic shadows. Even though they are static objects.
Even if you turn dynamic shadows off, their shadows are just removed entirely.
This can only be done by disabling cascaded shadowmaps (set dynamic shadow distance to 0) on the directional light and use inset shadows instead.
Most of the time, CSM will be more performant, unless you have a very small number of instances that need to cast dynamic shadows (like fewer than 10). So it’s generally better to just accept that the CSMs will replace the stationary shadows.