Author Topic: Black Hole  (Read 1201 times)

LiaoMi

  • Member
  • ****
  • Posts: 698
Black Hole
« on: January 29, 2020, 06:54:30 AM »
Hi,

I got the idea to make a visual effect of a moving black hole. Here's how it should all look, with the ability to flow slowly ..


Here you can see the principle of geometrization, Accretion disk - https://www.slashgear.com/wp-content/uploads/2015/02/warp.jpg - https://blogs.futura-sciences.com/e-luminet/wp-content/uploads/sites/11/2019/06/Viergutz-Fig10.jpg
I found a couple of articles, there are many formulas, it looks promising  :biggrin:



Ray Tracing a Black Hole in C#
https://www.codeproject.com/Articles/994466/Ray-Tracing-a-Black-Hole-in-Csharp

But I think this is not quite right, as the implementation complexity is too high. I found another implementation, observatoryBlackHoleShader - https://github.com/KihangPark/observatoryBlackHoleShader


"This shader can generate the light bending effect when the light ray past the gravity field. Main purpose of this shader is creating black hold effect." This method is more or less ... is it possible to make a double crown ?!


https://github.com/Louqou/BlackHoleParticleSystem
Another beautiful implementation ..

I would like to draw the geometry with simple lines, and then make an imitation of motion through the blur effect, here is my question, is it possible to do something similar as in the picture below and not using sophisticated graphical tools like openGL ?!
https://static1.bigstockphoto.com/2/8/2/large1500/282281023.jpg

Siekmanski

  • Member
  • *****
  • Posts: 2330
Re: Black Hole
« Reply #1 on: January 29, 2020, 07:39:41 AM »
Yeah, it can be done in software, you have to create all the math functions with the FPU, but it would be very slow.
It's "easier" to do it with a pixel shader, the shader-compiler provides many of the math functions . You get much faster frame rates.
Creative coders use backward thinking techniques as a strategy.

daydreamer

  • Member
  • *****
  • Posts: 1360
  • building nextdoor
Re: Black Hole
« Reply #2 on: January 29, 2020, 08:02:01 AM »
Yeah, it can be done in software, you have to create all the math functions with the FPU, but it would be very slow.
It's "easier" to do it with a pixel shader, the shader-compiler provides many of the math functions . You get much faster frame rates.
closest thing I seen here is strange attractor,but it crude pixel plot compared to goodlooking pixelshader,that also handles color channel ARGB with floats and can use all kind of hardware filters make it look much better

Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
Gone serverside programming p:  :D
I love assembly,because its legal to write
princess:lea eax,luke
:)

LiaoMi

  • Member
  • ****
  • Posts: 698
Re: Black Hole
« Reply #3 on: February 03, 2020, 10:51:13 PM »
Yeah, it can be done in software, you have to create all the math functions with the FPU, but it would be very slow.
It's "easier" to do it with a pixel shader, the shader-compiler provides many of the math functions . You get much faster frame rates.

Hi Siekmanski,

thank you  :thumbsup:, I’ll go in "pixel shader" direction  :thup:

Siekmanski

  • Member
  • *****
  • Posts: 2330
Re: Black Hole
« Reply #4 on: February 04, 2020, 02:43:51 AM »
Hi Siekmanski,

thank you  :thumbsup:, I’ll go in "pixel shader" direction  :thup:

Hi LiaoMi,

For more info, check out this topic: Fun with Pixel Shaders and maths
http://masm32.com/board/index.php?topic=6904.0
Creative coders use backward thinking techniques as a strategy.

LiaoMi

  • Member
  • ****
  • Posts: 698
Re: Black Hole
« Reply #5 on: February 04, 2020, 11:44:36 PM »
Hi Siekmanski,

thank you  :thumbsup:, I’ll go in "pixel shader" direction  :thup:

Hi LiaoMi,

For more info, check out this topic: Fun with Pixel Shaders and maths
http://masm32.com/board/index.php?topic=6904.0

 :thup: :thup: :thup: :thup: Hi Siekmanski,

I rediscovered this topic  :biggrin:, a lot of useful information, I found similar examples on the site - https://www.shadertoy.com/, here are a couple of them - https://www.shadertoy.com/view/lstSRS and https://www.shadertoy.com/view/Xsc3RH, very beautiful work  :dazzled:

HSE

  • Member
  • *****
  • Posts: 1379
  • <AMD>< 7-32>
Re: Black Hole
« Reply #6 on: February 05, 2020, 01:49:53 AM »
... a visual effect of a moving black hole.

Just in case, You can ask Gunther and Raistlin how to make a "real" black hole  :biggrin: :biggrin:

(for comparative porpose, of course ...)

LiaoMi

  • Member
  • ****
  • Posts: 698
Re: Black Hole
« Reply #7 on: February 05, 2020, 03:34:59 AM »
... a visual effect of a moving black hole.

Just in case, You can ask Gunther and Raistlin how to make a "real" black hole  :biggrin: :biggrin:

(for comparative porpose, of course ...)

Hi HSE,

 :biggrin: :biggrin: I can ask, provided that it does not become too "real" ..

Hugofirst1994

  • Regular Member
  • *
  • Posts: 1
Re: Black Hole
« Reply #8 on: August 07, 2020, 11:44:50 AM »
Great choice to be here  :biggrin:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7542
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Black Hole
« Reply #9 on: August 08, 2020, 06:31:34 AM »
This is the NASA image of a black hole. I have a sneaking suspicion that using image data would be the best way to represent a black hole.

hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy: