AlphaMask property for Image Gui objects

An AlphaMask would be an additional image that multiplies the original image’s alpha channel with the alpha channel of the AlphaMask.

As an example, lets say we want to display a headshot of the character’s avatar inside of a circular display.

The problem here is that the headshot doesn’t have a circular crop.

Now if we were to have an AlphaMask that looks something like this:

Then it would take the alpha channel of this image and then it would be applied to the original image, resulting in something that looks like our devforum avatars.

Another instance where this might be useful is with a map display. Perhaps you want the map to have a certain shape while it is dynamically cropped using ImageRectSize and ImageRectOffset. With an AlphaMask, you could accomplish this.

These are just a few examples I could think of, I have no doubt others would find really creative ways to utilize this.

107 Likes

This would be a brilliant feature! I have actually been wanting this for a very long time. :thumbsup:

5 Likes

An AlphaMask would honestly solve a lot of the problems I currently have with GUIs. Roblox plz.

8 Likes

Isn’t this pretty much “ClipDescendants” property for the “Frame” UI elements? Except this would apply to custom or pre-made shapes? Sounds interesting :stuck_out_tongue:

3 Likes

Support

6 Likes

If you want something that looks like your devforum avatar, just get the circle and make it clips descendent & boom.

1 Like

ClipsDescendants doesn’t work like that. It clips using the rectangular bounds of the UI item, and only when not rotated.

4 Likes

I’m sure I’ve seen games use the same system that makes the avatar icon here.

1 Like

You can fetch the rectangular avatar icon, but you cannot clip it in a circular way. My response was to your claim:

This doesn’t work, hence this suggestion.

1 Like

Alright, well could you not use a rect then? I’m sure MeepCity uses a rect to make this:

No, that does not use clipping at all for the avatar images. They just overlay another image over each rectangular avatar image, similar to this:

This is not what is requested in OP.

2 Likes

I’m pretty sure what @buildthomas is suggesting is that the actual clipping is not done with clip descendants. What it looks like is an overlay with a shape cut out from the middle, and that overlay is the same color as the background.

Edit: ninja’d

I see. In which case, I 100% support. I was going to use this neat circle idea for a game.

Thank you @Locard @buildthomas

1 Like

This has to be done, 100% support it

Not to get on anyone’s nerves by bumping this thread but I’d really appreciate this feature.

5 Likes

Imagine making orb-like mana and health icons, as seen in Diablo!

1 Like

I know I’m bumping this really late, but I find it painful uploading overlay images to achieve this effect. What if I want a completely transparent background? That isn’t possible.

Also, adding this feature would speed up loading times because clients wouldn’t have to download my 1400 pseudo-alpha masks. It’d speed up my time too, not having to make the overlays in external software.

I really hope this feature can be considered!

5 Likes