Development of the animation of "digging a hole"

Hi everyone,

I am trying to create an animation of the action of ‘digging a hole’ into a terrain. A simple deformation of the terrain/earth during the collision with the Mashine/bucket is enough. Drilling physics does not need to be considered.

My scene consists of the following parts:

  1. FBX file , representing the terrain. It contains a mesh, and a texture material (attached png)

  2. An excavator, consists of several rigid bodies and joints. The bucket comes into interaction with the ground.
    The bucket consists of several parts. On each part a “mesh collider” is attached. (attached png)

What is the best approach for developing the animation of the drilling action? Does anyone have a hint?

Thanks.


You shouldn’t use a FBX for the terrain. You need to use a data structure that can be easily deformed as a result of collision detection, and a mesh generally isn’t.

Typical approaches for this are representing the terrain as either a height map (if 2D deformation is enough, that is your terrain can only raise/sink) or voxels (if you need full 3D deformation). Then its a matter of detecting which texels (in a heightmap) or voxels (in voxel-based terrain) are colliding against the machine, and adjust their values accordingly.

How to actually detect the collision and how to adjust terrain values are completely up to your specific needs. By the looks of it you’re just starting out with 3D graphics/physics, if that’s the case be warned that this is a pretty advanced task.

As reference, here’s an article detailing how to implement this using heightmaps + particles:
https://www.researchgate.net/publication/221622677_Soil_Deformation_Models_for_Real-Time_Simulation_A_Hybrid_Approach

1 Like

Ok, thank you!