"3d" fog of war?

Hey all making a civ clone or something similar and I’m trying to get a fog of war going, I have a distance fog and culling volume that follow the player camera so you can’t see anything “x” away.

In rts games or similar top down games it’s a flat black texture. But in my project you can move fully within in the 3d space, so something more “fog-like” would be what suits me. I have camera blocking volumes to stop you from leaving the level but I find it kind of game breaking that you can go and look anywhere in the level, so I’m trying to get some sort of rts type fog going that would only “expand” by a pawn using it, that way you can’t just start out and instantly see anywhere.

I’m seen mention of decals being used or render targets in threads about this but every attempt/tutorial or resource seems to be strictly c+ or just a marketplace item.

For a 3d but with a 2d civilization style map (there isnt much up/down movement for the objects in the game, mountains are fine but no tunnels, camera movement anywhere) i would use a render target to mark and save areas of the map as seen or unseen. From there you could add a feature to all the objects you want hidden in the fog and use their 2d position to look up that pixel on the render target and set their transparency to 0 based on that if they are in unseen area (maybe even try to figure out a distance field based effect so that you can fade them out more gradually).

This would handle hiding everything, but then you might also want to lay a cloud of particle effects over the unseen area to make it look foggy. You can create particles in niagara and spawn them based on the effect as well.

And finally you could create a post process effect to grey out areas in the fog of war.

You could also use an exponential height fog using voronoi noise texture. Asher has a nice guide on this with a few example maps. He also has a talk, where he explains some more stuff about exponential height fog and volumetric clouds.