real-time physics-based destruction with scalar field terrains
projects | | linkz: Dissertation
Skills Practiced: C++, GLSL, Procedural Generation, Software Engineering, Voxel/Scalar Fields, Geometry Shaders, Fragment Shaders, Raytracing, Physics Engine Integration, Academic Writing
Tools Used: OpenFrameworks, Bullet Physics Library
Project Duration: 8 Months
Project Focus: Research / University
This was my BSc Honours project at Abertay University, for the Computer Games Technology course in 2016.
Click here to download the dissertation which accompanied the project.
The project focused on using density/scalar fields to represent infinitely large generated terrains, with a low performance overhead and memory footprint. I wrote the software to use traditional polygonization methods along with distance-field aided raymarching in order to both render the volumetric sandbox terrain, and to create a physics mesh for it.
The physics mesh was calculated on the fly on the GPU, using the geometry shader to resolve the field with the marching cubes algorithm.
The terrain was deformable through use of Constructive Solid Geometry operations during the density function’s calculation.
Rigidbody physics objects could be tossed around the raytraced terrain, and fractured. The fractured pieces could then add themselves to the density field.