UI Blur [AUTOMATIC]

Hi, so I was looking to use this module in a project, but I had one question.

My project uses all SurfaceGuis, but when I use this module, because it’s meant for ScreenGuis, it I guess works as intended, but not how I intended. (The blur stays stationary on the SCREEN, like a ScreenGui, instead of on the SurfaceGui.)

So my question is… is there a way to get this to work for SurfaceGuis? I was reading through the code and I’m going to be honest, it’s confusing as hell to me. :joy: But if it works for ScreenGuis, there has to be a way for it to work with SurfaceGuis.

2 Likes

No, you wouldn’t be able to use it with a SurfaceGui, SurfaceGuis are rendered on the face of a part, this uses (iirc) glass directly in front of the camera to mimic a blur because of some oddities with rendering transparent glass. Thus, no, unless you want to blur out the ScreenGui entirely.

2 Likes

I understand that, but the reason I was asking is because the SurfaceGui IS on a part, and this uses a part to mimic a blur effect. The expected results actually was to blur the entire SurfaceGui out. I’ll try a few different ways to do this, but if you have any ideas to try, let me know :+1:

1 Like

Nothing seems out of place, Well done.

1 Like

I dont think it will work on surface guis, The parts are all inside the camera, I do think there is a way to do this on surface gui but this topic isnt made for surface gui its just made for the regular screen gui resources.

Not impossible to make though im pretty sure it couldnt be that hard to get this effect working on a surface gui.

Continuing… Yeah, I saw that. I’ve been attempting to understand the code, and if I understand correctly, the way the position for the parts are calculated is by taking the AbsolutePosition and the AbsolutePosition + AbsoluteSize of the frame and manipulating them by using camera:ScreenPointToRay to create a ray, which then you take the Origin position of said ray to calculate the position of the parts. The issue is, this is only accounting for the position and size of the frame relative to the player’s screen size, and not relative to the part’s size, since it uses absolute values, which return the size and position exactly in Pixels.

Note: For any people who don’t understand Absolute Positioning and Sizes in Roblox, any Absolute value for a UI element is a Vector2, because they are measured in pixels, which are 2D.

That was a lot, but what I need to do is instead, calculate the position and size relative to the part’s size, to then calculate the ScreenPointToRay’s Origin, which SHOULD position the parts correctly. (In theory, anyway.)

So yeah, I think it is definitely possible, I just need to figure out how to turn my solution into actual code, which shouldn’t be too hard.

1 Like

Sorry to continue this, but I figured it out. Turns out I was correct, and instead of using the frame’s properties, you need to use the part’s properties that the frame’s SurfaceGui is on. It’s working perfectly!

Nicely done! and dw your good lol

when using direct blurring make sure to not parent script to StarterGui, because when I did it created more blur parts upon humanoid death (without moving them with gui), better parent it to starter player so script wont reset

image

1 Like

im parenting directblur to my frame, not working!

Here is the full guide

4 Likes

you spelled submit wrong btw but nice ui otherwise

Very nice indeed. I’m considering of adding this as an option for my admin commands script

3 Likes

damn, that looks clean! what font did you use for the time on the stopwatch?

1 Like

Probably image labels not text

1 Like

It’s a custom font made with ImageLabels. The custom font was made and controlled by my seven segment display module that I made

2 Likes

digital numbers font
(chars: 4593)

Really cool! might save this for sometime :slight_smile:
Also, is it open source or should i give credits?

1 Like

Really useful thing. thanks! I’ll use it in my gui

This can really be handy if you want to create a racing game with blur on the edges of your screen as you go faster. Really nice!