USkinnedMeshComponent::GetDesiredSyncLOD returns MeshObject->MinDesiredLODLevel + LODBias with no clamp (SkinnedMeshComponent.cpp, //UE6/Main [Content removed] which ILODSyncInterface::GetDesiredSyncLOD documents as “the desired LOD is not known”.
ULODSyncComponent::UpdateLOD skips any driver with DesiredSyncLOD < 0 (LODSyncComponent.cpp line 221). When every driver wants LOD0 there is no valid setting, so UpdateLOD makes no SetForceStreamedLOD or SetForceRenderedLOD calls, and every synced component keeps the forced LOD from the last frame that had a valid driver. Since LOD streaming support was added to LODSync in 5.4, that forced rendered LOD is the best LOD available on all components on that frame. With streaming, the group can lock onto LOD2 or LOD3 and stay there for as long as the driver wants LOD0. For us this showed up as close-up characters on console rendering low LODs indefinitely, while the editor (bias 0) looked fine.
The component’s own LOD selection clamps the same sum: UpdateLODStatus_Internal (line 4909) uses FMath::Clamp(MinDesiredLODLevel + LODBias, 0, MaxLODIndex). A positive bias has a related problem: GetDesiredSyncLOD can return a value past NumLODs - 1. With a CustomLODMapping, GetSyncMappingLOD (LODSyncComponent.cpp line 352) passes an out-of-range source LOD through unmapped before UpdateLOD clamps it at line 255, so the group can sync to a different LOD than the driver renders.
Anyone using LODSyncComponent with a negative r.SkeletalMeshLODBias hits this. That bias is a scalability CVar and a common way to reduce LOD popping on consoles. Still unclamped in //UE5/Main [Content removed] and in 5.7 and 5.8.
Suggested fix, in USkinnedMeshComponent::GetDesiredSyncLOD:
- return MeshObject->MinDesiredLODLevel + LODBias;
+ return FMath::Clamp(MeshObject->MinDesiredLODLevel + LODBias, 0, GetNumLODs() - 1);
This is safe because MinDesiredLODLevel is never negative, so INDEX_NONE still only comes from the no-asset / no-MeshObject branch, and LODSync is the only engine caller. We are shipping this locally.
Workarounds: r.ForceLOD, ULODSyncComponent::ForcedLOD, or not using a negative r.SkeletalMeshLODBias.
[Attachment Removed]