Black Hole screensaver

A real-time black hole simulation that runs as a screensaver on NCZ-OS, macOS and Windows.

Black Holes for the Holidays: a real-time, ray-traced black hole screensaver for macOS, Windows and Linux, with seven scenes. Free and open source.

What it is

The screensaver draws a black hole with gravitational lensing, an accretion disk and several scenes: a single black hole, a binary, a merger, a tidal disruption, a galaxy zoom, a three-body system and a quasar. The picture is computed by a shader on your graphics card, so how smooth it is depends on that card.

Download

Version 0.1.5 for macOS (Apple silicon) and Windows 10 and 11, and the default screensaver in NCZ-OS 26.10 "Cygnus". The Mac download is one installer that also sets the screensaver and a five-minute timeout, plus an uninstaller. The Windows first run takes a few minutes while shaders compile. The builds are not notarized or code-signed, so macOS and Windows will ask you to confirm the first run; the install guide has the steps.

Screenshots

Captures from the macOS build at 2560x1440.

Black Hole screensaver: a single black hole
A single black hole
Black Hole screensaver: a binary
A binary
Black Hole screensaver: a merger
A merger
Black Hole screensaver: a tidal disruption
A tidal disruption
Black Hole screensaver: a three-body system
A three-body system
Black Hole screensaver: a quasar
A quasar
Black Hole screensaver: galaxy zoom
Galaxy zoom
Black Hole screensaver: m87*
M87*
Black Hole screensaver: sagittarius a*
Sagittarius A*

Performance

Frame rates below are approximate and differ from machine to machine. Heavy scenes cost time in proportion to the number of pixels drawn, so the screensaver draws them smaller on slower cards and scales the picture up.

macOS

Measured on an Apple M1 Max in a 1920 by 1080 window, ANGLE over Metal, frames per second at four render sizes.

Scene1920x10801280x720960x540660x370
single (default look)51585858
binary5132345
merger6101838
tidal-disruption5121835
three-body5131841

The screensaver picks the size for you. On this machine the heavy scenes start at about half the window size, settle at roughly 700 by 400 to 840 by 470 and average 21 to 24 fps; the default scene runs at full size.

Linux

Default scene, 1536 by 960, median frame time.

Graphics cardResult
NVIDIA RTX 2060 Mobileabout 110 fps
AMD RX 5500Mabout 77 fps
Intel UHD 630 and Comet Lake GT2about 9 fps before the render scale drops

The other scenes have not been measured on Linux yet.

Windows

On Windows the first run compiles the shaders through Direct3D, and the result is cached for later runs. Measured on an Intel Iris Xe: about 4 minutes for the single and galaxy-zoom scenes, and more than 15 minutes without finishing for binary, merger and tidal-disruption. The splash screen shows the elapsed time and says when it is still working. Because of this, integrated Intel graphics and software renderers are offered the single scene only; cards the screensaver recognises get the scenes it estimates they can run at 18 fps or better at 960 by 540, and cards it does not recognise get every scene, with slow ones dropped after a few seconds. Compile times on discrete cards have not been measured. Set NCZ_BLACKHOLE_SCENES=all to turn that off.

What the screensaver does about it

Repositories