Description

Crumbling Geometry collection do not render for one frame when child clusters crumble. In the repro project a 4 particle GC is told to crumble. The single GeometryCollectionActor is then split into 2. After some time those 2 children of GC_CrumbleRepro also get crumbled. In that single frame the GC_CrumbleRepro is not rendered.

I've debugged the scene using Chaos Visual Debugger and during the entire execution the physics scene displays the particles correctly so it does not look like a physics issue (will attach it to the report). I've also made a capture using RenderDoc the moment the GC does not render and will attach it too.

The licensee pointed out that the reason for this behavior is that the geometry collection component ticks during physics, so when it calls BreakClusters_External(), the physics doesn't actually break until the following frame, so on the same frame the clusters have been removed but their children have not been activated yet. I'll attach the call stack for BreakClusters_External() when called the second time too.

Steps to Reproduce

Option 1: Use the repro project

  • Open the CrumbleRepro map
  • Open the level blueprint and put a breakpoint on Crumble Cluster which is executed on BeginPlay
  • Start PIE to trigger the breakpoint
  • Press Advance Single Frame many times: about 30-40 times.
    • Observe: at one point you should see a frame where the objects are not rendered. Next frame they do render again.
    • Expected: The objects render uninterrupted

Option 2: Clean repro steps

  • Create a New Level using the Basic Template
  • Add a Cube blueprint to the level
  • Set scale to (1,4,1)
  • Select it and activate Fracture Mode (SHIFT+6)
  • Press New - save the new GC preferably in your project folder
  • Select Fracture>Slice
  • Slicing> X = 0, Y = 1, Z = 0
  • Press Fracture - that will split it in 2 and add one level
  • On Fracture Hierarchy select the first child and press Fracture so it further splits into 2, repeat for the second child - we end up with two levels of particles, 4 in total
  • Select a fracture level 1 and in Utilities go to Set Removal-On-Break Parameters
  • Set Remove On Break> Enabled = true; Cluster Crumbling = true
  • Apply removal-on-break parameters
  • Repeat the process for the second level 1
  • Open up the Level Blueprint with the GC_... selected and right-click and "Create a reference to GC_..."
  • Pull from it and "Get Geometry Collection Component"
  • Pull from that and "Apply Linear Velocity" just to not let the physics body go to sleep
  • Also pull from the Geometry Collection Component and call "Crumble Cluster" - this will make the clustering progressively crumble
  • Call this from the level blueprint Begin Play
  • Back on the level, press Play (Play this level in the active level editor viewport) and immediately press Pause
  • Press Advance Single Frame many times: about 30-40 times on my local machine.
    • Observe: at one point you should see a frame where the objects are not rendered. Next frame they do render again.
    • Expected: The objects render uninterrupted
Callstack

>    UnrealEditor-Chaos.dll!FGeometryCollectionPhysicsProxy::BreakClusters_External(TArray<FGeometryCollectionItemIndex,TSizedDefaultAllocator<32>> && ItemIndices) Line 2451    C++
     [Inline Frame] UnrealEditor-GeometryCollectionEngine.dll!FGeometryCollectionDecayContext::Process(FGeometryDynamicCollection & DynamicCollection) Line 6455    C++
     UnrealEditor-GeometryCollectionEngine.dll!UGeometryCollectionComponent::IncrementBreakTimer(float DeltaTime) Line 6648    C++
     UnrealEditor-GeometryCollectionEngine.dll!UGeometryCollectionComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction) Line 3476    C++
     [Inline Frame] UnrealEditor-Engine.dll!FActorComponentTickFunction::ExecuteTick::__l2::<lambda_1>::operator()(float) Line 1172    C++
     UnrealEditor-Engine.dll!FActorComponentTickFunction::ExecuteTickHelper<`FActorComponentTickFunction::ExecuteTick'::`2'::<lambda_1>>(UActorComponent * Target, bool bTickInEditor, float DeltaTime, ELevelTick TickType, const FActorComponentTickFunction::ExecuteTick::__l2::<lambda_1> & ExecuteTickFunc) Line 4573    C++
     UnrealEditor-Engine.dll!FActorComponentTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 1170    C++
     UnrealEditor-Engine.dll!FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 278    C++
     UnrealEditor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool bDeleteOnCompletion) Line 1235    C++
     [Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & CurrentThread, ENamedThreads::Type) Line 840    C++
     UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 760    C++
     UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilIdle(int QueueIndex) Line 662    C++
     UnrealEditor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 573    C++
     UnrealEditor-Engine.dll!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 1583    C++
     UnrealEditor-Engine.dll!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 772    C++
     UnrealEditor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1514    C++
     UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 2015    C++
     UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 550    C++
     UnrealEditor.exe!FEngineLoop::Tick() Line 5921    C++
     [Inline Frame] UnrealEditor.exe!EngineTick() Line 61    C++
     UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 180    C++
     UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 247    C++
     UnrealEditor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 298    C++
     [External Code]    

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Simulation - Physics - Destruction
Affects Versions5.4.4
Target Fix5.6
Fix Commit37471370
CreatedOct 3, 2024
ResolvedOct 25, 2024
UpdatedNov 7, 2024
View Jira Issue