To align volumetric and non-volumetric fog color, we are hoping there is an easy way to allow volumetric fog to still reference the Inscattering Color Cubemap Texture — when Volumetric Fog is enabled on the ExponentialHeightFog component.
At this stage we assume would need to rewrite our own entire system, similar to ForzaTech engine’s novel approach to managing skydome and fog textures. However, if there’s a way to still utilize Unreal Engine’s built-in volumetric fog, this would be preferable.
The benefit allows fog color to match complex sky situations, such as a dark grey storm clouds to the east, bright red sunset to the south, distant city light ambience from the west, and clear blue skylight from the north.
Matching the fog color and brightness to this complex skybox texture example is impossible with UE5’s built-in Directional Inscattering Color approach, as it can only perfectly match simple sky gradients, such as a clear day.
For this reason, it would also be useful to use Inscattering Color Cubemap Textures on the SkyAtmosphere component, to be able to match the atmosphere color to complex sky textures in the same way.
The main need is having the volumetric fog preserve the Inscattering Color Cubemap Texture assignment.
Attached is an example from a GDC talk, Shoot for the Sky: The Ambitious HDR Time-Lapse Skies of Forza Horizon 3.
Steps to Reproduce
Reproduction Steps:
- Place ExponentialHeightFog into a level
- Set Fog Height Falloff to 0.001 (for good measure)
- Assign an HDRI cubemap texture to the Inscattering Color Cubemap slot
- Tick on Volumetric Fog
(Notice how volumetric fog ignores HDRI cubemap texture color)
Hi! I tested the situation as you described, using a fresh level in the Launcher version of the 5.6.1 engine, and was able to see the cubemap affect the color of the fog properly. Enabling Volumetric Fog can slightly lighten/desaturate the color effect, depending on the environment and fog settings, but this can be compensated for a bit with the Scattering Distribution setting.
If it’s not a matter of the visual result being too subtle, though, then we should dig into some settings. In the Exponential High Fog asset, what do you have the Override Light Colors with Fog Inscattering Colors set to? Does changing this setting make a difference for your scene?
Have you been able to repro this in a new level, and/or in a new project? That might help narrow things down, too.
Hi Camille,
Good to hear from you!
The problem is that Volumetric fog color is limited to only having one global color with a directional light fog color. This means it will flood and muddy any cubemap color assigned to the cheaper exponential height fog. This means it’s impossible to have volumetric fog achieve interesting features such as a bright sunset to the south, thick drizzly dark storm clouds with thick grey fog to the left, clear blue sky to the right etc. Currently you would either balance the volumetric fog to match a dark storm cloud and then have the clear sky segment noticably pop from blue to dark grey, or balance the volumetric fog to the clear sky and cause the dark storm cloud segment to be bright blue and lighter than the dark grey sky.
Kevin Örtegren acknowledged that the two fog features don’t talk to each-other, and said all fogs systems will later be added into the same voxel structure, but till at least Unreal Engine 5.9. way way in the future.
It would certainly be very minimal work to add a texture cube color look-up to the volumetric fog color. could there be bandwidth to sneak this in? I believe the volumetric fog feature is hard coded and not exposed for rendering engineers to add custom features, so our rendering engineers would need to build an entirely new fog system from scratch just to get this one feature.
Let me know if there’s anything the team can sneak in. Perhaps I could provide a test scene if there’s bandwidth?
Kind regards,
Michael
Hi! Thanks for the additional info. Turns out, the Volumetric Fog in my test was affected by the sky captured contribution. Even with SkyAtmosphere and SkyLight carrying some of the color through the scene, the visual result wasn’t specific enough for the types of localized environmental effects you’re aiming for, anyhow. I can confirm that the Inscattering texture doesn’t actually contribute to the nearby Volumetric Fog (apologies for earlier), and that yes, any deeper changes to fog are a ways out. With the Volumetric Fog being a physically-based component, the team isn’t planning to add support for the Inscattering texture for Volumetric Fog.
As long as your team is up for making engine changes, the fog system can be edited, though (rather than something new being written from scratch). FVolumetricFogMaterialSetupCS is likely a good starting point for exploring the feature. You could replicate (or replace) where the Volumetric Fog accesses the single fog color, and bring in access to the cubemap. I hope that helps! You’re welcome to send along a pull request for review if you implement the change.
Thanks heaps for this tip. I’ll chat with our rendering engineers and get back to you. Is it ok to leave this ticket open/parked in the meantime?
Sounds good! The system will eventually auto-close this ticket; if that happens in the meantime, feel free to spin up a new one with a reference to this ticket, and we can go from there.