Help with making dense fog/clouds

Hello robloxians ;))

I know of Atmosphere and Fog properties in Lighting. So I can tell you now that this is not the effect I’d like to achieve


this is the reference for my fog/clouds. It fuzzy on the edges and has a slight texture (yes it’s from ninjago)

I layered ForceField on top of each other here

And I used a bunch of planes with a blur texture here ( The sides sticking out is unwanted)

The pictures below are the best attempts I’ve got at replicating that, but none of them are right - before anyone says to use Particles, I want you to know that I would like to keep the dense fog look on all graphics settings. So particles or smoke are out of the question.

I am very open for ideas, as I have been sitting all day on this and my back needs a break honestly.

3 Likes

I’ll let you in on a secret: you can use ParticleEmitters AND have them render consistently on all graphics settings. You just have to emit the particles manually! I created my own solution to this issue when I decided to render the pickups in my games using ParticleEmitters so I could use sprite flipbooks to animate them efficiently. It was essential that the sprites rendered consistently, and I found on lower graphics levels ParticleEmitter.Rate was multiplied by a much lower factor so they’d pop in and out of existence.

The line of thought is basically this:

local timeToWait = particleEmitter.Rate
while timeToWait - (1/60) do
     particleEmitter:Emit(1)
end

*Note - I subtract one frame from the wait time because I found that waiting the .Rate made the particle flicker for 1 frame as it ended that frame.

I recommend you add Tags to the particles you want to manually emit, and use CollectionService to detect whenever new manual particle emitters are added/removed from the workspace. This script will be a LocalScript somewhere on the player’s client.

local cs = game:GetService("CollectionService")
local trackedEmitters = {}

function TrackEmitter(particle: ParticleEmitter)
	if particle:IsDescendantOf(workspace) then

		particle.Enabled = false

		local function isValid()
			return particle and particle.Parent
		end
		
		while isValid() do
			-- consider changing 1/60 to the average frame time
			-- of the player, they may not be running at 60fps.
			particle:Emit(1)
			task.wait(particle.Rate - (1/60))
		end
		
	end
end

cs:GetInstanceAddedSignal("ManualEmitEmitter"):Connect(TrackEmitter) -- catch any new ones being added
for _,v in cs:GetTagged("ManualEmitEmitter") do -- when the player first joins the game, check for ones that already exist
	TrackEmitter(v)
end
1 Like

Thank you :DD I am really intrested if you noticed any performance issues though?

The more particles you emit, the more strain there will be on performance. But, I had a test with over 2,000 particle emitters and the performance was still considerably good.

I recommend you have a low ‘rate’ and higher life on your particle emitters so that you can emit less. Try and keep the amount of particle emitters below I’d say 500 (random number based on my findings, but try it out for yourself - assuming each particle emitter emits 1 particle every second or two).

Particles are the most performant VFX instance in the game afaik.

1 Like