ViewportFrame Release


Awesome feature, it’s probably one of my top favorites and I can’t wait for it to come out fully supported.
This is something I made out of it (fm city):

edit: made this as well :slight_smile:


Yes it is.


It does work with surfaceguis, but not if the surfacegui is directly inside of workspace.
To make it work with surfaceguis, just set its adornee to whatever object you want it to render on :slight_smile:

As zeuxcg said here:


There are already a lot of advanced and creative uses for ViewportFrames (of course I’m going to try out the popular TARDIS effect eventually), but I’m looking to at least implement it as a photo-taking feature.


That’s actually pretty neat. Didn’t actually think of using it like that.


Not yet, the viewport frames don’t support custom shaders and without them it looks really weird and ruins the effect


How did you manage the Tardis effect exactly? I tried exactly what you did, but somehow, just panning my camera makes the part move.

NVM, I solved it.


I tried doing portals with SurfaceGUI’s too. I tried all sorts of things, but I always get distortion if I walk from side to side. I did manage to make the center line seemless though.

This is due to perspective I believe. The part of the surface closer to you will appear larger, which distorts the image.

Compensating for that distortion is impossible without shaders, as you would need to compress the part of the image closer to you.

If anyone is planning to make Portals, I recommend you watch this video, it practically tells you exactly how to make portals.

split this topic #191

2 posts were merged into an existing topic: Off-topic and bump posts


Could you elaborate on how you cropped the GUI using glass? I’ve been trying all sorts of combinations, but without success.

Wow, you are getting a lot of attention for the portals. Nice job!


Also, how did you make it possible to walk through it like that?


You should check out

It explains what you should have to make a portal work, excellent video. Essentially, you need perfect timing…


Can not wait when this will be available in game :heart:


I cant wait until we can change the shaders of the viewport frame! i just wonder what this example using rays to reflect off of this mirror and then return the color would look like with a viewport frameimage


This seems to be live in non-Studio.


Can confirm, showing in my game THANK YOU ROBLOX, BEST FEATURE EVER


Is that considered raycasting? :thinking:


Yes, I can also confirm it is


Same here, I’m pumped to see it working :slight_smile:

My game will be releasing sooner than expected, I guess!


You’re correct that it’s not possible to make a proper perspective portal with a SurfaceGui. But a custom shader to correct the distortion is not how you’d normally it this either, you’d do it by simply masking the portal camera’s view in screen space with the quad that’s the screen space projection of the portal rect.

A couple people have mentioned above the idea of trying to use a non-orthonormal camera CFrame to correct the perspective. Let me save any of you who are considering this a few hours of frustration: it can’t be done. The inverse of the model-view-projection transform you would need is not affine and cannot be represented by a CFrame. Not only that, there is no CFrame you can multiply the view matrix by to manipulate the camera’s projection transform to be the required “back projection” transform. The projection transform is a full 4x4 matrix whose 4th row, 4th column entry is zero. But the inverse of a projection matrix has a non-zero value in this position, which for a typical projection transform will be ∝(Zfar - Znear) / (2 * Znear^2 * Zfar - 2 * Znear * Zfar^2). The last (4th) row of a CFrame is always 0,0,0,1 so there is no way for a CFrame multiplication to put a non-zero value into this element of the view-projection transform matrix! This is not exactly what the value will be in Roblox, since Znear and Zfar are internally swapped, but this is an implementation detail that is irrelevant here.

Portal Cropping Using ViewportFrames (ClipsDescendants issue)
How do I crop/mask a billboard GUI over a surface?
How do I crop/mask a billboard GUI over a surface?