Cost of chaos overlapping leaves in static world

This question was created in reference to: [Chaos SwapAccelerationStructures expensive with nothing [Content removed]

Hello,

It seems we’re encountering the same or a very similar issue as described in the thread above. Our scene is mostly static, with only a few objects that could potentially move, but I believe nothing is moving at the time of capture.

It appears that overlapping leaves are being updated regardless of whether there are any changes in the scene. Is this expected behavior?

While investigating, I found the following code in CacheOverlappingLeaves(). It seems to indicate that a full update every frame is expected. However, there is no explanation for why the dirty filter is disabled or whether this behavior is intended and supported.

		const bool bDirtyFilter = false;
 
		if(bCachingRoot)
		{
			ComputeOverlappingCacheFromRoot(bDirtyFilter);
		}

This can be even in the range of 0.4-1ms per frame in scene where basically nothing is happening.

Hi Ondrej,

The quick answer is that the AABB tree won’t update unless there is something which triggers an update (ie adding/removing/moving).

The more complex answer is that many things can cause a really expensive AABB update when one is triggered.. even if it doesn’t look like something which could be expensive is happening at first glance.

Would you be able to send across this insights capture and add the ‘counter’ channer as well please?

Best

Geoff Stacey

Developer Relations

EPIC Games

Hi Ondrej,

Reponded on the other ticket :smiley:

Hello Geoff,

I have submitted the trace in a confidential question here [Content removed]

Thank you,