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?
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.
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