Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large tilesets produce performance warning when building map #826

Open
argallegos opened this issue Apr 21, 2022 · 1 comment
Open

Large tilesets produce performance warning when building map #826

argallegos opened this issue Apr 21, 2022 · 1 comment
Labels
performance Improvements to performance, including reductions in memory usage

Comments

@argallegos
Copy link
Contributor

argallegos commented Apr 21, 2022

Observed in UE4 and UE5. Forum post here.

Running a map check via building a level or building the lighting results in the following warning:

https://assets.cesium.com/1/1/1/0.terrain?v=1.2.0&extensions=octvertexnormals-metadata mesh 0 primitive 0 Large actor receives a pre-shadow and will cause an extreme performance hit unless bCastDynamicShadow is set to false. 

This same warning is documented on this page.

Some more info, copied from this comment on the UE forums.

Any movable meshes (Mobility == Movable or InterpActor / KActor / SkeletalMeshActor) when combined with stationary lights have to use a special kind of shadow called a Preshadow. This handles the static environment casting dynamic shadows onto the dynamic object. The entire environment between the movable object and the stationary light will have to be rendered into the Preshadow, but only when the movable object actually moves enough to require an update.
If the movable object is very large, and it moves, this can cause the entire scene to have to be re-rendered into the Preshadow depth map. This is what the warning is talking about. This will be both a CPU and GPU cost, however it will only happen for one frame (results are cached until the object moves far enough to invalidate the cache) so it's usually pretty hard to measure. If the movable objects move every frame, it can show up in 'stat shadowrendering' (CPU) or 'profilegpu' (GPU).

If the movable object is only changed occasionally you are probably fine. In the end you just need to make sure your performance is good enough on your target hardware.

In essence, it looks like this may impact performance when tilesets are being moved (as during origin rebasing). If we can find a way to avoid this, we should, but it may be unavoidable with large meshes like Cesium World Terrain.

Looks like most meshes have this bCastDynamicShadow parameter, even if it's not exposed in the Details Panel. We should check to see if this setting can be changed on ACesium3DTileset. If so, we may want to expose it to the Details Panel so that users who are having a problem can disable it.

@argallegos argallegos added the performance Improvements to performance, including reductions in memory usage label Apr 21, 2022
@kring
Copy link
Member

kring commented Apr 22, 2022

FWIW, we don't do origin rebasing anymore in UE5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Improvements to performance, including reductions in memory usage
Projects
None yet
Development

No branches or pull requests

2 participants