{"id":13,"date":"2020-06-05T00:45:29","date_gmt":"2020-06-05T00:45:29","guid":{"rendered":"https:\/\/improbable.solutions\/2020\/06\/05\/i-made-a-black-hole\/"},"modified":"2020-06-05T00:45:29","modified_gmt":"2020-06-05T00:45:29","slug":"i-made-a-black-hole","status":"publish","type":"post","link":"https:\/\/improbable.solutions\/2020\/06\/05\/i-made-a-black-hole\/","title":{"rendered":"I Made a Black Hole"},"content":{"rendered":"
\n

It\u2019s no secret I am fascinated by space. I mean, I\u2019ve made multiple games about spaceships, I religiously watch every space launch that happens whenever I can get away with being awake. I am an insufferable pile of space facts, waiting to come out.<\/p>\n

I\u2019m also Good At Computers\u2122 and currently know enough about shaders to make myself a danger to those around me. I was working on some artwork for Solar Dominion when I realised that my work on creating a relatively scientific depiction of both wormholes and warp fields could easily become a black hole.<\/p>\n<\/div>\n

<\/p>\n
<\/p>\n
\n
<\/p>\n

\"unknown.png\"<\/p><\/div>\n<\/p><\/div>\n<\/figure><\/div>\n

<\/p>\n
<\/p>\n
\n
<\/p>\n

\"unknown3.png\"<\/p><\/div>\n<\/p><\/div>\n<\/figure><\/div>\n

\n

Of course as anyone who has watched Interstellar (part of the Matt Damon has a Bad Day In Space trilogy) will know, a black hole isn\u2019t just a black hole in space. There\u2019s the accretion disk to contend with. A giant, swirling donut of plasma and dust superheated by gravitational tidal forces, impacts and radiation from the poor matter unfortunate enough to fall into the event horizon.<\/p>\n<\/div>\n

Play Blackhole on itch.io<\/a><\/p>\n

\n

This rendition isn\u2019t perfectly physically accurate. The scale of the warping effect is off, it can\u2019t perfectly display objects behind the black hole, nor can it reflect anything in front of it properly (or anything at all behind the camera). It also makes mistakes for objects inside the warping effect. But it\u2019s close enough, and you can get something approximating the famous shot from the film at highly oblique angles.<\/p>\n<\/div>\n

<\/p>\n
<\/p>\n
\n
<\/p>\n

\"unknown.png\"<\/p><\/div>\n<\/p><\/div>\n<\/figure><\/div>\n

\n

The effect is composed of two shaders, one for the event horizon and one for the accretion disk. The disk is simple and converts the distance from the centre to a gradient that runs from white to black through red, a poor approximation of the black-body colour curve. There\u2019s then some noise applied and the whole thing gets spun to produce the trail effect. This gets applied to a thin donut shaped mesh and it\u2019s done.<\/p>\n

The event horizon is more complicated by far. At it\u2019s core, it\u2019s measuring the distance from the centre, and then replacing that pixel with a pixel further along the line towards the centre to simulate the effect of light bending around the singularity. When used as a wormhole, it takes a texture for the other side and does the opposite, selecting a pixel further away from the centre.<\/p>\n

On both sides, it is possible for this to select a pixel that is off-screen. In this case it wraps around to a reflected version of the screen which gives a convincing illusion that it can actually refract behind the camera. The side of the event horizon and the severity of the lensing are both configurable, and in theory it is possible to show items moving through the wormhole although there\u2019s still some bugs to work out with that.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"

This webpage can only be observed indirectly, based on its surroundings.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/improbable.solutions\/wp-json\/wp\/v2\/posts\/13"}],"collection":[{"href":"https:\/\/improbable.solutions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/improbable.solutions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/improbable.solutions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/improbable.solutions\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":0,"href":"https:\/\/improbable.solutions\/wp-json\/wp\/v2\/posts\/13\/revisions"}],"wp:attachment":[{"href":"https:\/\/improbable.solutions\/wp-json\/wp\/v2\/media?parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/improbable.solutions\/wp-json\/wp\/v2\/categories?post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/improbable.solutions\/wp-json\/wp\/v2\/tags?post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}