Misc Scripts & Modules - My smaller projects

It shouldn’t cause any performance issues. All the module does is apply color correction effects to Lightning to create the desired filters.

@mircostaff He asked about the grain, not the filters.

@FragmentFour I don’t remember the numbers, and cant check rn. You can run it yourself and just check the Script Performance numbers. I can’t imagine it being that bad though.

I can definitely optimize more if needed.

1 Like

That one is definitely on me. I had the source for the filter code open while reading their question. :confused:

2 Likes

No worries. Easy mistake to make, as they are both visual effects.

Boat “Gui Guy” Bomber

In terms of the ClickDetector API, how does it stack up in terms of performance to the standard ClickDetector?

2 Likes

Definitely worse performance than the Instance. The Instance gets handled by the engine whereas mine runs on Lua in-engine. I can’t win that competition.
However, mine is useful in cases where the stable behavior is necessary. It’s trading a bit of performance for more functionality and use.

1 Like

I figured that’d be the case, but it does function as the click detector would for standard purposes, just with added features?

I updated the OP to have a clear dif list after this reply. He didn’t ask before reading, so don’t think his question was redundant. :slight_smile:

I used it in place of a ClickDetector in a secret project of mine, if that’s what you’re asking.

The end behavior is just a stable ClickDetector, even if the internals are different.

You can refer to the dif list in the OP.

Other than those things, they serve the same purpose. They give hover and click detection for BaseParts, with a MaxActivationDistance. Mine is more reliable, while the Instance is more performant.

1 Like

That Subway station doesn’t look like roblox…Anyways thanks for Film grain

2 Likes

I love your lighting module! Any chance you could add in the Warm, Cool, Negative, and Vintage settings as well?

2 Likes

Oh gosh, I didn’t realize I was missing those! I’ll definitely add them in when I have a chance.

EDIT: Added them.

2 Likes

Thanks for sharing these modules. I edited your Filter script to tween between filters instead of deleting old filter and I think you should do that as an option
edited version :

function module:ApplyFilter(FilterType)
	
	if Applying then repeat wait(0.1) until not Applying end Applying = true
	
	local Filter = self.Filters[FilterType] or self.Filters.Realistic
	

local TS = game:GetService("TweenService")
local TI = TweenInfo.new(.5)
	for i,v in pairs(game.Lighting:GetChildren()) do
		if v:IsA("PostEffect") then
			for o,p in pairs(Filter) do
				if v.ClassName == o then
					local goal = {}
						for l,vv in pairs(p) do
						goal[l] = vv
						end
					local a =  TS:Create(v,TI,goal)
					a:Play()
				end
			end
		end 
	end
	
	Applying = false
	
end
1 Like

This is a great idea, but this implementation would accidentally mess with your other in game effects!

You’d need to track the filter module’s Instance effects, and loop through those to only apply to them.

Maybe you can give special name for your filter effect I made like this because I dont have pp-effect other than these and I change it with region3

:slight_smile:

2 Likes

Nice work on that light module! I have a question and it is that how did you make that effect with the light in that subway station. Did you make it using a Billboardgui and an imagelabel? I would appreciate if you answer my question, thank you very much for your attention.

Yeah, those flares are BillboardGuis with an ImageLabel that has ImageTransparency set based on the angle to the camera.

2 Likes

That pretty landscape demo looks amazing!
How’d you do that grass? It looks way higher-quality than default terrain grass. Are they meshes, or did you just change the color?

My favorite thing out of the four of these has to be the film grain effect.
Very cool stuff as always!

Made this before terrain grass was a thing iirc, it’s mesh grass placed by hand

3 Likes

what was the sound for the flim grain effect in the video? and can i use it for my game?

Did you make the builds in the Film Grain part?