The Geometry Collection fragment is stretched when play the Chaos cache

Hi all, I have a problem with learning Chaos Destruction recently, please help me to solve it. thanks.

The Unreal Engine version I am using is 5.02

I shattered the object based on the documentation and applied some force fields. When I use ChaosCacheManage to generate a cache and use ChaosCachePlayer to load and play it, some small fragments have behaviors that do not conform to the simulation, as shown in the video below, such as it is stretched or flashes for unknown reasons. Does anyone know why? How should I avoid this bad result?

The same problem exists in sequence.

I have the same issue in 5.1, the recorded Chaos cache has errors that weren’t in the simulation - clusters of pieces in the wrong place.

Hi
Are you seeing the issue if you use this console command ?

p.Chaos.Cache.UseInterpolation 0

If you still do, are you using asynchronous physics?

Cedric

I’ve tried the console command, tried setting True Tick Physics Async and Substepping Async and Enabled Enhanced Determinism.
Although the sim is more acurate the issue with cache playback in sequencer is still there.
Here are 2x quicktimes, 1 of the sim and the other of the cache.

It looks like the 3rd level of the fractor has an offset. Any ideas - solutions would be appreciated.


R.

This may be two different issues:
5.0.2 did not have the following change that is in 5.1 ( this could be alleviated by disabling interpolation and disabling async physics )
https://github.com/EpicGames/UnrealEngine/commit/2a33802ae20d6737b07e781b45926d5d465e4616

5.1 has another issue that has been solved with this change ( that will be in the next patch )
https://github.com/EpicGames/UnrealEngine/commit/f809f5df2ab79675c13f1ecc55ecb09f6cac12cf

Hope this helps

Cedric

1 Like

This worked, thanks for the solution.

1 Like

Hi CedUE - I think i am having the same problem as this. Could you tell me where to change the settings for Async and interpolation. The github links above no longer work

Hi, I was also experiencing this issue, and I can confirm that setting p.Chaos.Cache.UseInterpolation 0 works, but since it disables interpolation it can result in teary simulation, especially in slow motion. I found a workaround, but it requires a custom engine build:

In the ChaosCache.cpp FParticleTransformTrack::Evaluate you need to replace the

Result.Blend(TransformA, TransformB, Alpha);

with:

const FTransform NA = TransformA;
FTransform NB = TransformB;
	
if ((NB.GetRotation() | NA.GetRotation()) < 0.0f)
{
	NB.SetRotation(NB.GetRotation() * -1.0);
}
Result = (FDualQuat(NA)*(1 - Alpha) + FDualQuat(NB)*Alpha).Normalized().AsFTransform(FMath::Lerp(NA.GetScale3D(), NB.GetScale3D(), Alpha));

and include on top of the file.

#include "Math/DualQuat.h"

(You can also remove const from TransformB local variable from the function and use TransformA and TransformB variables instead of copying values into NA and NB, but I’ve wanted to keep the changes to the engine code minimal and in one place.)

This results in buttery smooth caches without any artifacts. I’m honestly not sure why the normal blend function is causing troubles, but using dual quaternion interpolation seems to fix the issue. Btw I’ve copied the code for it from UKismetMathLibrary::TLerp, so don’t even ask me how it works :DD

1 Like

Thank you @SouryGame,
I’m going to create an internal ticket so we fix that for incoming releases

1 Like

Hi

I have now submitted changes in the UE5/Main branch where the replay interpolation method can be changed on the cache collection asset

Here’s the github link :

https://github.com/EpicGames/UnrealEngine/commit/479bfc51575acfc1559ffa9e50d418a94ac8a5f6