How to configure the Chaos Destruction Demo for the 4.26-Chaos Preview

So you’ve downloaded the Unreal Engine 4.26-Chaos Preview build and the Chaos Destruction Demo, but how do you get started?

Currently, the 4.26 version of the Chaos Destruction Demo is configured to be built alongside a source build of 4.26. Because PhysX is the underlying physics engine in 4.26, you’ll need to enable Chaos and then re-build, so that the project gets a full editor build and doesn’t attempt to share the base editor binary.

To run the Chaos Destruction Demo project, the target scripts will need to be modified to no longer set up those flags, as everything should be set correctly in 4.26-Chaos Preview.

Three easy steps [ol]
[li]Download ChaosDestructionDemoEditor.Target.cs and ChaosDestructionDemo.Target.cs here[/li][li]Find the original files:[LIST=1][/li][li]…/ChaosDestructionDemo/Source/ChaosDestructionDemo.Target.cs[/li][li]…/ChaosDestructionDemo/Source/ChaosDestructionDemoEditor.Target.cs[/li][/ol]
[li]Replace the original files with the new files you downloaded and voila![/li][/LIST] Alternatively…

You can copy the code below over the code in each file:

…*/ChaosDestructionDemo/Source/ChaosDestructionDemo.Target.cs


// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class ChaosDestructionDemoTarget : TargetRules
{ public ChaosDestructionDemoTarget(TargetInfo Target) : base(Target)
{
  [INDENT=2]Type = TargetType.Game;

ExtraModuleNames.AddRange( new string[] { "ChaosDestructionDemo" } );[/INDENT]
  }
 
 }


…*/ChaosDestructionDemo/Source/ChaosDestructionDemoEditor.Target.cs


// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class ChaosDestructionDemoEditorTarget : TargetRules
{ public ChaosDestructionDemoEditorTarget(TargetInfo Target) : base(Target)
{
  [INDENT=2]Type = TargetType.Editor;

ExtraModuleNames.AddRange( new string[] { "ChaosDestructionDemo" } );[/INDENT]
  }
 
 }


In //UE4/Release-4.26-Chaos/Engine/Source/Programs/UnrealBuildTool/Configuration/TargetRules.cs, the base target rules already have the correct flags set, so any binary generated there will have the correct code compiled in. Since both the binary and the new project now have matching configurations, we can remove all the flags and the unique build environment.

7 Likes

So does this require building the editor from source or not?

Because after replacing these files the editor still complains that ChaosDestructionDemo module is missing or built for a different version of the engine, and attempting to rebuild them results in an error stating they could not be compiled and suggests rebuilding from source manually.

1 Like

https://forums.unrealengine.com/unreal-engine/announcements-and-releases/1843949-unreal-engine-4-26-chaos-preview-now-available-on-the-epic-games-launcher

1 Like

This is not an answer to my question.

Were you able to get this to work using the 4.26-Chaos preview available from the launcher? Because that’s what I tried using and got the results I posted.

1 Like

Figured it out

Really should have known, but it’s a C++ project so you have to build the project files for it (and it means you need to have Visual Studio installed)

After following the steps above, right click on the ChaosDestructionDemo.uproject and select “Switch Unreal Engine version…”, pick 4.26Chaos from the list and wait for it to build the sln. Now you can launch the project and it will correctly build the module.

Perhaps this should have been obvious but I think it should have been included in the original post.

6 Likes

Building ChaosDestructionDemoEditor…
Using Visual Studio 2017 14.13.26131 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128) and Windows 10.0.18362.0 SDK (D:\windowssdk).
[Upgrade]
[Upgrade] Using backward-compatible build settings. The latest version of UE4 sets the following values by default, which may require code changes:
[Upgrade] bLegacyPublicIncludePaths = false => Omits subfolders from public include paths to reduce compiler command line length. (Previously: true).
[Upgrade] ShadowVariableWarningLevel = WarningLevel.Error => Treats shadowed variable warnings as errors. (Previously: WarningLevel.Warning).
[Upgrade] PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs => Set in build.cs files to enables IWYU-style PCH model. See IWYU | Unreal Engine Documentation. (Previously: PCHUsageMode.UseSharedPCHs).
[Upgrade] Suppress this message by setting ‘DefaultBuildSettings = BuildSettingsVersion.V2;’ in ChaosDestructionDemoEditor.Target.cs, and explicitly overriding settings that differ from the new defaults.
[Upgrade]
Building 9 actions with 16 processes…
@progress ‘Compiling C++ source code…’ 0%
@progress ‘Compiling C++ source code…’ 11%
[1/9] Default.rc2
@progress ‘Compiling C++ source code…’ 22%
[2/9] SharedPCH.Engine.cpp
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C3520: ‘ArgTypes’: parameter pack must be expanded in this context
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: see reference to function template instantiation ‘T &&DeclVal(void)’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Math/IntPoint.h(557): note: see reference to class template instantiation ‘TTuple<>’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C2672: ‘DeclVal’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C2893: Failed to specialize function template ‘T &&DeclVal(void)’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): note: With the following template arguments:
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): note: ‘T=ArgTypes &&’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C3546: ‘…’: there are no parameter packs available to expand
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C2672: ‘UE4Tuple_Private::ConstructibleConceptCheck’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C3520: ‘OtherTypes’: parameter pack must be expanded in this context
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: see reference to function template instantiation ‘T &&DeclVal(void)’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C2672: ‘DeclVal’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C2893: Failed to specialize function template ‘T &&DeclVal(void)’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): note: With the following template arguments:
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): note: ‘T=OtherTypes &&’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C3546: ‘…’: there are no parameter packs available to expand
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C2672: ‘UE4Tuple_Private::ConstructibleConceptCheck’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C3520: ‘OtherTypes’: parameter pack must be expanded in this context
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: see reference to function template instantiation ‘T &&DeclVal(void)’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C2672: ‘DeclVal’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C2893: Failed to specialize function template ‘T &&DeclVal(void)’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): note: With the following template arguments:
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): note: ‘T=const OtherTypes &’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C3546: ‘…’: there are no parameter packs available to expand
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C2672: ‘UE4Tuple_Private::ConstructibleConceptCheck’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C3520: ‘OtherTypes’: parameter pack must be expanded in this context
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: see reference to function template instantiation ‘T &&DeclVal(void)’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C2672: ‘DeclVal’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C2893: Failed to specialize function template ‘T &&DeclVal(void)’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): note: With the following template arguments:
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): note: ‘T=const OtherTypes &’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C3546: ‘…’: there are no parameter packs available to expand
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C2672: ‘UE4Tuple_Private::AssignableConceptCheck’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C3520: ‘OtherTypes’: parameter pack must be expanded in this context
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: see reference to function template instantiation ‘T &&DeclVal(void)’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C2672: ‘DeclVal’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C2893: Failed to specialize function template ‘T &&DeclVal(void)’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): note: With the following template arguments:
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): note: ‘T=OtherTypes &&’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C3546: ‘…’: there are no parameter packs available to expand
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C2672: ‘UE4Tuple_Private::AssignableConceptCheck’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Delegates/DelegateInstancesImpl.h(365): error C2338: You cannot use raw method delegates with UObjects.
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Delegates/DelegateInstancesImpl.h(493): note: see reference to class template instantiation ‘TBaseRawMethodDelegateInstance<bConst,UserClass,WrappedRetValType(ParamTypes…),UserPolicy,VarTypes…>’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Misc/StringBuilder.h(354): error C2995: ‘unknown-type operator <<(FWideStringBuilderBase &,T &&)’: function template has already been defined
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Misc/StringBuilder.h(345): note: see declaration of ‘operator <<’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\RHI\Public\RHI.h(2018): error C2327: ‘FRHITransition::State’: is not a type name, static, or enumerator
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\RHI\Public\RHI.h(2018): error C2065: ‘State’: undeclared identifier
LogInit: Warning: Still incompatible or missing module: ChaosDestructionDemo
LogCore: Engine exit requested (reason: EngineExit() was called)

1 Like

This worked. Thank you

1 Like

Having problems getting **Chaos Destruction Demo to **work. Added the correct changes to the build cs files. Project compiles and runs, no errors. Chaos plugins enabled. But nothing fractures or breaks?

Anybody have luck getting it to work?

Thanks for any feedback

[UPDATE] User error - mistakenly generated with stock 4.26. Had to switch to 4.26Chaos. Its working now.

1 Like

Crashed on trying to run ChaosDestructionDemo, after moving and overwriting the 2 revised .cs files and rebuilding the project with VS2019. Can’t get this running at all using 4.26Chaos.
No clue what the “D:/” is looking for, my system doesn’t have a D: drive and never has.


Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Windows/D3D11RHI/Private/D3D11Util.cpp] [Line: 258] Direct3DDeviceIMContext->Map(VertexBuffer->Resource,0,D3D11_MAP_WRITE_NO_OVERWRITE,0,&MappedSubresource) failed at D:/Build/++UE4/Sync/Engine/Source/Runtime/Windows/D3D11RHI/Private/D3D11VertexBuffer.cpp:162 with error E_INVALIDARG

UE4Editor_D3D11RHI
UE4Editor_D3D11RHI
UE4Editor_RHI
UE4Editor_GeometryCollectionEngine
UE4Editor_GeometryCollectionEngine
UE4Editor_GeometryCollectionEngine
UE4Editor_Core
UE4Editor_Core
UE4Editor_RenderCore
UE4Editor_RenderCore
UE4Editor_Core
UE4Editor_Core
kernel32
ntdll

1 Like

I was actually trying to get EOS working but the build for the 4.27 branch failed. So to prove that my steps worked, I cloned the UnrealEngine repository, switched to 4.26-chaos, ran Setup.bat and GenerateProjectFiles.bat, and had to make one change to successfully load the Chaos Demo.

PS E:\Epic> git clone https://github.com/EpicGames/UnrealEngine UE_4.26Chaos
Cloning into 'UE_4.26Chaos'...
remote: Enumerating objects: 3219666, done.
remote: Counting objects: 100% (1365/1365), done.
remote: Compressing objects: 100% (739/739), done.
remote: Total 3219666 (delta 621), reused 1323 (delta 604), pack-reused 3218301 eceiving objects: 100% (3219666/3219666),
Receiving objects: 100% (3219666/3219666), 7.32 GiB | 16.43 MiB/s, done.
Resolving deltas: 100% (2031615/2031615), done.
Updating files: 100% (137999/137999), done.

PS E:\Epic> cd UE_4.26Chaos

PS E:\Epic\UE_4.26Chaos> git status
On branch release
Your branch is up to date with 'origin/release'.

nothing to commit, working tree clean

PS E:\Epic\UE_4.26Chaos> git checkout 4.26-chaos
Switched to a new branch '4.26-chaos'
Branch '4.26-chaos' set up to track remote branch '4.26-chaos' from 'origin'.

PS E:\Epic\UE_4.26Chaos> git status
On branch 4.26-chaos
Your branch is up to date with 'origin/4.26-chaos'.

nothing to commit, working tree clean

PS E:\Epic\UE_4.26Chaos> .\Setup.bat
Checking dependencies...
Updating dependencies: 100% (63490/63490), 11781.8/11781.8 MiB | 0.02 MiB/s, done.
Registering git hooks...
Installing prerequisites...

PS E:\Epic\UE_4.26Chaos> .\GenerateProjectFiles.bat
Setting up Unreal Engine 4 project files...
Binding IntelliSense data... 100%
Writing project files... 100%

After the Visual Studio solution loaded I had to modify DesktopPlatformBase.cpp based on this thread: [solved] upgrade c++ project from ue 4.24 to 4.25 under Linux

bool FDesktopPlatformBase::CompileGameProject(. . .)
{
    // Append any other options
    //Arguments += " -Progress -NoEngineChanges -NoHotReloadFromIDE";
    Arguments += " -Progress";
}

A few pics:

1 Like

I replaced the files, but it still reported an error. Does anyone know what this is about?

2 Likes

I’m guessing you copy/pasted. that’s wrong. Either use the files above or…use this

// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class ChaosDestructionDemoEditorTarget : TargetRules
{
public ChaosDestructionDemoEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;

  ExtraModuleNames.AddRange( new string[] { "ChaosDestructionDemo" } );

}
}

1 Like


Did exactly the same thing but failed like this

1 Like

Same problem, have you solved that?

1 Like

Managed to get it working with Visual Studio 2022 and UE5.0 Preview from epic games launcher.

  1. Switch the version of the project to 5.0 by right clicking on the uproject file
  2. Edit the uproject file and remove the MeshEditor plugin requirement.
  3. Use visual studio to build the project.
2 Likes

Is there an online course for chaos? Or is there a free YouTube full instruction for chaos?
I need a lot of information about it.

1 Like

Just in case anyone with UE5.03 want to try this demo. I got the laziest way, no annoying visual studio or building cpp thing, u don need cpp for it.
From launcher download this demo(4.27Chaos versiion), and UE4.27Chaos engine of corse
Use ue4.27chaos to create a new empty project. Copy everything from chaos demo’s content folder to your empty project’s /content/, now just open your new project, everything works
migrate the whole folder /maps/ to any ue5.03 project u like, done, everything works as well

2 Likes

I’m happy I stumbled upon this post. Because I wanted to learn how to configure the CDD! :grinning: So thanks for developing this discussion!

1 Like
  1. Download and Install: Obtain the Chaos Destruction Demo project for Unreal Engine 4.26-Chaos Preview from Epic Games Launcher or GitHub.
  2. Project Setup: Open the project and ensure it’s running the Chaos Physics Preview plugin. Update any outdated assets or settings if prompted.
  3. Chaos Destruction: Locate the ChaosDemo map and launch it. Explore the destruction scenarios and observe the behavior of objects affected by Chaos Physics.
  4. Tweaking Parameters: Experiment with Chaos Physics settings like material properties, collision types, and constraints to observe different destruction outcomes.
  5. Learning Resources: Utilize Epic Games’ official documentation, forums, and tutorial videos for in-depth guidance on configuring the Chaos Destruction Demo effectively.
1 Like

Hey fellow developers! :smile:

Recently dived into the Chaos Destruction in Unreal Engine 4.26? If you’re a bit tangled with the setup, don’t fret! The Chaos Destruction Demo for 4.26 might seem a little tricky at first because of its dependency on a source build. But trust me, once you enable Chaos and give it a fresh rebuild, it becomes smoother.

I’ve outlined a simple three-step process to make your journey less bumpy. Do check out the files ChaosDestructionDemoEditor.Target.cs and ChaosDestructionDemo.Target.cs linked above (link 709) - they’re a lifesaver! Just replace them in the mentioned paths, and you’re golden. :star2:

If you’re more of a hands-on coder, there’s an alternative for you as well. Just copy-paste the code snippets provided above to the corresponding files. Ensure your configurations match, and then just revel in the awesomeness of Chaos Destruction. Let’s keep the chaos only in the demo, not in our setup, right? :wink::boom:

Stay curious and keep building,
Abdullah

1 Like