merge the latest chaos visual degugger

Hi,

We aim to get the Chaos visual debugger from version 5.5. Due to substantial engine modifications, upgrading to the latest version isn’t feasible. Our current version is 5.3.2.

<br/>

Is it feasible to merge solely the Chaos visual debugger? Must the entire chaos source code be merged? Additionally, is the Chaos visual debugger stable enough in the latest release?

<br/>

<br/>

Thanks.

Hi, CVD (for short) should be stable in both versions 5.4 (the one we shipped it) and 5.5. In 5.3 part of the code was available but compiled out by default because it was not usable.

CVD is Beta in the sense that not all of the recorded data is exposed in the UI, the UX in general still needs work, and recording of data from some features physics features are not fully supported yet, but is stable to use.

Regrading merging the latest version of the Chaos Visual Debugger into UE 5.3, I have not tried it, but I don’t think it will be easy.

CVD is divided in two systems. The runtime recording implementation, and the Editor implementation.

Both of these rely on existing engine and editor systems, therefore if any of the APIs we use are not longer supported or they had bugs that were fixed by the time we shipped CVD in 5.4, just porting the code will not be enough.

That said in 5.5 version for the editor part (the tool interface), You can compile/cook/and package CVD as standalone program. There is a batch file you can run to get a packaged build located at

Engine\Programs\ChaosVisualDebugger\BuildAndCook.bat(you need to make sure the editor and shader compile worker is compiled first)

Alternatively, you can also build and run the uncooked version from your IDE by building the Chaos Visual Debugger program.

A few notes about doing that

  • We made the standalone program available in UE 5.5, but as experimental. The target release date for a stable version is 5.6, therefore it will be less stable to use than just using the built-in editor version (the one accessible in the editor from Tools-->Debug-->Chaos Visual Debugger).
  • This standalone version of CVD will allow you to only inspect already recording files. The ability to start a recording directly from the UI is not supported in the program version (that is coming in 5.6).

CVD is backwards compatible, this means that you can use the latest version of the Standalone Program or Editor tool side, but work with files recorded as far back UE 5.4 (features that depend on data recorded in newer versions are automatically disabled).

Based on that, if using the standalone version with its limitations like manually having to start/stop recordings using console commands is acceptable for you (Chaos Visual Debugger - User Guide for UE 5.5 | Tutorial), then the only part you need to merge back into 5.3 is the is the runtime side of CVD, but sadly it is not an easy merge because CVD is intertwined with Chaos itself, therefore I can’t confirm how difficult it would be to back port.

If you want to attempt it, the paths you are interested in are

Engine/Source/Runtime/Experimental/Chaos/Public/ChaosVisualDebugger Engine/Source/Runtime/Experimental/Chaos/Private/ChaosVisualDebugger Engine/Source/Runtime/Experimental/ChaosVisualDebugger Engine/Source/Runtime/Experimental/ChaosVDDataIf you have any other questions, just let me know. I will he happy to help with whatever I can

Regards,

Sergio

You are welcome.

Sounds good. I will mark the ticket as pending meanwhile, if it gets closed automatically in the next few weeks (In case there is no any updates before that), feel free to re-open it or starting a new one.

Hi Sergio, thank you so much for such a detailed response.I will try it.

Sure, thanks~​

I just remembered something else you will will have to handle in this merge attempt.

For performance reasons, CVD uses custom serialization an therefore to make CVD backwards compatible, we are using UE Object Version system.

The challenge here is that it is a global system, therefore any changes there will affect all assets. For this reason my advice to handle this is that when you are merging the structs containing the recorded CVD data (located at Engine/Source/Runtime/Experimental/ChaosVisualDebugger), instead of also trying to merge the object version changes, you just remove the custom version conditions and serialize all the data.

For example, instead of

```

if (Ar.CustomVer(FFortniteMainBranchObjectVersion::GUID) >= FFortniteMainBranchObjectVersion::SolverIterationsDataSupportInChaosVisualDebugger)

{

Ar << PositionSolverIterationCount;

Ar << VelocitySolverIterationCount;

Ar << ProjectionSolverIterationCount;

}

```

you do

```

Ar << PositionSolverIterationCount;

Ar << VelocitySolverIterationCount;

Ar << ProjectionSolverIterationCount;

```

Then you will need to do the same in the source files used to build the standalone version of CVD.

I advice not changing the object versions themselves because that will cause issues with migrating assets to newer engine versions later on.

A side effect of this workaround is that CVD files will no longer be shareable to anyone that does not have your custom engine.

great, thanks for these tips​