News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Black Hole

Started by LiaoMi, January 29, 2020, 06:54:30 AM

Previous topic - Next topic

LiaoMi

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

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

Quote from: Siekmanski 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.
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

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

LiaoMi

Quote from: Siekmanski 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.

Hi Siekmanski,

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

Siekmanski

Quote from: LiaoMi on February 03, 2020, 10:51:13 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
Creative coders use backward thinking techniques as a strategy.

LiaoMi

Quote from: Siekmanski on February 04, 2020, 02:43:51 AM
Quote from: LiaoMi on February 03, 2020, 10:51:13 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

Quote from: LiaoMi on January 29, 2020, 06:54:30 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 ...)
Equations in Assembly: SmplMath

LiaoMi

Quote from: HSE on February 05, 2020, 01:49:53 AM
Quote from: LiaoMi on January 29, 2020, 06:54:30 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" ..

hutch--

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.