-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a hard cutoff property to Environment fixed fog (for open world fog fading) #3429
Comments
As noted by @clayjohn in rocketchat, instead of using fog to hide chunks/loading geometry in the distance, the work done in godotengine/godot#54222 should work just as well.
|
Indeed, this open world fading needs to be per-pixel in case you have level geometry that spans a large area. |
@briansemrau What do you think about fading the fog automatically based on the Camera's far clip distance? Depending on the fog density, we can likely figure out a value that looks good relative to the far clip distance by automatically adding some linear fog on top. When fog is enabled, I don't think you ever want to see a sudden far clip cut anyway. |
I think it's a good solution, but I have a few concerns:
I'm curious of the community's opinion of this to see if my concerns have merit. |
Implemented/superseded by godotengine/godot#84792. |
Describe the project you are working on
The Godot editor 🙂
Describe the problem or limitation you are having in your project
The new exponential fog in Godot 4.0 is more physically correct, but it will never completely hide what's in the distance (unless you use a really strong density value).
However, to fade distant areas in an open world game (to hide chunk loading and LOD cutoffs), you need a hard cutoff without having to make fog too strong. Now that we have aerial perspective to better blend distant areas with the sky, we should make sure the new fixed fog is up to the task of open world games.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
There are two ways to achieve this:
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Add
fog_max_distance
property to the Environment resource.This would only be implemented for fixed fog, as volumetric fog is generally not used to hide distant areas completely. (It's still possible to use both fixed fog and volumetric fog at the same time.)
If this enhancement will not be used often, can it be worked around with a few lines of script?
No, as fog is implemented in the renderer itself and can't be overridden for all materials at once. godotengine/godot#41415 allows overriding fog on a per-material basis, but this means people would have to use their custom materials everywhere instead of BaseMaterial3D.
Is there a reason why this should be core and not an add-on in the asset library?
See above.
The text was updated successfully, but these errors were encountered: