It’s fascinating how things that were inverted seem to become corrected when I point this at the pre-existing black hole in my room.
Quite amazing when crossing the pre-existing blackhole and looking back to the room while using this app!
Open blackhole.plav.inblackhole.plav.in
Physically accurate browser-based black hole visualization featuring relativistic physics and AR/VR support.
Visit projectShow HN@aplavinJul 23, 2026
We have a black hole at home — with actual relativistic physics, live in your browser. I'm Sasha (Alexander) Plavin, an astrophysicist at Harvard's Black Hole Initiative studying quasars and black hole environments. I work with raytracing/radiative transfer simulations professionally, and wanted to make one anyone can play with — so I built this app. Put the black hole onto your screen (any browser), or directly into your room with AR or VR (requires WebXR, for example Chrome on Android, or any VR headset). When looking around, pay attention to unintuitive relativistic effects: rays bending around the black hole, and special relativistic Doppler boosting changing brightness depending on the viewing angle — zoom out to see the fast jet where the latter effect is especially pronounced. Faint markers show where other viewers are standing right now. Alternatively, put the black hole in front of your camera and watch it lens your actual surroundings. Light winds around the hole, so you see both what's in front of you and what's behind you at once (when the device and browser allow both camera feeds). The closer to the black hole, the stronger the bending — and the longer the light-travel delay: wave at it and watch the changes propagate inward. (unfortunately, WebXR restrictions make AR passthrough and the camera feed mutually exclusive) No signup, basic features work on every device, no data uploaded — the camera feed never leaves your device. Source code: https://github.com/aplavin/blackhole.plav.in . Enjoy having a black hole in your room, or use it for education/outreach — any questions, feedback, or suggestions are welcome!
Community
We have a black hole at home — with actual relativistic physics, live in your browser. I'm Sasha (Alexander) Plavin, an astrophysicist at Harvard's Black Hole Initiative studying quasars and black hole environments. I work with raytracing/radiative transfer simulations professionally, and wanted to make one anyone can play with — so I built this app. Put the black hole onto your screen (any browser), or directly into your room with AR or VR (requires WebXR, for example Chrome on Android, or any VR headset). When looking around, pay attention to unintuitive relativistic effects: rays bending around the black hole, and special relativistic "Doppler boosting" changing brightness depending on the viewing angle — zoom out to see the fast jet where the latter effect is especially pronounced. Faint markers show where other viewers are standing right now. Alternatively, put the black hole in front of your camera and watch it lens your actual surroundings. Light winds around the hole, so you see both what's in front of you and what's behind you at once (when the device and browser allow both camera feeds). The closer to the black hole, the stronger the bending — and the longer the light-travel delay: wave at it and watch the changes propagate inward. (unfortunately, WebXR restrictions make AR passthrough and the camera feed mutually exclusive) No signup, basic features work on every device, no data uploaded — the camera feed never leaves your device. Source code: https://github.com/aplavin/blackhole.plav.in. Enjoy having a black hole in your room, or use it for education/outreach — any questions, feedback, or suggestions are welcome!
Community
It’s fascinating how things that were inverted seem to become corrected when I point this at the pre-existing black hole in my room.
Quite amazing when crossing the pre-existing blackhole and looking back to the room while using this app!
If anyone's interested in the accuracy, this is very 'visualisation grade' software. Its a bit of a pet peeve of mine that people present these sims as being very physically accurate, when they contain major inaccuracies, some of which are very obvious and/or deliberate. This one has some serious physical limitations I wouldn't mind at all if it didn't say that this was a *physically accurate* black hole specifically, but this now falls under misleading science communication in a way that often gets hand waved away as if it doesn't matter, so we've got to clear some things up! 1. The accretion disk shouldn't be red, people just expect it because it looks cool. Black hole accretion disks are near universally hot enough to be blue. Interstellar did this too, and tried to handwave it away very unconvincingly 2. This is a non/low (?) spin black hole, which isn't super duper realistic 3. It ignores the position of the camera (which affects the lorentz shifting) 4. The doppler shifting isn't terribly accurate 5. It doesn't model the accretion disk temperature distribution or colour with any kind of accuracy. Usually you model accretion disks as a blackbody radiator, shift it by the doppler, and to display this convolve this against the human eye response (LMS), go to XYZ, then RGB, do a physical tonemapping step, before an sRGB conversion. This instead does none of that - no step of this is done with any physical accuracy. Its not even illustratively correct as we'll get into 6. The actual radiative transfer is very simplified compared to what you'd use for realsies, and isn't based on any real numbers, with very simplified equations. The opacity and emissivity of the disk is arbitrary, as is the size, and it does not correctly incorporate brightness or extinction, eg here https://github.com/aplavin/blackhole.plav.in/blob/2f004bfeca... is super simplified 7. The wrong equation is used for the doppler calculation. They use the I^3 variant, whereas the data you get out of a disk sample is *radiant flux* which is actually F_obs = F_emit / (z+1)^4. This is a very common mistake in image processing, which means that the doppler shift and observer brightness isn't correct. Surface brightness over here https://github.com/aplavin/blackhole.plav.in/blob/2f004bfeca... is *not* a spectral radiance but instead a radiant flux Stuff like the brightness -> colouring conversion is particularly inaccurate. Eg if you check out the source: https://github.com/aplavin/blackhole.plav.in/blob/2f004bfeca... It maps the pseudo brightness completely arbitrarily to colour. The resulting colour/brightness here then doesn't correspond to anything remotely physical. It also performs a *linear* mapping of a linear quantity (brightness) to sRGB (which is a nonlinear process!!), which means that it doesn't even retain any of the underlying physical characteristics of the brightness simulation, which itself is quite inaccurate. Its vibes all the way down This is all fine if you're doing visualisation, but this isn't an accurate simulation. I wish this was just called a visualisation of a black hole, but its being communicated as if this is super hard science with credentials and all
I clicked on this because I worked on the infra that simulated the famous blackhole sim in interstella. I thought "oooh this is interesting I wonder how they are going to do physically accurate on an end device" Recalling how the original particle sim was something like 100TB, took 2 weeks to generate and seemed to write in a way that killed disks. but that was >10 years ago, so what clever stuff has been done to model it locally. Its been a long time since I've looked at black holes, but what I'm not understanding is why the stars surrounding the black hole are just points, and more over why the lines are straight to the centre of the hole. from memory the way light enters the hole appears non-linear and changes on view point.
I thought "oooh this is interesting I wonder how they are going to do physically accurate on an end device" Recalling how the original particle sim was something like 100TB, took 2 weeks to generate and seemed to write in a way that killed disks. but that was >10 years ago, so what clever stuff has been done to model it locally.
Yes, totally reasonable question! Those terabytes surely were things like fluid/matter motion around the black hole, stuff like this. Here, I definitely don't simulate matter motion around the black hole as a particle/fluid sim does – instead, I focus on simulating the effects of the black hole itself. Matter distribution and motion (where it is used at all, ie not in camera mode) is described by simple functions phenomenologically. The single most notable effect of a black hole is strong light bending (+ time delays), and it is properly simulated in all modes in this app. Next, relativistic beaming (Doppler boosting) and gravitational redshift are simulated for the accretion disk emission as well. If you zoom out, the jet is visible as well – it's relatively far away, so it is rendered with special relativity only; ie, no GR, but full volumetric rendering taking all SR effects into account. Admittedly, the GR-SR seam implementation can be improved somewhat.
why the stars surrounding the black hole are just points, and more over why the lines are straight to the centre of the hole
Sorry for confusion! Points + lines are just other users looking at the black hole right now, their camera locations and lines of sight. Nothing more! In the first hours of HN frontpage, there were a lot – and I can see how one can understand them as parts of actual scene :) I decided not to change their style, not to make them more subtle – half a day later, there are already way fewer users online, and these points/lines don't look as crowded as they did.
Someone refers to a sci-fi-esque (more imaginative than scientifically accurate) virtual rendition of an interesting scientific phenomenon (black hole) in a fanous sci-fi movie (Interstellar), in their scientific analysis/critique comment on a HN thread about the virtual sci-fi-esque rentition of such a sci-fi object (black hole)(yes, a simplified easy-on-eyes pseudo-accurate rendition of a black hole, for VR/AR immersion at home, counts as sci-fi-esque, IMHO), and someone else who worked on such famous object (black hole) depicted in that exact sci-fi movie, responds to the comment. Peak HN, right here!
On a related note, there's an annoying mistake in one of the Fatalities in "Mortal Kombat 1": Liu Kang teleports with his opponent into outer space, summons a black hole with a snap of his fingers, and throws the poor sod in. But the accretion disc is red where it rotates towards camera, and blue where it rotates away!
Some are fair – of course this is a simplified visualization! Observationally, we don't really know how fast a given black hole is rotating, and here I indeed assumed a non-rotating one. It's not an inaccuracy per se, more like a missing feature. The camera mode has a (half-hidden) toggle to enable Kerr metric and set spin, but even there it's not a default. I consider the colormap choice to be completely arbitrary though, without affecting accuracy. Basically, it represents intensity at a given frequency, the image like one would get from a telescope. It wasn't intended as a faithful optical color representation! And really, in my (admittedly biased) view of a radio astronomer, I tend to assume frequencies invisible to the human eye anyway.
of course this is a simplified visualization
Its titled a "physically accurate black hole"! Please don't do this, if its intentionally not physically accurate and heavily simplified! The general public on here don't know better, and it takes someone else with years of experience simulating black holes to dig through your code to show what you've simplified. There's like a few hundred people who have the right experience worldwide to know that you've got some of your equations incorrect The issue is when you're communicating doppler, if you want to correctly show the change in doppler, you can't make the intensity or colour mapping arbitrary There's two ways to communicate accurately an example linear change in emissive power: 1. Use a perceptual brightness system, so that a linear change in power represents a linear perceptual change in perceived brightness. This accurately communicates to a viewer the underlying shift in power emission, if you want to show off how a radio telescope perceives a black hole for example 2. Use an emitted power <-> sRGB mapping (with tonemapping), so that a linear change in power is perceived as if it were a physical light getting brighter. This is more "what would this look like to a person?" At the moment the change in your image brightness doesn't correspond to anything, which means that its not really communicating any science, and it doesn't correspond to doppler. Which is fine if its just illustrative and that's clear, but again vanishingly few people will know this is a visualisation not a physically accurate render
completely arbitrary
You agree that it isn’t “physically accurate”, then… but seem to argue that you shouldn’t be called out for the false title? It’s fair enough to be called clickbait when you really did score extra clicks with a slick falsehood, surely?
Great job. Please consider turning on rotation by default (for those who missed it, it's in the parameters). The overwhelming majority of astrophysical black holes are expected to be spinning (Ker) black holes.
I think you're being very harsh. I read it as a side project of a scientist meant to entertain as much as educate. Holding it to the same standards as the Event Horizon project seems pedantic and excessive.
All they need to do is not put the label physically accurate on it then. If you call something physically accurate and decorate it with your credentials as a harvard phd in astrophysics building radiative transfer sims, people expect it to have a degree of accuracy. This sim, from a physical perspective, is wrong That's 100% fine if you present it as a visualisation with limitations and I absolutely love people making fun side projects like this and presenting them. I built a whole tutorial series on doing this, because I think people getting stuck into the field is absolutely great, and more power to everyone who wants to write anything no matter how accurate it is Its the fact that this is being presented and stated as if its a physically accurate sim made by someone with experience in the field so it must be spot on, when in reality its little better than an artists impression of a black hole, that bothers me. Its science miscommunication. Coming away from this, you might think: 1. Black hole accretion disks are red 2. Black holes do not warp the background around them, only the accretion disk 3. You might get notions about the intensity distribution of the doppler shift, or the way that cameras work near black holes etc None of which is particularly correct, and there's a lot more wrong with it too
The person you’re replying to did not hold it to that standard — they only pointed out that the standard it claimed to hold itself to was not actual. If correcting misinformation is “harsh”, reality is fucked.
https://www.youtube.com/watch?v=eQZ3LAexNxE Love, Death & Robots: Black hole used red for the disc, too.
You know, I am interested in the accuracy. I like what OP has created, but out of curiosity, where might I find the most physically-accurate, browser-based black hole simulation?
I agree. I was able to position the camera so that the entire black hole effect was negated and we were back to having a star. All I needed to do was turn the camera just right.
but why was the picture taken of black hole have accretion disk yellow?
The vast majority of scientific images, be it in papers on press releases, are using an arbitrarily-chosen colormap to map whatever numeric values are there to actual visible pixels. For the Event Horizon Telescope speficially – it is a radio telescope, so what it sees has no intrinsic "color" as perceived by a human eye at all. Same with this simulation here.
They used a greyscale -> colour mapping, it wasn't really red/yellow. It was just for vibes. Its one of my minor pet peeves about the EHT visualisations, but given that its visualisations for effect its relatively fine. I'd have preferred blue given that its such a common misconception, but if you're a paper author trying to get your work publicly recognised then rule of cool is a good enough excuse
at 1 - is it red due to red shifting due to gravity?
They're blue, in general black hole accretion disks are very hot, and anything past a certain temperature looks pale blue as follows: https://20k.github.io/assets/kerraccrete.PNG This is a colour and relative brightness accurate example of a hot accretion disk. The size, emissivity and absorption are set to arbitrary parameters, but this is human-eye-colour accurate with correct doppler and radiative transfer for a spinning black hole. Its as correct as I can make a specific model, for what a human would see standing next to a black hole taking into account the limitations of the human visual system You can get a red accretion disk like this: https://i.postimg.cc/pV8VWKhw/verycold.png But it requires the disk to be extremely cold, which is physically pretty suspect One interesting feature is that the temperature and brightness scale differently, so that its actually hard to observe the colour shift, as the brightness changes much faster than the colour. So its not something you ever really see to the human eye That said these don't do accretion disk within the ISCO, which is a major limitation
"an astrophysicist at Harvard's Black Hole Initiative" He probably knows. It's in a browser, there are probably some trade-offs. Calm down.
I tried following the instructions and use it for education/outreach, and somehow I got educated by the past while receiving outreach from the future.
I remember like 10 years ago when Occulus first came out there was that space simulation demo where you could go around the solar system in VR. You could also "fast travel" by zooming in towards a planet, moon, blackhole. Yeah, that was the day I learned I have a deep, crippling phobia of large objects. And Melanoheliophobia, which is fear of black holes. The only other time I've felt that way was snorkeling once near a giant 3 story tall bait ball of swirling fish, which was so disorienting and panic inducing that I vomited.
I did a 'swim with sharks' thing at Sea World (or whatever the Queensland equivalent is) with a few human-safe species of sharks, a few rays, and a selection of other fish. One of the other fish was, as far as I recall, some kind of giant grouper which, as far as my memory tells me, was huge, unmoving, and had it's mouth open the whole time, and it's mouth hole would have been big enough to put my entire head inside (this is according to my memory anyway). I was nervous beforehand, but once I was in (and had accepted the inevitability of my own death) it was surprisingly calm / calming floating around and having these frickin' aquatic alien species just going about their dailies around me. I went close to the massive grouper just to get the scale right (not that I can really remember, it was 26 years ago). I even looked through the perspex so I could see the non-human-safe sharks in the tank next door. After the (awesome) experience, I went and looked at the grouper from the outside (one of those underground big perspex viewing rooms) and I was back to being awed / scared by its size, and somewhat refusing to believe that I'd been in there with it. The memory of it is scarier to me than what I remember feeling when actually doing it. It's weird.
If somebody feels no fear while zooming towards a black hole, their brain has some strange wires crossed. Strongly recommend Outer Wilds. Falling into the black hole the first time was one of my most scared moments in gaming. I was totally panicking lol
To be fair, is there anyone alive who wouldn't be afraid of a black hole? It's a celestial body so gargantuan its gravity bends the light passing around it like a lens. Anyone who gets too close to one will literally never be seen again, ever.
Melanoheliophobia
Tangential, but this being a nearly word-for-word translation of “black hole fear” made me realize how odd it is that we insist on latinizing these things.
https://en.wiktionary.org/wiki/melanoheliophobia Okay, so this appears to be a neologism that may not be found outside of science fiction dialogue. But I can appreciate the humorous derivation here. Wiktionary defines this as an "irrational fear" which is in-line with other irrational fears known as phobia. So, is it possible to have a rational or healthy fear of black holes? Is it rational to be unafraid of them? I am unafraid of personally meeting the Flying Spaghetti Monster whilst not wearing a colander on my head, and I am not irrationally afraid that Azeroth will be invaded by Kardashians. I am not afraid that a dragon will bite my head off. It seems rationally to be respectfully "fearful" of the capabilities and awesome astrophysical properties of black holes, but it would be irrational to be afraid that I could fall into one, or be personally harmed in any way by one. If someone begins "seeing" black holes at the end of their suburban cul-de-sac, then probably get some professional help.
Melanoheliophobia, which is fear of black holes
Thank you for mentioning this. I am an avid space nerd. One day I decided to try Space Engine, and one of the first thing I did was get warped to a black hole. Seeing a literal hole in space time appear in front of my screen was one of the most terrifying things I've experienced. I Alt-F4'd, and never opened that application again. It's like every single atom, nay, every single subatomic carrier of information in my body was telling me to stay the hell away from that.
For anyone that experiences the same, how do you feel about this picture? https://antichamber.fandom.com/wiki/Eye_Wall?file=Eye.png It has always scared me and I believe it's for the exact same reason. It's possible it invokes no feelings on you if you haven't seen it in context (in the game it's from) so I'd like to test this
Thanks for sharing – as someone who studies black hole environments daily, I didn't even think of such a phobia existing! I wonder if some tricks, adjustments are feasible, to minimize the effects of these phobias? I see these visualizations as a pathway to make understanding such a complicated, unintuitive object more accessible – and would be great to make it even more accessible, if it makes sense... Happy to chat more, brainstorm some solutions.
Same. Especially with circular objects. Placing the black hole in my room using the AR mode was very distressing for me
I'm exactly the same. This one really give me the ick: https://www.youtube.com/watch?v=usYC_Z36rHw
I can't play Outer Wilds specifically because of this. Specially because of the black holes.
Sorry but a word for fear of black holes is ridiculous. Black holes are scary period. Anyone not feeling a deep sense of fear during that VR experience is missing something.
Please correct me if I'm wrong, but it feels like the leading edge of the accretion disk (coming towards the viewer) should be significantly brighter than it is shown here, and the trailing edge (going away from) should be significantly dimmer? Or could the brightness shown be a result of it being Kerr vs Schwarzschild?
Yeah the doppler in this picture is all wrong unfortunately, the underlying equation used isn't right here (they mixed up spectral radiance and radiant flux). The rendering is also done without taking into account sRGB, and its run through a function that messes with the brightness - so the brightness is really incorrect. Plus all the colours are wrong (it uses an amhot colouring function, they aren't based on anything), and the extinction and emissivity isn't correct either, and the camera basis is also set up wrong so it also has the wrong perspective too. Other than that its all good
One side of the accretion disk is indeed brighter than the other – in the default view in the app, the bottom part is brighter. The effect appears quite clearly visible to me, although the exact contrast depends on the colorscale mapping. Here, I tried to find a colorscale that works well for both the disk and the jet, which naturally means the leading/trailing edge contrast can be less than in the linear mapping. Hope it explains the visual effect! Kerr vs Schwarzschild (static vs rotating black holes) is a much smaller effect visually – that's why it is so hard for us to measure black hole spins (= how fast they are rotating) observationally, even with the Event Horizon Telescope.
unfortunately, WebXR restrictions make AR passthrough and the camera feed mutually exclusive
It looks like Chromium-based browsers might be doable?[1][2] Meta: About a decade ago, I rolled my own WebXR-like stack with passthrough, and played with an XR Powers of Ten zoomer. Here we are years later, and it's apparently still not something which might be deployed. In some sense, we are progressing so sloooowly. [1] https://caniuse.com/wf-webxr-camera [2] https://immersive-web.github.io/raw-camera-access/
Hmm, interesting! I saw that it's a draft, and didn't investigate further. Maybe it does work indeed on some browsers. Generally, the compatibility story turned out more fragmented than I expected. Eg, on my phone, Chrome can do AR – but cannot do two camera feeds at once; while Firefox is the exact opposite – no AR but can do both cameras at once, so that you see both front and rear lensed around the black hole properly (in the camera mode).
The distortion effects dont work for me on pixel 8 when using AR mode I just get a flat floating image of a black hole. Am i holding it wrong?
Yes, as said in the text, unfortunately this is a limitation of browser APIs. You either get AR and no access to the camera feed (this is the AR mode here, black hole floating in your room, simply overlaid on top of the camera feed) or get access to the camera feeds but no AR (this is the camera mode). I didn't find a way around it...
Same on pixel 10
This is lovely, great to see science like this! Many thanks to you and your colleagues!
Very cool, and very mind bending. Very faithful to the Event Horizon Telescope rendering. A decade ago I got really into black holes for like a few months, and I read Kip Thorne's book called "The Science of Interstellar", talking all about black hole simulations. Have you read it? I wonder how the simulation tech has evolved, as 10 years is a lot. I do wonder if you do like, size estimates of a black hole in my room. Suppose I have a black hole in my room, I'd be curious to know what the mass of that is, like a fun fact, tidbit somewhere.
The technology has come a long way indeed! The first simulations of how a black hole would look like are from 1979, by Jean-Pierre Luminet – take some time to find and look at them, it's super impressive what they achieved using that era tech! Now, we can get much higher-resolution ones in real time on any smartphone. I work in the Event Horizon Telescope, studying jets accelerated by black holes, and immediate black hole surroundings as well. I do ray tracing / radiative transfer simulations, and this app is an adaptation of those simulations – with the primary focus on being physically accurate under reasonable assumptions. And totally, I enjoyed listening to Kip Thorne's lectures and talking to him, he gives them in a very approachable style while remaining honest!
I do wonder if you do like, size estimates of a black hole in my room. Suppose I have a black hole in my room, I'd be curious to know what the mass of that is, like a fun fact, tidbit somewhere.
Forgot to answer this first! Basically, ~1 cm radius black hole has the mass of the Earth – really, Earth would need to get this small to become a black hole. I've made a very simple demo for a kids lecture I gave recently, https://plav.in/outreach_demos/squeeze-earth-v2.html. Also see https://xkcd.com/1680/ of course :)
From a certain angle it looks like an eyeball https://imgur.com/a/Dam3XT0
Them: you can’t see what’s on the inside of a black hole Me: zooms in
Very neat! Love seeing immediately grok'able simulations like this that you can just browse to. There are a few neat black hole shaders[1][2] on Shadertoy as well. [1] https://www.shadertoy.com/view/tsBXW3 [2] https://www.shadertoy.com/view/lstSRS
The web-based real-time rendering is insanely smooth, and the visual quality is stunning! Quick question: How close is this visualization to what a real black hole actually looks like in real life? I’m planning to show this to my daughter, so I'd love to tell her a bit of the science behind it! Super cool project!
For a split-second thought they meant a Kugelblitz (black hole that in theory can be made from concentrating photons from lasers) https://en.wikipedia.org/wiki/Kugelblitz_(astrophysics)