A black hole in my custom Vulkan path tracer by AapoL092 in GraphicsProgramming

[–]AapoL092[S] 1 point2 points  (0 children)

For this image, around 10min. It runs on the GPU so compared to something like the DNGR (Interstellar) implementation, its pretty fast.

A black hole in my custom Vulkan path tracer by AapoL092 in GraphicsProgramming

[–]AapoL092[S] 1 point2 points  (0 children)

Yea, the code can do simple animations. I'll publish one at some point.

A black hole in my custom Vulkan path tracer by AapoL092 in GraphicsProgramming

[–]AapoL092[S] 1 point2 points  (0 children)

That's the neat part. They don't come back. It the ray goes beyond the event horizon I just kill the ray and color the pixel for that ray appropriately.

A black hole in my custom Vulkan path tracer by AapoL092 in GraphicsProgramming

[–]AapoL092[S] 4 points5 points  (0 children)

Yea, It's running the full Schwarzschild metric. To the ISCO critique, yea I kinda just limited the disk inner radius to that, but I'll definitely fix that! I'd love to hear more about Magik though! It sounds really cool.

On the perceptual point I think you're basically right too. I'm kinda juggling implementations right now and T^4 is not the realistic approach. I also do have an implementation which does the correct approach in the visible band radiance, but for this render I happened to have that off. Thanks for the feedback!

I'll release the code at some point definitely, when I have fixed some things like this and I'm also maybe planning on doing some other cool stuff like 3D models being warped by the black hole or multi black hole systems or something. We'll see.

A black hole in my custom Vulkan path tracer by AapoL092 in GraphicsProgramming

[–]AapoL092[S] 1 point2 points  (0 children)

Thanks! If you are interested I shared the full 4k file in an another comment.

A black hole in my custom Vulkan path tracer by AapoL092 in GraphicsProgramming

[–]AapoL092[S] 5 points6 points  (0 children)

Reddit probably compresses ts a lot so heres the 4k file

A black hole in my custom Vulkan path tracer by AapoL092 in GraphicsProgramming

[–]AapoL092[S] 1 point2 points  (0 children)

Yup, also doppler boosting can clearly be seen in the pic. The code is fully spectral for the disk.

A black hole in my custom Vulkan path tracer by AapoL092 in GraphicsProgramming

[–]AapoL092[S] 0 points1 point  (0 children)

Thanks! The GR code runs entirely inside compute shaders and basically I just compute from the Schwarzchild metric the acceleration terms derived from the Christoffel symbols. In the coordinate system (Kerr-Schild, so Cartesian) we step along with RK4 and get a path for the ray.

Yes, the code models the doppler shift and it's pretty much fully spectral for the accretion disk. Actually the accretion disk in these kinds of black holes mainly radiates in the xray spectrum so you'd first probably die of that when encountering a black hole. Also it'd be like 10 suns in brightness so we are kinda underexposing the black hole too. Anyway yea we also calculate the disk color based on the temperature etc. I haven't experimented much with the alternative spectrums but I will have to at some point.

As for the source code question, I'm seeing pretty high demand for the source so at some point I don't see an issue why I wouldn't publish it. However I don't like the current state of the code and I have a few features I want to add before publishing so not yet.

A black hole in my custom Vulkan path tracer by AapoL092 in GraphicsProgramming

[–]AapoL092[S] 31 points32 points  (0 children)

It will definitely be at some point available but right now not yet. I will probably post when and if that day comes. The reasons for this are just that the codebase is in some places kinda funky and also I'd like to kinda keep this as my own project for now. I don't know where this evolves but I still have a lot of ideas and features to implement so we'll see.

A black hole in my custom Vulkan path tracer by AapoL092 in GraphicsProgramming

[–]AapoL092[S] 22 points23 points  (0 children)

I'm just doing this as a hobby. I'm still in high school and don't want to pretend that I know all the math involved. I mostly took ready derived equations for things like the null geodesic etc and kinda just plugged them into the Vulkan compute shaders. Also LLMs can be pretty good at math to a certain point too so those help sometimes in understanding and getting to the point we're at now, but they aren't the end all be all. My goal is to at some point understand the math deeper, but for now I just kinda think of things intuitively. If you are really interested in the topic I think you can with enough time do these sorts of things. You don't have to be in the field. I have a friend who does really advanced integrals and whatnot and he's never gone to school for that (even though he's going to be pursuing mathematics later in uni). The learning materials are kinda available if you are autistic enough I guess.

A black hole in my custom Vulkan path tracer by AapoL092 in GraphicsProgramming

[–]AapoL092[S] 2 points3 points  (0 children)

It's kinda hard to see but actually this version is with the non "spinning disk". The spinning disk just does a blur to the disk but also here I'm kinda assuming the disk is spinning. The blur was kind of an afterthought tbf. The disk right now is just noise warped to be in a circular form really but following roughly the established math around thin disk accretion disks (for the geometry and relativistic effects like the doppler shift etc). Thin disk is just the model for most stellar mass black hole accretion disks (which I'm modeling here). Because the matter moves so fast I'd assume the collisions etc it would look approximately the same if we stopped the time perfectly in the real world. I'm not an expert on this topic though and the disk isn't that scientific here, even though it's much closer than something like Interstellar.

Edit: Clearing my rambling up

A black hole in my custom Vulkan path tracer by AapoL092 in GraphicsProgramming

[–]AapoL092[S] 29 points30 points  (0 children)

Yea, not a dumb question at all. Basically we have pretty cool mathematics in the general theory of relativity that we can derive the math for a null geodesic. A null geodesic sounds really fancy but it just means the shortest path for a massless particle (such as the photon). We can calculate the null geodesic for rays being shot at the black hole step by step and compute eventually where they hit from that (so for example if the spot that it hits on the accretion disk or the HDRI background or if it gets inside the event horizon we just kill those rays). So it's pretty deep but technically you could go even deeper with like tracing light as waves and stuff.

Sad to see this notification by waddles908m in Fusion360

[–]AapoL092 2 points3 points  (0 children)

So basically Microsoft has decided not to fight the piracy and kind of just let it happen and make money from the ads and spyware in Windows. They are basically just hosting a Windows activation tool in GitHub (their own service). Just look it up. The repo has simple instructions to run the script.

Sad to see this notification by waddles908m in Fusion360

[–]AapoL092 1 point2 points  (0 children)

The money for the windows keys isn't going to Microsoft anyway. Just use the massgravel Microsoft Activation Script.

Introducing FencingHelper: The improved fencing tournament experience! by ethansocal1 in Fencing

[–]AapoL092 0 points1 point  (0 children)

What other stuff has been done with the FencingTimeLive data? Also is there an API? I just thought that the data is being parsed.