How do I except the fog effect from certain area/zone?

Hi,

I’m really stuck about the fog effect a while. I have a rainy and intense foggy weather in scene and character will start outside from a building. Everything is fine so far but when character access the inside of building, Exponential Height Fog (EHF) also being visible there, of course it’s technically natural inside of engine but I want to except the EHF inside of building plus I don’t want to handle this situation via destroy the EHF actor in blueprint. Thats really not what I’m looking for because character also can see outside of building through the windows so it’s useless.

Actually this is second time I asking for issue. I’m mention this in forum How to except the fog effect from certain area/zone? - Rendering - Unreal Engine Forums but unfortunately I didn’t get any solution so far. I’m so curious how to be situation like this haven’t any basic solution inside of engine or am I wrong? Or isn’t there any other project concept needs environment setup like this? Because I thought it must be one of a very common weather usage. There should be a tutorial, wiki or doc to guide but so far I didn’t get any of them.

In UDK there was a Fog Volume and I’ve got an information about UE4 will achieve this function in non given ETA. But actually I’m not prefer the Fog Volume to handle the situation like I’m stuck in. Best way is I thought is the subtractive brush that can subtract the fog from certain area like we’re already doing that via creating door, window hole etc with BSP brush while modeling basic architectural stuffs inside the engine. Also I think it cost much less performance than adding at least 4 individual fog volume around a building to get what I want, right? But fog volume also might be handy in some sort of situation so they can just give same functionality like BSP has.

If there is any advice, tip, trick to handle this issue that I didn’t mention here please let me know. I greatly appreciate it.

Thanks in advance.

Hello zignot,

Currently we are still working to improve upon this feature. There are some notable workarounds currently that provide a similar visual function while saving your computers performance.

One of these approaches would be to use the ‘BP_FogSheet’ throughout your level in places you need to see fog. You can locate this asset in the “Blueprints” project within the ‘Learn’ tab of the launcher. Simply migrate the asset from this projects content folder to your own. Then pull these blueprints into your scene and edit their parameters and values to get the look you find fitting.

Another workaround would be a more robust approach, but will probably provide you with greater control for the overall affected area. You can reference your ‘Exponential Height Fog’ within your ‘Level Blueprint’ and change the values within the component, like the ‘Start Distance’ or the ‘Inscattering Color.’

I set up a simple blueprint script to change the ‘Start Distance’ of my ‘EHF’ when overlapping a trigger volume. You could use a similar approach and change more values if you needed to, but it will require additional nodes.

Exponential Height Fog Level BP Trigger

“The !FogStartDistance can be used to artificially keep some defined area in front of the viewer without fog. This also helps performance as pixels can be culled by the z buffer.”

This comes directly from the documentation page for ‘Exponential Height Fog’ which can be found by follow the link provided.

Hopefully you are able to get the desired results from this answer provided, but if you are having difficulties let me know and we can try something different.

Thank you,

Thank you for your time and efforts, Andrew. I’m tried to start distance function and looks like it’s best way to handle my issue so far and of course it needs some additional tweak.

You are welcome. Let us know if you have anymore questions :slight_smile:

Hi there,
I am having a similar issue. In one situation setting the start distance works fine (I’m using a timeline to provide an alpha for a lerp so it is smooth).

However, I am currently working on a portal system that takes the player between two different worlds, but due to the exponential height fog being an unbound object, I get the fog’s colour on the other side of the portal (whilst looking through the portal). When I then enter the portal, another level streams, and there is a pop of colour as one exponential fog in one world unloads, and another in another world loads in.

Currently I get around this by maintaining the same colour between the two worlds exponential fogs, and then change the colour with a lerp once I exit the ‘middle’ portal world. This work around is do-able, but it would be great if anyone knows of a way that could allow this to be bound.

(P.S. I don’t want to use Fog Sheets) :smiley:

Thanks,
Sam Pike

You should be able to manually attached the volume to actors as well as setting its relative position which sounds like you need both of these when using portals.

50064-exponentialheightfogcomponent.png

The workaround you have is not a bad solution though.