For his graduation work , final year game development student Simon Coenen, studied how to implement soft bodies using a particle physics based simulation library created by Nvidia called FleX. Soft bodies are just one of the few things the framework can be used for. It also supports fluids, tearable cloth, gases, ... These simulations are all done by only using particles that have specific relations between them. Simon kept his focus on soft bodies.
At first, Simon started understanding the development kit its documentation and demo application and started looking for possible current applications in the game industry. He realized there are only two games that use this technology: Fallout 4 and Killing Floor 2. It was quite challenging to start to understand the workings of the framework since the demo’s code was quite cluttered and the documentation was lacking a lot of important information.
His first goal was to research and implement the building blocks of the framework by starting to simulate a few particles and visualizing them as spheres. When Simon was sure it worked completely and efficiently, he could move on to the creation of a soft body.
The ‘anatomy’ of a soft body in Nvidia FleX is very interesting and was hard to understand at first. This part of the research took the most time to perfect. Having soft bodies working meant that it would only work without any visual result. That is where skinning comes in. At first, he got skinning working on the CPU but that turned out very inefficient as expected. Knowing the skinning process on the CPU helped optimizing the solution by performing the skinning on the GPU. As a result, Simon was able to simulate and render over 50 soft bodies (14 000+ particles) created from any possible game mesh at the same time.
After a few months of researching the Nvidia FleX framework, you learn quite a lot. Not only how to work with the framework itself but also how to start a research without having any knowledge in advance. It was though at first to start comprehending the demo application provided in the SDK and learn from it and eventually apply it. Simon achieved what he intended to achieve, that is being able to simulate, render and dynamically control a soft body.
For this project Simon used Visual Studio, 3ds Max and Photoshop.
You can find the source code together with the whole engine used on https://bitbucket.org/simco50/d3dengine/src.
For more information, visit http://www.simoncoenen.com.