Description

Workaround 1:
1. Change HierarchicalInstancedStaticMesh.cpp in either of the following ways:
void{{ FHierarchicalStaticMeshSceneProxy::GetDynamicMeshElements(const TArray<const FSceneView*>& Views, const FSceneViewFamily& ViewFamily, uint32 VisibilityMap, FMeshElementCollector& Collector) const}}
{{{}}
    ...
    // Modification begin
    // const FMatrix WorldToLocal = GetLocalToWorld().Inverse();
    const FMatrix WorldToLocal = GetLocalToWorld().Inverse().GetMatrixWithoutScale();
    // Modification End
    ...
}

Or:
void FHierarchicalStaticMeshSceneProxy::GetDynamicMeshElements(const TArray<const FSceneView*>& Views, const FSceneViewFamily& ViewFamily, uint32 VisibilityMap, FMeshElementCollector& Collector) const
{{{}}
    ...
    FBoxSphereBounds ScaledBounds = RenderData->Bounds.TransformBy(FTransform(FRotator::ZeroRotator, FVector::ZeroVector, AverageScale));
    // Added line begin
    ScaledBounds = ScaledBounds.TransformBy(FTransform(FRotator::ZeroRotator, FVector::ZeroVector, GetLocalToWorld().Inverse().GetScaleVector()));
    // Added Line end
    float SphereRadius = ScaledBounds.SphereRadius + InstanceParams.MaxWPODisplacement;
    ...
{{}

}}2. Perform the test again. Observe the small boxes do not disappear.
3. Change the view mode to "Mesh LOD Coloration". Observe the small boxes and large boxes change LODs at the same distance, despite having different screen sizes.

Workaround 2:
1. Select the HISM Blueprint actor, then the HISM component.
2. Assign any material to the component (WorldGridMaterial works)
3. Perform the test again. Observe the boxes do not disappear.
4. Change the view mode to "Mesh LOD Coloration". Observe the small boxes and large box change LODs at different distances, correctly for their screen size

Steps to Reproduce

1. Download the Licensee repo and open (link in comments)

2. Move the camera closer to and further away from the boxes on the floor.
3. Observe the small boxes disappear at LOD transitions.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-201514 in the post.

1
Login to Vote

Unresolved
ComponentUE - Rendering Architecture
Affects Versions5.3
Target Fix5.5
CreatedNov 29, 2023
UpdatedDec 12, 2023