A black hole ray tracer which can render in real time with meshes
This project is a real-time black hole raytracer. It uses multiple techniques such as an adative grid to reduce calculations, bvh to render meshes, a relativity sphere algorithm to allow the mesh to be rendered in the scene with the black hole and many adjustable settings such as integration methods and parameters, object settings, black hole settings and more.
To run this project you can simply run with cargo. For performance reasons its preferable to run with the release option since it is level 3 optimized. Note the rust log enviroment variable is enabled by the program by default so you do not have to add it to get logs.
cargo run --release
To generate the disk texture you can run the sub project perlin
although it has already been pre rendered for the project.
cargo run -p perlin
cargo build --release
- black hole
- euler intergrator
- adaptive runge–kutta numerical intergrator
- accretion disk texture generation
- accretion red / blue shift
- relativity sphere
- feathering
- multiple black holes
- acceleration structures
- axis aligned bounding box
- bounding volume hierarchy
- adaptive grid for background stars
- looks
- bloom
- reflections and scattering
- pbr materials
- Loading obj files
- wgpu intergration
- egui intergration
The settings windows are all under menu > view. Save a render under menu > save. Full screen under menu > window > fullscreen or f11
The general flow of render passes is shown in the image below.
Note: there are more passes now and this just demonstrates the ray and bloom passes.