Frosted Glass Effect

So I have created a frosted glass effect based off an interesting realization I’ve had about the ROBLOX glass material’s properties, so you might have noticed that ROBLOX mentions that the glass material can distort light that passes thru it, i have used this, along with a model of a plane with randomized vertex offsets to make this frosted glass effect, this works because of all these little faces pointing in different directions set to the glass material, meaning they are basically jumbling the light coming thru one side, that the camera then picks up as this blurred image on the other side, this can be used for other things too, like fisheye lenses, many things can be done with this neat underutilized property of the glass material!

First step is the mesh, ill be using blender for this, create a new plane, go into modeling tab, select all vertices, click edge>subdivide, do this about 6 times, then select all vertices, click face>triangulate faces, then click mesh>transform>randomize, set normal to 1, and amount to your liking (this can be changed in-studio), then export, add a mesh part, import your mesh, set material to glass, transparency to 0.9, and boom! you might need to toy around with it or stack them side by side to increase or decrease resolution of the effect, but that’s pretty much the base of the effect.
image_2022-10-11_201823407

UPDATE, Toolbox link!: Frosted Glass - Roblox

31 Likes

also, this is my first post on devforum, so feedback is appreciated!

2 Likes

If you aren’t planning on explaining how you achieved this in neatly ordered steps, then this belongs in #help-and-feedback:creations-feedback. #resources:community-tutorials is for tutorials on how to achieve a task, which in this case would be making the frosted glass effect.

2 Likes

I updated my post to include all the steps i took to create the base of the effect.

Cool effect, but I imagine this would be rather performance intensive on larger scale. How many tris is your example?

1 Like

That’s what I was thinking, would this run well? Because there’s a lot for the engine to calculate here. Looks great otherwise

its alot, yeah, but it can be toned down depending on how much you actually NEED, need a part that covers like half the screen? high res, need a part that can only be seen 50 studs away? low res, it bieng customizable is the nice part.

you can test it, i mean it runs fine for me, id assume it would perform a lot better if people on lower end devices turn their graphics down, i think that turns off the reflection and nullifies the effect, but if it CAN be turned off, and doesn’t harm the game because of it, i think lower end players could just turn their graphics down.

I doubt the effect itself has much of an effect performance wise, I just worry about the tri count being too high. I do think that this effect could be nice for some screen effects, like maybe a nice cold effect if you properly set it to the players camera.

if you want to cover the whole screen, maybe just use the blur effect, i mean that’s basically what this is trying to replicate on a more part-based scale, this was more so made because I noticed there’s no easy way to obscure a single window or something with a blur-looking effect, oh and also, a side idea that would SHRED performance, but uh, you could probably script it to scale based off how close the camera is, it would start lagging if the camera got too close, but it would at least accurately make it constantly blurry, instead of getting close and being able to easily just peer through a single face and have no blur.

You’d be better off using Streaming Enabled, grouping the glass, and setting the fidelity to be a “streaming mesh”(i think it’s called that). It’ll then be rendered as a simple cube at the streaming limit.

Have you put the part into the Toolbox yet? I’d be curious to try it out in my game

I never actually looked into what streaming was, but i don’t think it’d be actually worth having infinite resolution anyway, considering nobody should actually RELY on this effect to substitute blur, its more so a temporary effect until Roblox actually adds things like this.

I sure can, ill do that now and post the link.

Alright! Frosted Glass - Roblox

“StreamingEnabled” is a property of workspace that loads objects (via streaming them) in if they are within a certain distance from the player (and get unloaded if far enough away). A developer is able to set whether the game should be paused while loading the assets of not. Streaming enabled can be handy for huge open worlds that are made of parts. For terrain, there is level of detail which does not really require streaming enabled.

oh, neat, never knew that there were other things besides LOD values for things like meshparts to help with that

It works very well and I didn’t notice any performance issues. I like the effect the larger glass has! Do you mind if I use this in my game?

4 Likes

I don’t mind at all! its completely free to use, its a tutorial I’m giving to the Roblox community!

2 Likes