How to make object fade into the skybox?

Hello everyone.
So I’m trying to make a foggy world. Thing is unreal’s fog, while pretty good, doesn’t match with the skybox.
How would you go if you had to fade objects into the skybox like it would the fog?

you have ground fog already. can’t you just raise it up higher?

The fog pictured here is 100% applied to the mesh in the distance, hence the green tint. However, it doesn’t go well with the skybox and this is why I’m asking the question

well… in the left shot you have cloud things at the bottom. the easy way is to raise that up higher. visually cover it up to make it look consistent. to fade the whole column into the skybox you’d have to make it transparent and fade the opacity.


Thanks for the answer but the bottom of the tower is not a movable particle effect it’s just a temporary cheat with an opacity ramp from top to bottom.
This doesn’t look good at all from up close and it’s not adaptable to player’s movement
(i should have included that in my OP)

okay. you’re already faking it. then maybe try to make it adaptable. create a dynamic offset for the ramp. you can feed the player position or distance into the shader to change it.

not sure how good this gonna look. i can’t really picture it. uncanny effect, cause it’s fake.

i know feeding the player data into shaders works (i got the code for that). i haven’t done alot of player centric shaders, yet, tho. hmm…

You could in theory do something similar to this

Instead of pluging in the white vector3 as fade you can use the same cubemap as your background and fade to it.

You would need to build it out a bit if you want near and far adjustments thought

You can use the reflection node in conjunction with the texture sample node to get the cube map up and running the material editor.

You can even add in a noise texture to the mix with a panner node to animate it.

1 Like

If you know what the fog cloud color should be (for example, you have an environment map that captures the sky/groundbox with fog) then you can turn off fog, and instead use a custom post-process pass where you blend the skybox color into the framebuffer color based on Z depth.

It would be nice if you could specify a custom function for the fog color in the built-in fog mechanisms, but that’s not currently a feature. Probably because the “blend the skybox” is not physically real, and while it can work well in atmospheric dark scenes like this, it’s not a great fit for photogrammetry / PBR.

Very good information right there. My skybox is a textured inside out sphere right now and I’d need to change it into a cubemap for it to work though, but it’s a lead. Thanks