Announcement

Collapse
No announcement yet.

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

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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
    1. Download ChaosDestructionDemoEditor.Target.cs and ChaosDestructionDemo.Target.cs here
    2. Find the original files:
      1. …*/ChaosDestructionDemo/Source/ChaosDestructionDemo.Target.cs
      2. …*/ChaosDestructionDemo/Source/ChaosDestructionDemoEditor.Target.cs
    3. Replace the original files with the new files you downloaded and voila!
    Alternatively…

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


    …*/ChaosDestructionDemo/Source/ChaosDestructionDemo.Target.cs
    Code:
    // Copyright Epic Games, Inc. All Rights Reserved.
    
    using UnrealBuildTool;
    using System.Collections.Generic;
    
    public class ChaosDestructionDemoTarget : TargetRules
    {
    public ChaosDestructionDemoTarget(TargetInfo Target) : base(Target) {
    Type = TargetType.Game; ExtraModuleNames.AddRange( new string[] { "ChaosDestructionDemo" } );
    }
    }


    …*/ChaosDestructionDemo/Source/ChaosDestructionDemoEditor.Target.cs
    Code:
    // 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" } );
    }
    }
    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.
    Last edited by Amanda.Schade; 12-16-2020, 05:23 PM.

    #2
    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.

    Comment


      #3
      Originally posted by Arkiras View Post
      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.
      https://forums.unrealengine.com/unre...games-launcher

      Comment


        #4
        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.

        Comment


          #5
          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.
          Last edited by Arkiras; 12-17-2020, 02:13 PM.

          Comment


            #6
            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 https://docs.unrealengine.com/en-US/...WYU/index.html. (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)

            Comment


              #7
              Originally posted by Arkiras View Post
              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.
              This worked. Thank you

              Comment


                #8
                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.
                Last edited by OptimisticMonkey; 02-09-2021, 11:30 AM.
                https://www.casualdistractiongames.com

                Comment


                  #9
                  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.

                  Code:
                  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

                  Comment

                  Working...
                  X