pc and desk and plant

Rigidbody and Softbody Physics Engine

Physics engine built in Unity.

Nihat Isik


Build something based on the ETH Course Physically based simulation.
The options were pretty much the following:

0 Rigidbody simulation

1 Softbody simulation

2 Fluid simulation

We opted for 0 and 1.


We used the Unity Game Engine without, obviously, using the built-in physics engine.


We used the Verlet Integration scheme. This choice was motivated by the follwing paper, since we wanted to tackle specifically soft bodies.


Every rigidbody is composed by a tetrahedron (following the above mentioned paper). The simulation of the movement is then handled by the integration scheme. Since the tetrahedron is composed by 4 particles and 6 constraints, this allows to capture also orientation. However the rotations are not very realistic (but when using this scheme realism shouldn't be the goal).


With the pipeline we built softbody simulation became very easy. As an example simulating a soft cube would just require setting the corners of the cube as particles and attach spring constraints between each particle. After defining stiffness and damping the simulation would do the rest. See the github repo below for clarity.

Collision Resolution
Broad phase: we used the SAT algorithm.
Narrow phase: since we implemented only convex shapes, such as sphere and oriented bounding box (OBB) we managed to take the information given by the SAT to compute the collision points. The trickiest part was OBBvsOBB which we tried to implement using the books examples (but achieved a semi working collision resolution for this case).

Additional: Cloth Simulation and Skinned-Rigged Mesh Simulation


Rigged tree.

Constraints on the particles of the tree.

Final Video


The report can be found here:

Github Repo