3D light artifacts when using highly attenuated lights with fog

Godot Version



When overlapping 3D lights with a simple fog material, I often get some square artifacts as I approach the light. This is specially prominent when using lights with a high attenuation value. Does this issue have to do with volumetric fog settings, or is it something else?
It seems the artifacts still appear without fog, though they are not that visible that way

Yes I think what you’re seeing there is the minimum “froxel” size with your current fog settings. a froxel is like a voxel that is aligned with the camera view frustum. The froxel resolution you actually see in game is a product of the fog quality setting and the fog distance.

Check if removing glow fixes it. May be an issue with glow.

1 Like

Even without glow the issue still happens. It seems like it has to do with the low attenuation I’m using

Yeah that did the thing, increasing the fog quality in the settings worked perfectly fine. Still, I really wouldn’t want to increase it a lot to avoid performance issues. Is there another way of fixing this without decreasing the performance that much?

1 Like

You can reduce the fog distance too which basically gets more detail out of the same quality settings, compared to farther distance. But the trade off is of course… shorter distance fog. I think trying a less aggressive falloff might be the best overall option, until it works out ok with reasonable fog qual settings.

There is another option worth a look, if you haven’t tried them yet: fog volumes. With a fog volume you can define the basic shape of it, and it’s fall off and relative qualities (like how much light it emits), which you can use to create all manner of subtle halos and such. So maybe that’d provide more control. Fog volumes are pretty amazing actually. You can specify textures for them too (3D), or custom fog shaders.

also like @qbieshay mentioned, play around with your glow setting some too and see if that impacts the artifacts, cause it might. Auto-exposure, too.