Even though we freeze screen size LOD collector in the middle of ragdoll/death animation this is no guarantee that the LOD will be frozen. This can lead to jank if actor switches to ISM in middle of ragdoll. The reason there's no guarantee LOD will be frozen is because we freeze closest viewer distance instead of LOD currently because it was easier to implement.
Solution:
[ ] Instead of freezing closest viewer distance (we do this with FMassFreezeScreensizeLODTag), freeze the LOD if entity is an actor with a custom LOD calculator. Currently we use UE's TMassLODCalculator via FMassVisualizationLODSharedFragment which is used by UMassVisualizationLODProcessor::Execute, which is called from UMassCrowdVisualizationLODProcessor::Execute's call to Super::Execute. So we need to create our own version of UMassCrowdVisualizationLODProcessor. We may need a new trait for visualization so that instead of adding FMassVisualizationLODSharedFragment we add our own fragment which has a reference to our custom LOD calculator.
[ ] Our own version of UMassCrowdVisualizationLODProcessor will use our custom LOD calculator instead of TMassLODCalculator. You could potentially reuse TPMMassLODCalculator for this and just modify it.
[ ] This could mean lots of entities will be high LOD even if they shouldn't but since they're dying/dead maybe it's OK, we'll have to test it out.
[ ] To improve performance, after the death ragdoll completes we should disable actor tick, anim BP tick, and skeletal mesh tick.
[ ] When death requires impulse (e.g. tank HE shell) always force actor so we get ragdoll. We may already be doing this, so just verify it doesn't break with these changes.
Even though we freeze screen size LOD collector in the middle of ragdoll/death animation this is no guarantee that the LOD will be frozen. This can lead to jank if actor switches to ISM in middle of ragdoll. The reason there's no guarantee LOD will be frozen is because we freeze closest viewer distance instead of LOD currently because it was easier to implement.
Solution:
Video of issue:
https://github.com/user-attachments/assets/7a69c6e9-40a4-4fbf-a724-6efb464b4b37