This project is a Unity Engine project focused on rendering realistic black holes using raymarching and volumetric techniques.
I made a full YouTube video where I explain in detail how everything works:
📺 Watch here: https://youtu.be/dMohMW29gSM
The project contains 4 different scenes:
- Simple Raymarching Demo – A minimal example to demonstrate the raymarching technique.
- Volumetric Cloud Demo – Shows how volumetric rendering can be used for cloud-like effects.
- Black Hole (No Accretion Disk) – A pure gravitational lensing example without any surrounding matter.
- Black Hole with Volumetric Accretion Disk – A complex black hole surrounded by a volumetric, cloud-like accretion disk.
Note: In the last scene, rendering quality is intentionally reduced to improve performance.
To increase quality:
- Reduce the step size
- Increase the maximum step count
- Unity (2021.3 LTS or newer recommended)
- A GPU capable of handling raymarching and volumetric rendering
Feel free to explore, modify, and learn from the project. Please credit the original repository or video if you use it in your own work.
Author: TheCodeStories
📺 YouTube: https://www.youtube.com/@The_Code_Stories