Description

Using HISM with Density Scaling enabled throws an Ensure when Foliage Quality is lowered.

Steps to Reproduce
  1. Open any project
  2. Create a Public C++ class based on Actor named 'FooActor'
  3. In the .h file:
    • UCLASS(Blueprintable)
      class AFooActor : public AActor
      {
         GENERATED_BODY()
         
      public:
         
         AFooActor(const FObjectInitializer& ObjectInitializer);
      
         UPROPERTY(VisibleAnywhere)
         UHierarchicalInstancedStaticMeshComponent* HISM;
      };
  1. In the .cpp:
    • Add this code in the constructor
      AFooActor::AFooActor(const FObjectInitializer& ObjectInitializer)
         : Super(ObjectInitializer)
      {
         HISM = CreateDefaultSubobject<UHierarchicalInstancedStaticMeshComponent>("HISM"); 
         HISM->bEnableDensityScaling = true; 
      }
  1. In the Editor navigate to the C++ classes in the content browser
  2. Create a BP based off of FooActor
  3. In the Blueprint select the HISM Component
  4. In the Details Panel:
    • Search for 'Static Mesh' add a Cone or any mesh
    • Search for 'Instances' then in the Instances Array add 3 elements
    • Compile, save, and close the blueprint
  5. Place the Blueprint Actor in the world
  6. Near the top right corner of the editor select Settings(cog symbol)/Engine Scalability
  7. Set Foliage Quality to Low

Expected Results:
Foliage quality is changed to low.

Actual Results:
Editor crashes with an Ensure Condition

Callstack

FInstancedStaticMeshSceneProxy::SetupProxy(UInstancedStaticMeshComponent *) InstancedStaticMesh.cpp:1465
FInstancedStaticMeshSceneProxy::FInstancedStaticMeshSceneProxy(UInstancedStaticMeshComponent *,Type) InstancedStaticMesh.h:552
FHierarchicalStaticMeshSceneProxy::FHierarchicalStaticMeshSceneProxy(UHierarchicalInstancedStaticMeshComponent *,Type) HierarchicalInstancedStaticMesh.cpp:835
UHierarchicalInstancedStaticMeshComponent::CreateSceneProxy() HierarchicalInstancedStaticMesh.cpp:3181
FScene::AddPrimitive(UPrimitiveComponent *) RendererScene.cpp:1429
UPrimitiveComponent::CreateRenderState_Concurrent(FRegisterComponentContext *) PrimitiveComponent.cpp:596
UStaticMeshComponent::CreateRenderState_Concurrent(FRegisterComponentContext *) StaticMeshComponent.cpp:762
UActorComponent::RecreateRenderState_Concurrent() ActorComponent.cpp:1753
UActorComponent::DoDeferredRenderUpdates_Concurrent() ActorComponent.cpp:1826
<lambda_5ad2784f0b47a9781929105b02f294f7>::operator()() LevelTick.cpp:1163
UWorld::SendAllEndOfFrameUpdates() LevelTick.cpp:1180
UReflectionCaptureComponent::UpdateReflectionCaptureContents(UWorld *,const wchar_t *,bool,bool,bool) ReflectionCaptureComponent.cpp:1075
FPreviewScene::UpdateCaptureContents() PreviewScene.cpp:205
FThumbnailPreviewScene::Tick(float) ThumbnailHelpers.cpp:157
FTickableEditorObject::TickObjects(const float) TickableEditorObject.h:44
UEditorEngine::Tick(float,bool) EditorEngine.cpp:1538
UUnrealEdEngine::Tick(float,bool) UnrealEdEngine.cpp:513
FEngineLoop::Tick() LaunchEngineLoop.cpp:5297
EngineTick() Launch.cpp:62
GuardedMain(const wchar_t *) Launch.cpp:188
LaunchWindowsStartup(HINSTANCE__ *,HINSTANCE__ *,char *,int,const wchar_t *) LaunchWindows.cpp:279
WinMain(HINSTANCE__ *,HINSTANCE__ *,char *,int) LaunchWindows.cpp:337
[Inlined] invoke_main() 0x00007ff60d70fad6
__scrt_common_main_seh() 0x00007ff60d70fab5
<unknown> 0x00007ffb1e8854e0
<unknown> 0x00007ffb1fcc485b

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - Graphics Features
Affects Versions5.0
Target Fix5.1
Fix Commit21285048
CreatedApr 5, 2022
ResolvedAug 9, 2022
UpdatedAug 14, 2022