what happened to volumetric lighting / fog

hey guys,
Like the title says… what happened to volumetric lighting and fog ? It was once on the roadmap and should be a implemented feature a view engine verions ago… ?
Just curious if this is something that will come maybe soon ?

I don’t think so. Volumetric Fog/Light was requested back in 2014. I lost the hope :frowning:

Thats sad to hear… having such a nice and important feature missing in the engine.

Volumetric feature would be really big leap for true feel atmospheric effects.

The problem is that it’s a pretty expensive set of calculations though. Unless you’re voxelizing things to like 16x16x16 grids, it’s a whole lot of math to compute and a whole lot of memory taken up by all of the flipbook textures. Plus, all of the computation for avoiding aliasing/artifacts between the slices; at off angles.

There were games that had that feature on Xbox 360, and many games these days have it so it’s definitely something that should be added

I hope they’ll bring a fully fledged cinematic to this years GDC that will introduce volumetric lighting and really push the high end aspects of the engine!

Yes, but with pretty low quality. I doubt any were “truly” volumetric though. Probably some render hacks and large approximations. I want to say Dice did something similar, but had a weird approach using all sorts of probes around the level or something (I might be thinking of their pseudo-GI system though). Anyways, on 360 gen hardware, there’s no doubt about it: if they had volumetric lighting, then they were sacrificing detail elsewhere. There really isn’t any getting around the large amount of math behind marching raycasts through voxel grids. I mean you could throw in an occasional puff cloud on the side of a mountain, but for large ares that are close, you can’t really pull it off without having to sacrifice detail somewhere else or having to use a low res voxel grid.

Worked fine in Alan Wake, where it was used quite a bit with very nice results. And of course many games on current-gen systems are using it, performance isn’t an excuse for it not being there.

I get that, but you need to realize that just because it worked for one game, doesn’t mean it will work with all. You’d have to “dissect” the rendering engine to see exactly where they bump graphics up and where they tone them down. Which ultimately boils down to game art direction. Some developers might be fine with sacrificing high res complex shaders, or complex AI, if it means being able to turn up the dials on things like atmospheric rendering. The point is that detailed volumetric lighting has a pretty high cost on frame time.

Here’s a good write-up of making a volumetric raymarcher in UE4:

Normally that would be the case, but since it’s been done on some old games and there’s such a wide variety of games using it now it’s clearly not impacting performance that much

I could be wrong, but I think that a lot of the older variations of volumetric lighting are of the simple type that just voxelize a cheap fog gradient. They aren’t actually using textures to produce the fogginess. Therefore it would be a lot cheaper on draw and wouldn’t be that big of a hit to frame time.

But if you want fancy “placed” patches of clouds like fa7f029edd2d95b999a24d50430b7a30ac9a995d.jpeg except with way higher fidelity in the “cloudiness” like this:

and you want them to be dynamic with things like extinction colors, shadows and so on; you’re going to massively increase the calculations needed.

EDIT: Oh and I should say that the moral of the story that there is quite a difference between volumetric fog and volumetric lighting. Fog is cheap, therefore any volumetrics you apply to it are likely going to be cheap as well. However, using volumetric lighting on complex clouds of voxels, with actual textures, is exponentially more expensive.

EDIT 2: Here’s a pretty good PPT that breaks down some different methods and I guess I was sort of right about how a lot of the older games were approaching it:https://bartwronski.files.wordpress.com/2014/08/bwronski_volumetric_fog_siggraph2014.pdf
as well as https://developer.nvidia.com/sites/default/files/akamai/gameworks/downloads/papers/NVVL/Fast_Flexible_Physically-Based_Volumetric_Light_Scattering.pdf. In the Nvidia one, you can see some of the render times for it; toward the end of the slides. They were in the 1-2ms range. Remember that 60fps is 16.67ms per frame. That would mean that the lighting they were using was taking up ~12% of the frame time, on a 60fps budget. It’s worth mentioning that it also looks fairly basic and looks like it’s just glorified height fog with shadows in it. So if it was eating up 1-2ms for just that, picture how much frame time would be eaten up with true volumetric voxel clouds that have all the bells and whistles in them…

Volumetric clouds probably not something that would run well except for specific cases. What we need is volumetric lighting for spot lights and point lights which should work just fine. If they wanted to they could go as far as what GTAV does which has point and spotlight volumetrics along with full environment volumetric fog at a lower quality.

I kinda found a nice solution for my UE4 fork that I like and will talk about on my site’s BLAGGY BLOG:


(Of note: the default light shafts are completely disabled here).

And when applied to point/spotlights:


Well considering how the UE4 engine uses differed rendering (currently), you run into lots of problems with stuff like this; due to things being screen-space based. As far as I know, to pull off volumetric lighting, in deferred rendering, you’d have to fake it with approximations and/or throw it in post-processing. Now I might be going off into a completely wrong direction with this, but one way you could cheese it into the screen-space would be to put some kind of collision model attached to the light. If that were visible to the camera, it would look up the light info and fake it into the scene. You could use several collision models, attached to the same light, to act as falloff indicators for attenuation. Using some info from the buffers, like scene depth and normals, you could do some post process “overlay” style blending kind of like in photoshop with masks and such.

I could be wrong, but I think that when you’re using a deferred rendering system and want to have volumetrics, it has to do a forward rendering pass ON TOP of the deferred pass. Which is far from optimal. This is probably one big reason why they’ve been working on the forward+ rendering engine. I’d assume that after they get that etched into stone, they will start throwing stuff in like volumetric lighting.

I basically rely on the shadow maps of each light and then construct volumes (of varying tessellation quality) to form the light shafts and then it’s all post from there.

Yep, sounds a lot like my little collision model concept, except you can get stenciled shadows out of it; from around around objects. Problem with it being all post is that it tacks some time onto frames. Though I suppose the application decides the usefulness.

[MENTION=8]Alexander Paschall[/MENTION] could you get someone to talk about that, please?
Would be nice to hear something about it.

Tim Hobson’s recent stream covered making some forms of volumetric lights, but Ryan Brucks should also have tutorials for this stuff around.

Both methods are no solution/replacement for true volumetric lighting. As this is a highly requested feature (726 votes on the trello roadmap and a couple of dedicated threads) I really hope Epic will finally implement it in the next couple of months!