Real-Time Simulation of Flexible Bodies with Ray-Traced Contact in the Unity Game Engine
Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Computer simulations of structural mechanics, like Finite Element Method (FEM) models or multibody systems, have been a standard tool for engineers for a long time; nevertheless, those kinds of simulations are typically performed offline, i.e., there is no possibility to interact with the simulation before it is completed. Especially for simulations with changing parameters or boundary conditions, however, being able to interact with the simulation in real-time or online might be advantageous. Instead of building visualization and user input components from scratch, this paper proposes using a game engine, in this case Unity, as a basis. While game engines are proven to handle user input and visualization well, they are typically not known for a physically accurate simulation. Therefore, the game engine serves only as a basis for implementing custom physics. The implementation detailed here uses the Floating Frame of Reference Formulation (FFRF) to describe flexible bodies that can undergo large rigid body translations and rotations with underlying linear FEM models. For the FEM mesh and system matrices, the simulation relies on a commercial FEM program, here Abaqus, to set up the model and export all required quantities. During a simulation, the user can interactively change the boundary conditions, translate or rotate the flexible bodies, and simulate contact scenarios. For the latter, the simulation relies on a ray-tracing-based contact search and a penalized contact formulation. This paper describes the simulation implementation, validates the results against Abaqus, and benchmarks the computational performance on consumer-grade hardware.