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
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.
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.
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.
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:
Upd: nvm, both unions and meshes gives the needed effect, but only when render is began, like a play test started.
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