8. Plugin Settings

Plugin settings

Plugin settings.

The plugin settings can be accessed from within the Unreal Editor by selecting Edit > Project Settings... > Plugins > AGX Dynamics.

8.1. AGX Dynamics

  • Number of Threads

    The number of threads AGX Dynamics will use during Play. A higher number may reduce StepForward time depending on the scenario being simulated and the computer hardware. Set to 0 to use all hardware threads. The default value is 4.

8.2. Solver

  • Time Step

    The number of seconds to advance the AGX Dynamics simulation per step. Note that the simulation is not necessarily stepped exactly once per frame.

  • Contact Warmstarting

    Contact warmstarting adds an extra step to the solver where the previous timesteps contact data is matched to the current timesteps data so the previous forces can be used by the solver to find a solution faster when direct friction is used.

    If using auto-generated ContactMaterials and default settings, enabling this is not recommended and will just add some overhead. But if a FrictionModel with DIRECT solvetype is used, enabling this is recommended.

    The state data used to match contacts for warmstarting is not serialized. This means that storing and then restoring the simulation can give slightly different trajectories compared to running the simulation non-stop.

  • Override PPGS Iterations

    Enable to override the default value for Num PPGS Iterations.

  • Num PPGS Iterations

    The number of Parallel Projected Gauss-Seidel iterations that will be performed per step. This solver is used for the particles created by the AGX Terrain

8.3. Statistics

  • Enable Statistics

    Enable to instruct AGX Dynamics to gather simulation and timing statistics. This must be enabled for the Statistics feature to work.

8.4. Simulation Stepping Mode

The simulation stepping mode control the relationship between Unreal Engine time, Unreal Engine frames, and AGX Dynamics simulation steps.

  • Catch Up Immediately

    Every frame the simulation will be stepped for the entirety of the delta time reported by Unreal Engine, or as close to it as possible given the time step configured under Solver. If the application lack access to sufficient computational resources to maintain real-time performance, i.e. if the time it takes to simulate a certain duration of simulation time is larger than that time then the simulation will fall farther and farther behind and an ever increasing number of simulation steps will be performed per frame as the simulation tries to catch up. This leads to severe stutters, so this stepping mode should only be used when real-time performance can be guaranteed. Unreal Engine time and AGX Dynamics time will always be in sync, up to the length of the time step.

  • Catch Up Over Time

    A stepping mode that strive to keep simulation time in sync with Unreal Engine, but allow for the two to diverge during sections that are more computationally demanding and then catch up later. AGX Dynamics will be stepped once per frame as long as the simulation performance can keep up and one extra time per frame when behind. This avoids the ever increasing stepping per frame that Catch Up Immediately causes and allows the simulation to catch up with Unreal Engine time when the computationally demanding section has passed.

  • Catch Up Over Time Capped

    A variant of Catch Up Over Time that put a limit on large time divergences are tracked. If the simulation time falls more behind than the configured threshold then the extra will become permanent.

  • Drop Immediately

    A stepping mode that does not accumulate “unstepped” time between frames. No more than one simulation step will be performed per frame.

8.5. Rendering

  • Constraint Visualization Scaling Distance Max
    Maximum distance between the active Viewport camera and any AGX Constraint within which the AGX Constraint graphical representation is scaled such that it’s size is constant as drawn on the screen [cm].

    When moving the camera further away than this distance the on-screen size of the constraint visualization will start to shrink along with the surrounding geometry.

8.6. Other

  • Additional Unreal Collision

    If Override Additional Unreal Collision, this setting is applied to all primitive AGX Shapes. It makes it so that each primitive AGX Shape carries additional Collision information that can be “seen” by the Unreal physics engine. Can be used for e.g. supporting LineTrace (Query), or let AGX Shapes be seen as blocking volumes by the Unreal physics engine (Physics). If Override Additional Unreal Collision is set to false, the behaviour is determined on a Shape-by-Shape basis. See Additional Unreal Collisions for details.

8.7. Troubleshooting

8.7.1. AGX Dynamics for Unreal content not showing

If assets part of the plugin is not shown when e.g. assigning asset types in the Details Panel, ensure that the Show Plugin Content setting is active. This is done by selecting Settings in the Content Browser and then checking the Show Plugin Content option.

Show Plugin Content option.

Activating the Show Plugin Content option.

8.7.2. Frame Jittering

If experiencing “jittering” in AGX Dynamics for Unreal object positions during motion, it may be because the frame rate (FPS) is higher than the AGX Dynamics for Unreal physics step forward rate. One way to solve this is to enable Fixed Frame Rate in the project settings by selecting Edit > Project Settings... > Engine > General Settings > Framerate and matching with the AGX Dynamics for Unreal step forward rate. Another way to solve this is to lower the AGX Dynamics for Unreal time step (increase step forward rate) by selecting Edit > Project Settings... > Plugins > AGX Dynamics > Solver so that it is at least as high as the frame rate (FPS).

8.7.3. Rendering “Ghosting” Effects

If experiencing “ghosting” effects, changing the Anti-Aliasing Method under Edit > Project Settings... > Rendering may help reduce the issue. What Anti-Aliasing Method that works best may depend on scenario and hardware, so some experimentation may be required.

Changing Anti-Aliasing Method.

Changing the Anti-Aliasing Method to TAA.