Bubble Module - Distortion Effect

forgot to mention one thing: viewing code in mobile (i mainly use my iPad and can’t open models in mobile)

while I do agree with you, I didn’t mention what I just mentioned now earlier (also not everyone who plays roblox uses the devforum nor have known about it, and more people used github than the devforums)

It ain’t Roblox who has come this far, it’s the devs… This is a bug unintended feature, that we devs found by accident… Roblox didn’t add this on purpose, we just use it because it’s the best we’ve got. Now, while this is an unintended feature on Roblox, many engines use SSD (screen-space distortion) already, which is what this is mimicking. Roblox really needs to add this as an intended feature.

5 Likes

It looks like roblox fixed the bug :sob:

They couldn’t have! This was one of the greatest things we’ve found out about Glass by far! If they’re taking this bug feature away, I hope that they have plans of properly supporting distortion.

Edit: They didn’t? I tested this out in Studio just now and it still works fine. Maybe you had a problem getting the Module to work.

False alarm.

Thats strange, I tested it and the distortion affect isn’t achieved just looks like tweening regular transparent meshes. I can’t see how I could have messed it up lol. Oh well

Does lighting have to be set to future?

I don’t think so. Is the transparency higher than 1?

So does this effect still work properly? Or has Roblox fixed the issue that allowed this to exist?

They haven’t removed glass, so yes, it will work.

why is it not working
image

I think your studio graphics level is too low. Every studio graphics level below 14 disables realistic effects like lighting effects (bloom, sunrays, etc.) and glass.

1 Like

the graphics level is 21 but the effect only shows when playing and not running

i love you so much for creating this

1 Like

Added a follow function to the module if you guys need it, it basically just welds the bubble part to whatever you want it to follow

function BubbleModule.CreateFollowBubble(FollowPart, StartSize, StartTr, EndSize, Time) -- Origin CFrame, Mesh ID, Start Size, Start Transparency, End Size, Time, Follow
	local Part = game.ReplicatedStorage.BubbleModule.Mesh:Clone()
	Part.CFrame = FollowPart.CFrame
	Part.Anchored = false
	Part.CanCollide = false
	Part.Massless = true
	Part.Parent = workspace:FindFirstChild("Effects") or workspace
	Part.Material = Enum.Material.Glass
	Part.Size = StartSize
	Part.Transparency = StartTr
	
	
	local WeldConstraint = Instance.new("WeldConstraint")
	WeldConstraint.Parent = Part
	WeldConstraint.Part0 = Part
	WeldConstraint.Part1 = FollowPart
	
	

	local RequiredHighlight = Instance.new("Highlight")
	RequiredHighlight.Enabled = false
	RequiredHighlight.Parent = Part
	
	--cleanup
	game.Debris:addItem(Part, Time)
	--game.Debris:AddItem(WeldConstraint, Time)

	local Info = TweenInfo.new(
		Time, -- Length
		Enum.EasingStyle.Sine, -- Easing Style
		Enum.EasingDirection.Out, -- Easing Direction
		0, -- Times repeated
		false, -- Reverse
		0 -- Delay
	)

	local Goals =
		{
			Transparency = 1;
			Size = EndSize;
		}

	local Tween = TweenService:Create(Part, Info, Goals)

	Tween:Play()
end
1 Like

yeah doesnt work on low graphics u need 8+ for it to work

it works in the place you gave link to download for some reason, but not in my game when i try to add that thing, module in replicatedstorage, part named right, but it doesnt work at all.

nvm due to 0 explanation on setup i found that i need to hit play instead of run and also add another script

This module should contain a distortion0, and distortion1 arguments which merely sets the initial and final transparency of the sphere. Transparency 100 would create a massive lensing effect whereas a transparency of 2 would create a low distortion effect

there is a StartTr (starting transparency) argument. the end transparency is set to 1 so it can be removed without it being obvious.

I honestly don’t like how the code for this module is written. Like how it assumes that the Bubble Module is inside of ReplicatedStorage. I also don’t like the fact that you do not provide any instructions on how to replicate the bubble that is shown in the video. And it needs more functions like the function @Meat_Make provided above.