Black hole lensing effect

So i was just wandering around in studio where i got an idea of what if i can make a black hole so i created a script that pulls objects when its near but the problem is idk how to make lensing effect for black hole


Black hole lensing ^

so i want help on how i can make it

any help be appreciated

This isn’t possible in roblox (since we can’t write our own shaders), unless you could use the glass material in some way. There’s some GLSL code on this site which does refraction if you are interested.

but that glsl code is useless since i cant write shaders lol
anyways thanks

1 Like

Try using roblox’s particle system

hows that possible i dont think i can do anything with roblox particles lol

For simulating the blackhole:

Firstly and the most important part. Physics. It requires a lot of math. Force of Gravity. Gravitational Attraction/Pull. A bit of trigonometry and basic physics such as working with velocities, acceleration, mass etc. Secondly, the curves, they require a lot of math.

And for the lensing effect, I found this paper:

http://rantonels.github.io/starless/

It requires hours and hours of work to create a realistic and a smooth black hole simulation or lensing effect. Its quite hard to do that, afaik. But I’ll look into creating something like this, since you brought this up. Really fascinating.

thx but i suck at math i did not understand any word in that equation you showed :sweat_smile:

The equations are a combination of basic trigonometry, math, and physics. Good luck :+1:

I guess it is possible to emulate that effect with basic optics that roblox have, but I have no any idea how to make it. Already tried to play with unions and meshes and glass material, and achieved nothing of that kind. Here is a screenshot from pirate’s tale that is I was basing on:
image

Upd: nvm, both unions and meshes gives the needed effect, but only when render is began, like a play test started.

1 Like

i tried experimenting with the glass effect and kind of got somewhere
robloxapp-20210830-1109296.wmv (2.1 MB)
i made it using by putting an inverted sphere mesh with glass material and also relection to 1 and transparency .2

I made something looks like it but it’s not quite what it’s needed to be but yeah a “little” looks like the “black hole lensing effect”. I wouldn’t say I made it, I actually just grab a reflective sphere and play around with lighting etc, and the results are shown below.

You can contact me via Discord if you’re interested of how I done it.
My Discord: NAS_.A#5927

4 Likes