DistanceFade - A transparency falloff effect for your games

I’m sorry, but I don’t understand how I could do this. Could you provide an example? Forget the last edit, mistake

i don’t really have the time to re script the module right now, but a good place to get started would be in the updatesidegradient and updatecornergradient functions, and switch around the values in the defaultCurve table… someone else commented about the same thing a little while back, maybe they figured out a solution?

1 Like

any progress on this? I also need this done

whenever I switch around the values in the default curve table it just makes the thing smaller, managed to make the middle ones transparent, but still struggling on this

alright ill give it a try tmrw

I didn’t try it, i just asked because I was just curios after seeing that effect being done in another engine, might have been halo or helldivers 2, since it also would be great if you had a part like that in first person

Nice release. Thanks for this and all of the different examples.

Will be using it in my game, here’s a clip of what I’ve done with it (mainly to show where different safezones are): Using xander22’s distance-based forcefield effect (youtube.com)
I have it so that it shows when they approach the barrier and if they shoot it.

Did end up making a few optimisations though like setting the player’s character & HRP on characteradded/removed instead of trying to reference it through game.Players every step if a position was not provided.

Was also an instance where there was a function (ApplyCircularGradient) that only took one parameter but was being given 2 on line 383 and an if statement starting on line 637 that has blocks that do the same thing.

2 Likes

Great use of the module, I’ve used in a few games as well and have done some modifications similar to what you mentioned. Xander did really well with this and it’s cool to see GAR use it.

1 Like

tyyyyyyy, That would save me a couple days worth of trying to figure it out.

dude that implementation is awesome! and thanks for letting me know where it could be optimized

1 Like

DistanceFadeInverse.rbxm (15.8 KB)

this should get you started, i’m not sure how to help with setting the area around the effect opaque/transparent, but this is basically the module flipped

1 Like

Thank you, by the way. are you messing with the surface gui scaling? whenever I put a frame in it, it just shrinks

i think so, to make the circle smaller while keeping texture the same size

hmm, do you think I could have multiple distance fade things, but at different angles? How could I do that with minimum lag? The reason I need this is because the shading isn’t exactly curcular and if I have lots of them rotated differently it’ll look more like a circle

might work, but it would cause an overlay between the different distance fades

1 Like

oh, and how would I know how much the thing has been scaled down, you said you were messing with the surface gui for scaling, how do I know the number you scaled it down with? I basically want to add 4 frames going from each side to make the whole thing white and just have a hole in it. I would also like to know the transparency of the edges of the inverse so I can have a smooth transition from the edges to the background

thanks a lot, i really liked this repyl, reply is my favotrire wordm, join me IN GPO

Can you please make this a model? For some reason when i try to download it downloads as a “WEBP” and cannot be used in studio.

Can you please make this download, into a model? I cant use it as a download.

sure, which file(s) do you want me to publish

1 Like