You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
Volumetric fog works well to represent low-frequency detail, but its froxel-based nature prevents it from displaying high-frequency detail unless you increase the volumetric fog size/depth project settings by a lot. This makes it much slower to render.
This limits is flexibility in representing things like smoke or dust.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add a volumetric fog density multiplier texture to better represent high-frequency detail.
While this wouldn't increase the resolution of the underlying froxel data that contains the fog color and density, this would make it look like the fog is more detailed.
This in turn would also make lower-resolution fog more viable, which can be important if you want to increase the maximum distance at which volumetric fog is visible (Volumetric Fog Length property).
This is similar in concept to what glow maps achieve for glow.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Four new properties would be added to Environment:
Volumetric Fog Density Map: Texture3D
Only the red channel is used, so that you can use a R8 texture to reduce memory utilization.
Black pixels map to a density multiplier of 0.0. Red pixels map to a density multiplier of 1.0.
NoiseTexture3D is particularly well-suited here.
Volumetric Fog Density Map Strength: float ([0.0; 1.0], default 1.0)
Controls the intensity at which the density map applies. 0.0 effectively disables the density map without needing you to unassign the texture, which can be used to transition from a "not density-mapped" to a "fully density-mapped" state smoothly using AnimationPlayer or Tween.
Volumetric Fog Density Map Offset: Vector3 (default 0.0, 0.0, 0.0)
This can be animated over time to make the fog details scroll, without affecting where the fog is positioned in the world.
Volumetric Fog Density Map Scale: Vector3 (default 1.0, 1.0, 1.0)
This can be used to adjust the scale of the density map in world space and avoid visible tiling. Higher values make the texture cover a larger area.
This new texture is then used to multiply the fog density on each pixel on the screen, with a world-space transformation to ensure each fog pixel remains stable as the camera moves or rotates.
To ensure there's no performance cost if the feature isn't used, this would most likely make use of a specialization constant to toggle the functionality in the shader on-demand.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
This is about improving the flexibility of volumetric fog, making it more usable as a replacement for traditional alpha billboards where it makes sense.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
The Godot editor 🙂
Describe the problem or limitation you are having in your project
Volumetric fog works well to represent low-frequency detail, but its froxel-based nature prevents it from displaying high-frequency detail unless you increase the volumetric fog size/depth project settings by a lot. This makes it much slower to render.
This limits is flexibility in representing things like smoke or dust.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add a volumetric fog density multiplier texture to better represent high-frequency detail.
While this wouldn't increase the resolution of the underlying froxel data that contains the fog color and density, this would make it look like the fog is more detailed.
This in turn would also make lower-resolution fog more viable, which can be important if you want to increase the maximum distance at which volumetric fog is visible (Volumetric Fog Length property).
This is similar in concept to what glow maps achieve for glow.
I believe CS2's smokes do something similar to give them an impression of detail:
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Four new properties would be added to Environment:
[0.0; 1.0]
, default1.0
)0.0
effectively disables the density map without needing you to unassign the texture, which can be used to transition from a "not density-mapped" to a "fully density-mapped" state smoothly using AnimationPlayer or Tween.0.0, 0.0, 0.0
)1.0, 1.0, 1.0
)This new texture is then used to multiply the fog density on each pixel on the screen, with a world-space transformation to ensure each fog pixel remains stable as the camera moves or rotates.
To ensure there's no performance cost if the feature isn't used, this would most likely make use of a specialization constant to toggle the functionality in the shader on-demand.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
This is about improving the flexibility of volumetric fog, making it more usable as a replacement for traditional alpha billboards where it makes sense.
The text was updated successfully, but these errors were encountered: