https://github.com/rafapp/jellyengine
Jelly Engine - a 3D Game Engine focused on realtime soft body physics simulation.
https://github.com/rafapp/jellyengine
engine game-engine physics physics-engine simulation
Last synced: 4 months ago
JSON representation
Jelly Engine - a 3D Game Engine focused on realtime soft body physics simulation.
- Host: GitHub
- URL: https://github.com/rafapp/jellyengine
- Owner: Rafapp
- License: mit
- Created: 2023-09-05T02:57:54.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-12T19:05:58.000Z (over 1 year ago)
- Last Synced: 2024-12-12T20:22:30.276Z (over 1 year ago)
- Topics: engine, game-engine, physics, physics-engine, simulation
- Language: C++
- Homepage:
- Size: 104 MB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
A 3D Game Engine specialized for Soft Body Physics
Motivation
Most (if not all) modern game engines are capable of only simulating rigid body dynamics (left). However their counterpart, soft bodies (right) are not a feature available to developers out of the box or without the need to tinker and create custom solutions to solve for them in real-time rendering applications such as games and interactive media.
It is for this reason that we decided to build Jelly Engine.
Soft bodies are all around us in the physical world. Ubiquitous materials such as human skin, rubber balls or even jelly behave in complex ways, which are typically hard to simulate and even more so at runtime while maintaining good performance in current hardware. Applications of this technology could be, but are not limited to:
-
Medicine: Training environments for surgery practicioners with high fidelity models of human organs and anatomy. -
Engineering: Simulation and analysis of deformable materials like polymers and lattice structures. -
Interactive applications: New game design mechanics involving deformable 3D objects.
Features
Rendering
- OpenGL rasterized graphics.
- Support for 26+ 3D file formats.
- Shaders (fragment, vertex, compute).
- Blinn-phong shading with rgb color.
- Multi-model scenes.
- "Gummy Shader:" A jelly-like shader based on the Oren-Nayar reflectance model (simulate SSS).
Stanford Dragon: 566,098 vertices, 1,132,830 triangles
Rendering realtime at 200+ FPS using "Gummy Shader"
Soft Body Physics
- Dampened spring-mass model.
- Euler integration.
- Realtime soft body simulation.
- Softbody-plane collision.
- "Toybox" demo with 5 different soft bodies to play with, made with Jelly Engine.
"Toybox" demo made with Jelly Engine.
## Instructions
### Running the toybox demo:
1. Install [CMake](https://cmake.org/download/).
2. Add CMake to `PATH`.
3. Run [build.bat](build.bat) to build the engine with the toybox demo game.
6. If the demo builds successfully, an `out` folder in the root folder will be generated. Go to `out/Game/game.exe` and run the demo!
### Creating your own game
1. Install [CMake](https://cmake.org/download/).
2. Add CMake to `PATH`.
3. Write your own game code in [Game/src/game.cpp](Game/src/game.cpp) and [Game/src/game.h](Game/src/game.h).
- Use the toybox demo provided as a template, delete the contents of its functions.
- You can write your code using the `Start()`, `Update()`, and `Exit()` functions.
- We recommend using the toybox demo provided to see how to work with a `light`, the `scene` vector, the 3D `Model` class, and the `SoftBody` class.
5. Run [build.bat](build.bat) to build the engine with your specific game.
6. If your C++ code compiles and links, an `out` folder in the root folder will be generated. Go to `out/Game/game.exe` and run your game!
### Building the engine as a static library `JellyEngine.lib`
1. Install [CMake](https://cmake.org/download/).
2. Add CMake to `PATH`.
3. Modify the engine as needed.
5. Run the engine's [build.bat](build.bat) file to build the engine as a static library.
6. If your C++ code compiles and links, an `out` folder in the root folder will be generated. Go to `out/Engine` and you should see the file `JellyEngine.lib`. You can now link this library with any C++ application.
### Credits
- Rafael Padilla Perez: C++ Code, game engine architecture, design and implementation.
- Joshua Ebreo: Spring mass model research and [testing repository](https://github.com/Josh-Ebreo/Jelly-Engine-Beta).
### Acknowledgements
This project could not have been accomplished without the support and guidance of our project advisor, Professor Kevin Smith, the counsel from Spartak Gevorgyan, and the encouragement and support from our family, friends, and peers in the Software Engineering Program at San Jose State University.
### Research poster
