17. AMOR (Adaptive Model Order Reduction)

Adaptive Model Order Reduction, or AMOR for short, is a technique that reduces the computational complexity of a simulation by merging objects with each other. It reduces the overall number of degrees of freedom in the simulation. Unlike sleep/wake, which many physics engines support, AMOR preserves the dynamics of merged sub-systems, enabling further interactions with other objects. This means that, for example, parts of a coupled system (a complex crane for example) may be merged while the reactive forces on an active actuator is still accurate. An other example could be having 1 500 rocks as payload on an operating Dump Truck, with complex wheel suspensions and hydraulic flatbed. The rocks may merge with the flatbed during operation, reducing the simulated system size with orders of magnitude.

See AGX Dynamics Merge Split Handler - AMOR documentation for detailed information about this functionality.

17.1. Enabling AMOR

AMOR is disabled globally by default. To enable it, select Edit > Project Settings... > Plugins > AGX Dynamics and in the category AMOR, toggle the Enable AMOR checkbox. Notice that this simply enables AMOR, individual Rigid Bodies, Shapes, Wires and Constraints will not merge or split after this, since merge/split has to be enabled for Components individually as well.

Enable AMOR globally.

Enable AMOR globally.

With AMOR enabled globally, it is now possible to enable AMOR (merge and/or split) for individual Components: Rigid Bodies, Shapes, Constraints and Wires. All of these Components have a category AGX AMOR in their details panel from where AMOR (merge/split) can be enabled.

Enable AMOR merge and split for a Rigid Body Component.

Enable AMOR merge and split for a Rigid Body Component.

17.2. Merge Split Thresholds

To better control the conditions under which merging or splitting is performed, one can assign Merge Split Thresholds to any Component supporting AMOR. Merge Split Thresholds are Assets which can be created in the AGX Dynamics context menu from the Content Browser.

Creating a Merge Split Thresholds Asset.

Creating a Merge Split Thresholds Asset

The Merge Split Thresholds Assets are divided into three types:

  • Shape Contact Merge Split Thresholds (for Rigid Bodies and Shapes)

  • Constraint Merge Split Thresholds (for Constraints)

  • Wire Merge Split Thresholds (for Wires)

Assets for these can be found under the Shape, Constraint and Wire categories in the Context Menu, as seen in the image above.

Editing a specific Merge Split Thresholds Asset is done by simply double clicking on it in the Content Browser.

Editing a Merge Split Thresholds Asset.

Editing a Merge Split Thresholds Asset.

17.2.1. Component Specific Merge Split Thresholds

A Merge Split Thresholds Asset can be shared among several Components of the same type (according to the types listed in Merge Split Thresholds). Changing a Merge Split Thresholds Asset will affect all Components that use that specific Asset.

To assign a Merge Split Thresholds Asset to a specific Component, set the Thresholds property in the Component’s Details panel to reference that Asset.

A Merge Split Thresholds Asset assigned to a Component.

A Merge Split Thresholds Asset assigned to a Component.

If no Merge Split Thresholds is explicitly assigned to a Component supporting AMOR, a global default Merge Split Thresholds is automatically used during Simulation. To make changes to this global default Merge Split Thresholds, see section Global (default) Merge Split Thresholds.

17.2.2. Global (default) Merge Split Thresholds

All Components supporting AMOR will automatically use a global default Merge Split Thresholds if and only if none is explicitly assigned to it. This default Merge Split Thresholds is automatically created by AGX Dynamics but can be overridden by the user, and will thus effect all Components that does not have a Merge Split Thresholds assigned to it.

To override the default Merge Split Thresholds, select Edit > Project Settings... > Plugins > AGX Dynamics and in the category AMOR, assign any of the global Thresholds.

Overriding the global (default) Merge Split Thresholds.

Overriding the global (default) Merge Split Thresholds.

In the figure above, the default Merge Split Thresholds for all Rigid Bodies and Shapes has been overridden. Here, Constraints and Wires will still use the AGX Dynamics default Merge Split Thresholds that is created automatically.

17.3. AMOR in Blueprints

It is possible to enable AMOR (merge/split) for a specific Component during Play, from a Blueprint. One thing to note is that if AMOR was not enabled for the Component at BeginPlay, a Merge Split Properties is not automatically created for that Component. In this case, one must call the Create Merge Split Properties function before writing to it. The figure below illustrates how this may be done.

Enabling AMOR merge from a Blueprint.

Enabling AMOR merge from a Blueprint.

To explicitly split a Rigid Body that has been automatically merged, the Split function may be called.

Splitting an automatically merged Rigid Body from a Blueprint.

Explicitly splitting an automatically merged Rigid Body from a Blueprint.

Making changes to the Merge Split Thresholds of a Component during Play is also possible. The figure below illustrates how this may be done.

Editing Merge Split Thresholds from a Blueprint.

Editing Merge Split Thresholds from a Blueprint.

Note that these changes will affect all Components using the same Merge Split Thresholds Asset.