Project Description
In the lecture “Physically Based Simulation”, we implemented a simulation for sun, planets, and asteroids. The main goal was to use many different objects, which are all influencing each other. Therefore, we needed to optimize some calculations and implement an accurate real-time collision detection.
The application is written in C++ and uses the framework OSG for rendering. Each simulation can be loaded within a JSON-file, which makes it easy to test out different start states for a simulation. For some simulations, we used a python script for calculating a stable status for a lot of objects.
This project has been awarded the 3rd place out of all other student projects (about 20).
More information about the lecture and the other winning projects (Hall of Fame – 2017): https://graphics.ethz.ch/teaching/simulation17/home.php
My tasks
- Setting up the application with CMake: C/C++, OpenSceneGraph, CGAL, Eigen, Boost
- Set up the underlying framework code.
- Implementation of visual effects: stardust, bump-map, shadow, shaders.
- Collision-Detection:
- Broad-Phase: Sweep and Prune implementation
- Narrow-Phase: Gilbert-Johnson-Keerthi Algorithm for detecting a collision, Expanding-Polytope Algorithm for calculating the collision details
- Extremely basic game-play to fly with the Star Fighter through an asteroid-field.
![[:en]ETH PBS – Example 1: 2 Bodies[:de]ETH PBS – Beispiel 1: 2 Körper[:] [:en]Example 1: 2 bodies with the smaller is orbiting the bigger and heavier body[:de]Beispiel 1: Ein kleinerer Körper umkreist einen grösseren und schwereren Körper.[:]](https://breitmuuufrosch.ch/wp-content/uploads/2018/11/eth_bps_2_bodies.jpg)
![[:en]ETH PBS – Example 2: 3 Bodies[:de]ETH PBS – Beispiel 2: 3 Körper[:] [:en]Example 2: 3 equaliy heavy bodies are orbiting each other in a figure eight.[:de]Beispiel 2: Drei gleich schwere Körper bilden eine Umlaufbahn in der Form einer 8.[:]](https://breitmuuufrosch.ch/wp-content/uploads/2018/11/eth_bps_3_bodies.jpg)
![[:en]ETH PBS – Example 3: Saturn (n-bodies)[:de]ETH PBS – Beispiel 3: Saturn (n-Bodies)[:] [:en]Example 3: Many small objects are orbiting one larger body.[:de]Beispiel 3: Viele kleine Körper umkreisen einen Grösseren.[:]](https://breitmuuufrosch.ch/wp-content/uploads/2018/11/eth_bps_nbodies_asteroid_field.jpg)
![[:en]ETH PBS – Collision Detection[:de]ETH PBS – Kollisionserkennung[:] [:en]Collision detection: The broad and narrow phase has been implemented to optimize collision detection and minimize the calculation effort[:de]Kollisionserkennung: Eine Broad und eine Narrow-Phase für die Kollisionserkennung wurden implementiert, um diese zu Optimieren und die benötigten Berechnungen zu minimieren.[:]](https://breitmuuufrosch.ch/wp-content/uploads/2018/11/eth_bps_collision_detection.jpg)
![[:en]ETH PBS – Game play[:de]ETH PBS – Gameplay[:] [:en]Gameplay: Flying a Star Fighter through an asteroid field without getting hit.[:de]Gameplay: Fliege einen Star Fighter durch ein Asteroiden Feld ohne getroffen zu werden.[:]](https://breitmuuufrosch.ch/wp-content/uploads/2018/11/eth_bps_gameplay.jpg)





