Chaos Physics Overview

Overview of Chaos Physics, including some troubleshooting tips for users who are new to the Chaos Physics solver.

Choose your operating system:

Windows

macOS

Linux

Chaos Physics is a Beta feature that is the light-weight physics simulation solution used in Fortnite, and it includes the following major features.

  • RBAN (Rigid Body Animation Nodes)

  • Destruction

  • Cloth

  • Ragdoll

  • Vehicles

While using Chaos Physics, users should not notice much of a difference from PhysX while performing basic Physics simulations with Unreal Engine. The following overview gives some details on how to enable Chaos Physics, including feature highlights and troubleshooting tips for transitioning a project from PhysX to Chaos Physics.

Enable Chaos Physics

If you are using the UE_4.26Chaos build, feel free to skip this section because Chaos is enabled by default.

If you would like to enable Chaos Physics for your project, perform the following steps.

  1. Download the latest Unreal Engine Source Code from GitHub .

  2. Extract the .ZIP files to your filesystem.

  3. From the Engine/Source folder, open UE4Editor.Target.cs with a text editor.

  4. Add and save the following code to UE4Editor.Target.cs .

    BuildEnvironment = TargetBuildEnvironment.Unique; bCompileChaos = true; bUseChaos = true;

  5. Verify that UE4Editor.Target.cs looks like the following code block.

    public UE4EditorTarget( TargetInfo  Target) : base(Target) 
    { 
        Type = TargetType.Editor; 
        BuildEnvironment = TargetBuildEnvironment.Unique; 
        bBuildAllModules = true; 
        ExtraModuleNames.Add("UE4Game");  
    
        bCompileChaos = true; 
        //Note that the following line is not needed for 4.23 or previous versions. 
        bUseChaos = true; 
    } 
  6. From the engine root folder, run Setup.bat .

  7. After verifying that Setup.bat runs successfully, run GenerateProjectFiles.bat .

  8. Open UE4.sln with Visual Studio and build the Engine from the Source code .

  9. Create a new project and open it.

  10. Verify that Chaos Solver , Chaos Cloth , and Chaos Cloth Editor are enabled in the Edit > Plugins > Physics menu.

  11. If you enabled any of the Chaos plugins (such as ChaosVehiclesPlugin or ChaosCaching ), restart Unreal Editor.

Feature Highlights

Chaos RBAN

If developers choose to enable Chaos Physics, the user interface and existing parameters will remain the same while utilizing Chaos RBAN with the PhAT editor — technical animators, character artists, and visualization specialists should be able to use the same development workflow as before.

Chaos RBAN includes the following.

  • Constraint positions (both numbers and handles) that can be explicitly set.

  • Increased stability at lower iteration counts over PhysX.

  • The Simulate Editor now uses the same solver.

  • Better joint stability for longer chains.

  • Debug Draw improvements.

Star Walker

Starwalker in Debug Draw

Chaos Physics supports velocity drive, breakable joints, collision restitution, collision enabled settings, proper elliptical cone constraints, enable gravity settings, joint linear and angular restitution, and angular projection. Additionally, Chaos RBAN will feature RBAN World Object Support and RBAN Simulation Space .

RBAN World Object Support

This RBAN World-Space Object system supports the ability to copy objects from the main world simulation into an RBAN simulation. This feature existed with UE+PhysX, but was incomplete and only usable in very specific scenarios and not practical in a real game. The Chaos version of RBAN World Object Support is more complete for shipping a product.

RBAN World Object Support include the following features.

  • Add nearby world objects into the RBAN simulation as static objects.

  • Support the world-object system for world-space RBAN simulations.

  • New and exclusive to Chaos Physics:

    • Add nearby world objects into the RBAN simulation as kinematic objects.

    • Remove world objects from the RBAN simulation when they are not nearby.

    • Support the world-object system for the component-space and bone-space RBAN simulations.

RBAN Simulation Space

Component space and bone-space simulations are used with RBAN to prevent unrealistic actor movement from influencing the bodies in the simulation and causing undesirable behavior. However, this also prevents the RBAN simulation from responding to actor movement in any way at all, which is also often undesirable.

The RBAN Simulation Space feature enables the controllable amount of a character's world-space movement (translation and rotation) to be passed into any RBAN simulation. So, developers can have the local-space RBAN simulations respond to actor movement but reduce and limit the effects to prevent artifacts from unrealistic motion such as rapid rotation and extreme acceleration.

A similar feature already existed in UE+PhysX with ComponentLinearAccScale and its associated settings, but it only provided linear motion transfer which limited its usefulness. For example, if you rotated an actor on the spot, a component-space RBAN simulation would not react at all.

The new system supports full linear and angular motion transfer, including coriolis, centrifugal, and Euler forces, in a way that effectively gives us a slider to move from a world-space sim to a local-space sim (see MasterAlpha in the Sim Space Settings below).

RBAN_Sim_Space.png

RBAN Sim Space Settings

Chaos Cloth

Chaos Cloth is the physics solution that enables game developers, artists, and real-time users to simulate cloth on systems ranging from mobile devices to high-end cinematics machines. As with RBAN, developers will be able to continue using their current workflow when PhysX is deprecated in a future release with the Chaos Cloth solver.

Chaos Cloth

Debugging Chaos Cloth.

Chaos Cloth includes the following features.

  • Additional HUD cloth feedback.

  • Additional Debug Draw CVars.

  • Rewritten parameters for cloth.

  • Increased collision support per cloth, exceeding the previous 32 sphere limit.

  • An additional wrap deformer with increased influence quality.

  • An on-screen Character and Cloth menu viewport for cloth-authoring, such as flat-shaded double-sided, long-range attachment tethers, particle indices, and more.

Cloth LOD Support

Full Cloth LOD support is now in place for developers.

Chaos Cloth LOD

Chaos Cloth LOD update

Chaos does not support Apex cloth generation.

Chaos Ragdoll

Chaos Ragdoll enables character artists, animators, and engineers to blend dynamic physical motion with animation to enhance gameplay and add unique motion to their characters.

Chaos Ragdoll

Simulating Chaos Ragdolls in-editor.

Chaos Ragdoll includes Joint constraint parity with PhysX for Joint Collisions and Collision Manager, as well as Skeletal Mesh support parity for Root Animation, Sequencer PIE support, and Kinematic Character interaction.

Chaos Vehicles (Experimental)

In a future release, Chaos Vehicles will replace the PhysX based vehicle system for cars and provide the same level of functionality that developers are used to.

Verify that the ChaosVehiclesPlugin is enabled for your project. The plugin is under Edit > Plugins > Physics , and it relies on Chaos Physics being enabled for your project — it will not work with PhysX enabled.

ChaosVehiclesPlugin.png

The individual assets that make up Chaos Vehicles are similar to those in the PhysX Vehicles Plugin.

  • A Skeletal Mesh

  • A Physics Asset

  • An Animation Blueprint

  • A Vehicle Blueprint

  • One or more Wheel Blueprints.

If you are already familiar with PhysX Vehicles then these are the Chaos equivalent class names. They are configured in a similar manner.

PhysX Component

Chaos Component

VehicleWheel

ChaosVehicleWheel

VehicleMovement

ChaosWheeledVehicleComponent

VehicleAnimInstance

VehicleAnimationInstance

WheelHandler

WheelController

WheeledVehicle

WheeledVehiclePawn

Vehicles are no longer restricted to having only 4 wheels. Any number of wheel Blueprints may be added to a vehicle. A ChaosVehicleWheel Blueprint can represent a single wheel, but more commonly it will be the definition for a group of wheels on an axle.

Adding the WheelController node to the VehicleAnimationInstance Blueprint will mean that the wheels' steering and rotation animations will be handled automatically.

wheelcontrollerBP.png

The Physics Editor is used in the same manner as before to generate collision geometry for the bones of the skeletal mesh. This generates the Physics Asset for the vehicle.

physicseditor_vehicle.png

Vehicle Physics Editor

Setting up more complicated appendages like the multi-segmented aerial of the Advanced Vehicle Blueprint requires the antenna be created as a separate physics asset and added to the vehicle as an RBAN node in the vehicle's Animation Blueprint. This is more efficient since the RBAN simulation can be tuned independently for each attachment and the attached object will not affect the vehicle's movement.

The vehicle Blueprint or WheeledVehiclePawn contains a Vehicle Movement Component where all the vehicle settings can be adjusted. The Vehicle Movement Component can be accessed via Blueprints to set or get a state, such as the vehicle controls.

vehicleBP.png

If you want to experiment with the Chaos Vehicles plugin, get started with the following guides.

Chaos Destruction

APEX is not compatible with Chaos Destruction. For more information about setting up Chaos Destruction, read this documentation .

Troubleshooting Tips

Chaos Vehicles (Experimental)

There are various console commands that help you either enable debug rendering to visualize what is happening within the simulation or disable certain features or forces within the simulation. All console commands begin with p.vehicle .

Chaos Vehicle Debug Commands

If you are converting an existing vehicle setup from PhysX assets to Chaos it is possible to use a neat feature of the engine to change the underlying class used for a Blueprint. This is especially useful for changing the animation Blueprint class if you have a complex suspension setup that you'd rather not have to recreate. From the existing vehicle animation blueprint, select File , then Reparent Blueprint , and finally select VehicleAnimationInstance . The old PhysX WheelHandler node will now be generating an error, simply delete and replace it with the new WheelController , recreating the same connections.

Chaos Destruction

Displaying hierarchy, clustering information about rigid bodies, and more will help developers debug problems with Chaos Destruction. To learn more, read about Geometry Collection Debug Draw .

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss