Any way to make camera deformation?

I want to make a camera deformation so everything gets distorted, like elements get stretched up. An example would be this:


Is there any way i can do this, for example a service or something?

4 Likes

The closest possible thing is tweening the field of view of the camera. It’s quite limited, but you can still create awesome effects like dolly zoom.

I think what you’re looking for is wave distortion. There is no way to do this but I feel it’s worth sharing that there was a hack week project in 2016 that did make this possible. Of course though, it’s only a hack week project, so it was never publicly available. Have a look.

More info: Post-processing effects - #33 by zeuxcg

3 Likes

This is actually something I have been wondering about for some time. I am learning OpenGL (and soon Vulkan) and we use “shaders” to map pixels or vertices to an alternate location, changing the colour, etc… I don’t know for sure how Roblox interacts with the GPU - do they use OpenGL across all platforms, or do they use platform-specific graphics APIs like DirectX on Windows, Metal on macOS, etc…

The reason I mention this is because if you try to create a distortion effect using a script, you’re more than likely doing it waaaaaaaay more inefficiently than what your computer is capable of. It’s like writing Roblox all over again in a GUI, using a single-threaded script. The GPU is meant to handle everything graphics (and now, everything that can be processed in parallel). The issue is, Roblox is cross-platform and it already seems like, based on my read from the linked thread colbert2677 provided, there’s a mess of implementation going on.

I’ll try to explain why it is so difficult in the first place to communicate with the GPU. The architecture of GPUs vary and you may know already that not all graphics APIs run the same on every GPU. There’s a reason for this - GPU retailers tend to pick favourites. And the issue Roblox seems to have is that there is no constancy in the few shading languages that exist (I despise this as well). There is no platform-independent shading language since almost any device today can run Roblox. And the funniest part is, we can’t even write our own API. Haha, I tried; I spent months trying to figure out why all these people on stack exchange, responding to people like me, just completely downplayed the idea to write our own API. And it took a while for me to realize how busted the GPU industry really is.

We have no control over it - GPU vendors don’t reveal the architecture they use. And it makes sense that they do this, so no one comes in and swoops their designs. But that leaves us in the dark - we can’t communicate with the GPU since we don’t know anything about it other than how many cores it has, virtual memory, etc… So Roblox doesn’t really have a chance to do anything outside of using another API, which for shading languages is gg, well played. Translating between languages is super annoying if there are inconsistencies, sooooooo you might as well forget about this until Roblox finds a way to implement it safely. I’m hoping Vulkan proves to be truly cross-platform.

4 Likes

The dolly zoom is near impossible to perfectly replicate since the field of view can’t be distorted for some kind of “depth” effect, since the Field of View just makes your camera go closer to your character.

You’ll need to change both the FoV and the distance to the subject to get the effect.

5 Likes