Hi,
I am getting the following warning once I run the Map Check in Unreal 5.
https://assets.cesium.com/1/13/11728/4696.terrain?v=1.2.0&extensions=octvertexnormals-metadata upsampled L16-X93825-Y37575 mesh 0 primitive 0 Large actor receives a pre-shadow and will cause an extreme performance hit unless bCastDynamicShadow is set to false.
How can I disable this feature to elimanate this warning?
Hi @leonuk ,
Thanks for the replay. I am not using the cesium sun sky actor and these are the components that I used in this level. I untick the cast dynamic shadow under the Directional light, but still, I am getting that warning.
Thanks for posting about this. I’ve made an issue to track the warning here. The issue also includes some links for further reading on the warning.
I don’t currently have a workaround to suggest, but we will look into it. It looks like this performance hit is most likely to occur when the large actors are moved. If you are experiencing performance issues you may want to avoid moving the Georeference Origin as much as possible.
Unfortunately, after browsing through this post and the issue, I don’t see any workarounds other than “avoid moving the Georeference Origin as much as possible”
Hello all,
I assume that a fix for this is still outstanding (?).
My specific error in UE5.4.4 is:
“CesiumGltfPrimitiveComponent_0 Large actor receives a pre-shadow and will cause an extreme performance hit unless bCastDynamicShadow is set to false”
If this error were to affect an individual mesh, the fix is to disable “Dynamic Shadow” in the details panel. This is not possible for the CesiumGltfPrimitiveComponent_0 as it does not exist within the UE project per se…
If I’m not mistaken, that warning only appears when you attempt to use static “baked” lighting, which is probably not going to work very well in a globe scene anyway. Does that seem correct to you? And, if so, is there a reason that you do need to use baked lighting?
I looked into this a bit. First of all, it’s useful to be clear about what kind of performance problem we’re talking about. The best explanation I could find is here:
TL;DR: there’s a performance problem with large movable objects and static lights. Well, large objects are pretty unavoidable when you’re using Cesium, but you can make a Cesium3DTileset’s Mobility property Static instead of Movable (it’s a property on the Root component of the Cesium3DTileset). Doing so will make these warnings go away.
However, what if you need the tileset to be Movable? Well, even then, there’s only a performance issue if you’re also using static lights. Which would be pretty weird. Maybe just don’t do that?
Unfortunately, Unreal doesn’t seem to care if you’re actually using static lights or not. It still spams this warning for every large component, even though you’re not actually going to see the performance impact it’s warning about.
The only thing we could possibly do on the Cesium side (AFAIK) to fix this is to provide an option to disable shadows on a Cesium3DTileset. But then… you won’t get shadows. So we’d be happy to take a PR to add such an option, but in my experience that’s not really what users are after, either.
So I guess my advice is to ignore the warning. And if you find it bothersome, then maybe raise an issue with Epic to see if they would consider suppressing that warning when you’re not using any static lights.