Simon Kerler
Projects - nparticles
My bachelor thesis I have conducted at the University of Applied Sciences Augsburg. Particle and n-body systems have many use cases in scientific research and computer graphics. This thesis proposes a generic engine to model, update and render these systems. OpenGL compute shaders are used to perform computations on the highly parallel architecture of graphics cards to speed up the simulation.
Simulation and visualisation of n-body systems have many use cases in scientific research and computer graphics. Recent developments of graphics hardware allow these simulations to be executed on the GPU due to the parallel nature of the n-body problem. Many of the available solutions are hard coded to a special purpose and do not grant much flexibility for the definition of particle attributes and behaviour. Most often, updating a simulation is done on CPU or by using deprecated ways of GPGPU.
This thesis proposes a simulation engine which negotiates these shortcomings. It is written in C++ using OpenGL 4.3 as render and modern GPGPU framework. Its object-oriented and generic API allows the modelling of all kinds of n-body systems with particle attributes stored in GPU buffers and behaviour encoded in compute shaders. The engine was designed to be cross-platform, independent of hardware vendors, extensible, flexible and easy to use. Shader source code can be reused and all resources are managed by the engine implicitly.
For the creation of the engine, different GPU architectures and GPGPU frameworks were analysed. Two modern game engines (Irrlicht3D, Ogre3D) and various particle and n-body simulations were examined to design the architecture of the engine.
To verify implementation, two gravitational simulations were created. Two benchmarks to profile the render and compute process were implemented, as well. They were executed on a NVIDIA GeForce GTX660, GeForce GTX780 Ti and Quadro 4000 with results being examined to show possible bottlenecks and compute shader optimisations.
The result of this thesis is a working n-body simulation engine with GPU support that fulfils all of the initial requirements. Only the usability cannot be assessed objectively at the moment.
© 2014 - 2025 Simon Kerler. This website was published under the Creative Commons Attribution-ShareAlike 3.0 Unported License and was created with astro and tailwindcss .