MCPcopy Index your code
hub / github.com/cleggacus/bhusie

github.com/cleggacus/bhusie @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
183 symbols 266 edges 30 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Black hole universal simulation interface engine

A black hole ray tracer which can render in real time with meshes

Imgur

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.

Run

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

build

cargo build --release

Features

  • [ ] black hole
    • [x] euler intergrator
    • [x] adaptive runge–kutta numerical intergrator
    • [x] accretion disk texture generation
    • [x] accretion red / blue shift
    • [x] relativity sphere
      • [x] feathering
    • [ ] multiple black holes
  • [x] acceleration structures
    • [x] axis aligned bounding box
    • [x] bounding volume hierarchy
    • [x] adaptive grid for background stars
  • [ ] looks
    • [x] bloom
    • [ ] reflections and scattering
    • [ ] pbr materials
  • [x] Loading obj files
  • [x] wgpu intergration
  • [x] egui intergration

UI (with egui)

The settings windows are all under menu > view. Save a render under menu > save. Full screen under menu > window > fullscreen or f11

Imgur

Pipeline

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.

Imgur

Extension points exported contracts — how you extend this code

ArrayBufferUniform (Interface)
(no doc) [2 implementers]
src/renderer/array_buffer.rs

Core symbols most depended-on inside this repo

move_camera
called by 9
src/scene/camera.rs
output_view
called by 9
src/renderer/pipelines/fxaa_pipline.rs
pass
called by 7
src/renderer/pipelines/fxaa_pipline.rs
show
called by 7
src/ui/model_settings.rs
is_key_down
called by 6
src/input_manager.rs
right
called by 5
src/scene/camera.rs
size
called by 4
src/renderer/array_buffer.rs
view
called by 4
src/renderer/texture.rs

Shape

Method 123
Class 44
Function 12
Enum 3
Interface 1

Languages

Rust100%

Modules by API surface

src/renderer/triangle.rs16 symbols
src/scene/camera.rs13 symbols
src/renderer/pipelines/fxaa_pipline.rs12 symbols
src/input_manager.rs12 symbols
src/renderer/array_buffer.rs11 symbols
src/app.rs9 symbols
src/ui/render_settings.rs8 symbols
perlin/src/main.rs8 symbols
src/ui/mod.rs7 symbols
src/timer.rs6 symbols
src/renderer/pipelines/screen_pipeline.rs6 symbols
src/renderer/pipelines/ray_pipeline.rs6 symbols

For agents

$ claude mcp add bhusie \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact