# Voxel-Based Digital Twin Framework for Earthwork Construction
## 3 Methodology
### Interaction Between the Model and Equipment for Graphical Simulation in Unity 3D
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Model** & **Unity Physics Components** & **Remarks** \\ \hline Ground & Mesh Collider & This collider enables realistic behavior of the ground, so an excavator or dump truck can move over the ground. \\ \hline Target & Mesh Collider & It enables users to interact with equipment on the target surface and collide with the as-planned voxels so as not to pass through them. \\ \hline As-planned voxels & Box Collider, Rigidbody, script & Voxels can interact with the ground, target, and dump site models using a Box Collider. Also, voxels can be detected by equipment through a collider; they can be monitored and shown to the users on the GUI. The Rigidbody component ensures that the voxels respond realistically to the forces applied during manipulation. \\ \hline Excavator body & Rigidbody & The excavator behaves as expected under gravity, with consideration for its mass, resulting in natural-looking movements as it navigates the construction site. It also conserves excavator momentum. \\ \hline Excavator bucket & Mesh Collider, script & The Mesh Collider on the excavator bucket ensures precise interactions with individual voxels. As the bucket scoops, lifts, and deposits voxels, the detailed Mesh Collider allows for accurate collision detection, contributing to a convincing excavation experience. \\ \hline Dumper body & Mesh Collider, Rigidbody & As the dumper moves across the ground, the collider ensures that collisions are detected appropriately, allowing the dumper to respond to changes in the landscape. The Rigidbody component allows both kinematic and dynamic interactions. While the dumper is driven by player input, it can also be affected by dynamic forces, creating a flexible and realistic simulation of a moving vehicle. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Defined Unity physics components for models and types of equipment. voxels to ensure precise alignment with the voxels. By dynamically adjusting the bucket position according to user input and earthwork conditions, the algorithm replicates the complex interaction between the excavator and voxels. The algorithm accurately penetrates the voxels based on the collision detection between the excavator and voxels, utilizing Unity's robust physics, and removes voxels according to the bucket adjustment. The voxel position is updated based on the movement of the excavator bucket. When the excavator loads the voxels and unloads them in the dumper, the system monitors the number and type (material type) of voxels and visualizes them in the user interface. This approach enables users to excavate the earthwork as-planned voxels, which accurately represent volumetric changes as the buckets load the as-planned voxels, mirroring actual earthwork construction with high fidelity. Excavator unloading is performed similarly. When the excavator bucket is rolled out, the voxels fall into the dumper due to the gravity function of Unity physics. The dumper detects the voxels and shows them in the user interface with properties such as volume, material type, number of voxels, etc. The advantage of the proposed method is that it represents an as-planned model with voxels that provide realistic simulation and volume calculation, performing better than previous methods where volume is estimated based on approximations.