ViewportFrame Masking

About to use this on every project ever just because i can finally get rid of the annoying outlines. You can also make viewport frames look more real now. I’m sure i can get better results if i tweak the lighting a bit more but heres whats possible. https://www.youtube.com/watch?v=YT5L2Qh474I

1 Like

Im still kind of confused though. about the alpha thing, is it mandatory to make a mesh with 0 alpha on blender or can i make one directly on roblox? and if so how can i mask the entire screen (so only the glass parts can show the viewportframe)

1 Like

Right now you can only create the 0 alpha meshes in Blender. However if EditableMeshes will ever be supported in ViewportFrames you’ll be able to make 0 alpha meshes in game as well.

Glass parts can be used to reveal 0 alpha meshes which would otherwise be invisible. That’s how Portal1 example, Text example and both character examples work.
You cannot use regular parts in place of the 0 alpha meshes since they don’t appear invisible normally like 0 alpha meshes do.
This severely limits what can be revealed by glass parts since you can only show non-transparent 0 alpha meshes and they can’t have textures, decals etc. applied to them.

this is so cool i love this so much

1 Like

wha?? really cool i liking it.

1 Like

Alright i used your blender exemple for this however theres the problem of how do i export it with the erased alpha to roblox. itried exporting it as an fbx and importing to roblox but it wasn’t invisible

Exporting it as fbx should work, when you add the mesh to the workspace it’ll appear normal.
You can test if the mesh works by adjusting its transparency to anything above 0 which should make the mesh fully invisible.

If the mesh works as intended then you can just add it to a ViewportFrame for use as a masking mesh.

Thank you! it works perfectly!

for those who wants to try heres a really simple exemple of masking an entire viewportframe and putting a moving part of glass infront of it

How did you manage to inverse / mirror the camera? I tried everything, from inversing the cframes (which caused a issue where every part was inside out and rendring very weirdly), to manually inversing every cframe from every part.

Inverse both CFrame of parts and CFrame of camera.


Thats what I am doing, but since I am not flipping the normals but rather simulating it, meshes and images are not inversed/flipped causing these visual issues and I am trying to fix these like in the video @6mikael6 showcased

1 Like

Hm, unsure how to fix that…
I’ll think, if I’ll come up with idea how to fix that…

1 Like

Hm… IDK if it’s possible, but try to flip only 1 relative rotation axis, and not completely inverse CFrames?


Still the same issue, it seems like only inversing one axis doesn’t change anything…

Unfortunately the character cant really be mirrored without having flipped faces. The masked reflection video shows how the character doesn’t actually get mirrored.
I mirrored the animations however with a pretty convoluted method by reading Motor6D info from the opposite limb for each paired limb and mirroring the non-paired limbs.

1 Like

Appreciate the response, I wish roblox would allow us to inverse viewportframes, but apparently for some reason, roblox’s engine is trying everything to prevent that. I am also reading and inversing motor6d’s and it works fine on blocky characters, however on characters like mine the arms are twisted very weirdly…

I’m currently attempting to recreate this video which used vpf masking: twitter link (not the fading part)

I’ve got a simple check to see if the camera is behind the portal, at that point it disables the vpf.
Theres only one issue i have, which is masking out the side of the portal thats not supposed to be visible. It’s not supposed to render on the side that the camera is on and it seems i hit a dead end.

I would appreciate if anyone who found the solution to this would teach me how they did it. I’ve seen some other people recreate it on twitter (DecimalCubed). However, i still have no idea how they did it.

Video:

UPDATE

I’ve been observing the videos by DecimalCubed & it turns out he does not use VPF masking.