Open ettiSurreal opened 1 year ago
Can you please upload an MRP so contributors can test and confirm whether they can reproduce this bug?
Can you please upload an MRP so contributors can test and confirm whether they can reproduce this bug?
Uploaded a very simple scene file with the issue, since it's entirely visual. You just need to disable preview sunlight since it doesn't get saved in the scene file.
This is because volumetric fog has a limited length (64 units by default). You can increase this length, but this will decrease volumetric fog precision unless you increase volumetric fog depth in the advanced Project Settings (which has a performance cost).
If you wish to fully occlude distant objects, use non-volumetric fog at the same time as volumetric fog. This will need https://github.com/godotengine/godot-proposals/issues/5625 to be implemented though.
This is because volumetric fog has a limited length (64 units by default). You can increase this length, but this will decrease volumetric fog precision unless you increase volumetric fog depth in the advanced Project Settings (which has a performance cost).
If you wish to fully occlude distant objects, use non-volumetric fog at the same time as volumetric fog. This will need godotengine/godot-proposals#5625 to be implemented though.
You may have misunderstood what my issue is, it's that the volumetric fog functionally lets you see in the dark.
The scene from a side angle Camera view (fog length set to 64)
The issue can actually be somewhat worked around by decreasing the fog length (10 in this image), but at the expense of only seeing the volumetric fog at a very limited range.
Though i do think this might be a realtime limitation, as i also easily reproduced the issue in Unreal (though i didn't mess with the settings too much there).
Godot version
v4.0.beta12.official [3c9bf4bc2]
System information
Vulkan Forward+
Issue description
The issue is somewhat difficult to explain for me, please understand.
When one looks at a scene from behind or within a fog volume (or a light contributing to the volumetric fog), the scene depth can be seen, in this case being very much an undesired effect, letting the player see further than intended.
I made a simple scene to demonstrate the issue, and recreated it in Blender to show how i intended it to look like.
With the volumetric fog Godot produces, you can clearly see the contours of the structure and the edge of the plane it's sitting on, despite the light not reaching that far and there being no other lights in the scene, apart from the red one on top of the structure.
With the result i made in Blender, you cannot see the world border and the structure contours (the red light exists to show that it is still there). Please know that Blender was only used here to show how i intended the fog to look like, and not to compare the rendering of the two softwares.
Please, let me know if this is a rendering limitation that cannot/won't be fixed.
Steps to reproduce
In the scene showed in the example the
world environment
has itsbackground mode
set toCustom Color
, with theColor
being the default pure black, andvolumetric fog
being turned on in it's default settings.Both lights have their
volumetric fog energy
set to 16, but the issue isn't dependent on it.Minimal reproduction project
An even simpler scene demonstrating the issue, just make sure to disable preview sunlight. scene.zip