0 votes

I have a 3d scene with Godots's fog. The problem is, the fog is only visible when you look at the map and you can clearly see where it stops. Is there a way to let the fog be visible in the sky?

here is a picture:

Godot version godot 3.3.3
in Engine by (445 points)

3 Answers

+2 votes
Best answer

Fog does not affect the sky in Godot 3.x, but it will in Godot 4.0.

As a workaround, make sure the sky is colored in a way similar to the fog. The best way to ensure this is to use a plain color for the sky (instead of a PanoramaSky), and make the sky color be the exact same color as the fog.

Alternatively, you can edit your panorama sky image to add a "fog dome" (a linear gradient that stretches across the panorama) with a color similar to the fog. The same thing can be achieved in a ProceduralSky by changing the colors of its various ground and horizon properties.

by (12,835 points)
selected by
+1 vote

I'll preface this by saying that you should probably do as Calinou suggested. But, I have a glass of red, a few ideas and I'll keep it short.

First approach is just a spatial material and a proximity fade. The big drawback is that it doesn't work when you're inside it but you can easily code if you manage distance cleverly in the local frame. Would be fiddly but could work. Docs:


This can be done in shader code. Tbh, an explanation would make this comment about as long as War & Peace. You'd have to have decent experience with shader coding. If you decide on this option, let me know and we can discuss.

by (2,156 points)

I will try calinou's method, I plan to do shaders in the future, thanks for helping.

0 votes

I use the Volumetrics-Plugin (its on the assetlib)

it allows you to make shapes of fox and such, its really nice for fox effects.

demo of the plugin

by (58 points)

Volumetric fog (especially with this plugin) is very expensive. I wouldn't recommend using it if you just need fog to match the background.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.