Announcement

Collapse
No announcement yet.

Volumetric Fog feedback thread

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • started a topic Volumetric Fog feedback thread

    Volumetric Fog feedback thread

    Starting this thread for feedback and discussion about the new 4.16 Volumetric Fog feature.







    Full feature description:

    We now have support for Volumetric Fog. This method computes participating media density and lighting at every point in the camera frustum, so we can support varying densities and any number of lights affecting the fog.

    Click image for larger version

Name:	0OriginSmaller.jpg
Views:	1
Size:	191.3 KB
ID:	1217183

    Lighting

    Volumetric Fog supports lighting from:
    * A single Directional Light, with shadowing from Cascaded Shadow Maps or static shadowing, with a Light Function
    * Any number of point and spot lights, with dynamic or static shadowing if 'Cast Volumetric Shadow' is enabled.
    * A single skylight, with shadowing from Distance Field Ambient Occlusion if enabled
    * Particle lights, if 'Volumetric Scattering Intensity' is greater than 0

    Not currently supported:
    * Precomputed global illumination
    * Shadowing of Stationary skylights
    * IES profiles and Light Functions on point and spot lights
    * Shadowing from Ray Traced Distance Field Shadows
    * Shadowing from the volumetric fog itself

    Translucency is properly affected by Volumetric Fog, depending on its position in the scene. By default translucency computes fog at vertices, so water planes with low tessellation can introduce artifacts. These materials can be set to compute fogging per-pixel to solve this with 'Compute Fog Per Pixel'.






    Global controls

    Volumetric Fog controls are on the Exponential Height Fog Component. The exponential height distribution provides a global density for Volumetric Fog.



    Scattering Distribution determines how directional the volumetric scattering is - a value of 0 means light scatters equally in all directions, while a value close to 1 causes scattering predominantly in the direction of the light (you have to be looking at the light to see its scattering).

    Albedo is the overall reflectiveness of the participating media. Clouds, fog and mist, which are based on water particles, have an Albedo close to 1.

    Extinction scale controls how much the participating media blocks light.

    View Distance is the distance from the camera over which Volumetric Fog will be computed. There are a limited number of Z slices in the volume texture, so pushing out the View Distance will increase under-sampling artifacts near the camera.

    Note that Volumetric Fog can't really match the Exponential Height Fog in the distance, as Volumetric Fog is physically based while Exponential Height Fog is not. Properties like StartDistance, FogMaxOpacity and FogCutoffDistance don't affect Volumetric Fog.

    Each light has a 'Volumetric Scattering Intensity' and 'Cast Volumetric Shadow' setting.


    Local controls

    Materials using the new Volume Domain describe Albedo, Emissive and Extinction for a given point in space. Albedo is in the range [0-1] while Emissive and Extinction are world space densities with any value greater than 0.

    Volume materials currently only work on particles, and only positions inside the particle radius are valid, which is usually handled by a SphereMask. The simplest Volume material for a particle system looks like this:

    Click image for larger version

Name:	MaterialSmaller.jpg
Views:	1
Size:	116.1 KB
ID:	1217184

    Placing a single-particle system with that material causes a sphere of density to be added to the Volumetric Fog. The effect is fully 3d with no billboards involved.

    Click image for larger version

Name:	SingleParticleSmaller.jpg
Views:	1
Size:	122.4 KB
ID:	1217186

    Multiple spherical fog particles with noise from textures can be used to limit fog to a certain area.


    Temporal Reprojection

    The volume textures used by Volumetric Fog are relatively low resolution and aligned to the camera frustum. Volumetric Fog uses a heavy temporal reprojection filter with a different sub-voxel jitter each frame to smooth out the aliasing. As a side effect, fast changing lights like flashlights and muzzle flashes leave lighting trails. Disable volumetric fog contribution on these lights with 'Volumetric Scattering Intensity' set to 0.


    Performance

    The GPU cost of Volumetric Fog is primarily controlled by the volume texture resolution, which is set from the Engine Shadow Scalability level. Volumetric fog costs 1ms on PlayStation 4 at High settings, and 3ms on an Nvidia 970 GTX on Epic settings, which has 8x more voxels to operate on.

    Particles using the Volume domain can add significant GPU cost, depending on their 3d overdraw and instruction count. Use 'profilegpu' to inspect this cost.

    Point and Spot lights which have 'Cast Volumetric Shadow' enabled cost ~3x more than unshadowed Point and Spot lights.

  • replied
    Hi, dont know if it was said before, but increasing fog distance crash the volumetric fog when the camera moves and the screen end up completely black. this doesnt happen in small scales. Shouldnt the fog be able to work as expected despite the scale? Is this a bug? Any solutions?




    PD: is there any plan to make the light functions work with the volumetric fog?
    PD2: It actually work with directional, not with point or other type, have to use the texCoord instead WorldPosition to map the function
    Attached Files
    Last edited by II_ADN_II; 06-05-2019, 02:47 PM.

    Leave a comment:


  • replied
    misterbil augminded I had this problem too. Turns out vol. fog has issues with instanced stereo rendering; I turned that off and how I have proper fog in my VR project.

    Leave a comment:


  • replied
    My scene has a room with open doors. Does anyone know how UE4 removes the high fog in the room?[/COLOR]
    [/COLOR]
    Last edited by JanyYZ; 05-23-2019, 02:00 AM.

    Leave a comment:


  • replied
    (reviving old thread?) I have the same issue as augminded in VR. Right eye renders the light shafts/bloom with an offset from the light source. We are going to turn off volumetric altogether as it's taking at least 5fps. and fake it with some old school camera facing plane or something. I can'y even turn off the blooming and keep only the fog
    Working on 4.21.2

    Leave a comment:


  • replied
    So does volumetric fog work in VR or not? As it is now it my 4.21.1 test the eyes are very different not resolving to a unified experience. I would say that either the left or right camera is placed wrong or something along those lines. Have I used it wrong? If not, is there a workaround?

    Leave a comment:


  • replied
    Are there any plans to implement SSMS (ScreenSpaceMultipleScattering) into the fog System. Looks like someone has integrated it into Unity since 2016. And it's looking pretty hot in RDR2 right now!!

    https://forum.unity.com/threads/scre...tering.446647/
    https://www.youtube.com/watch?v=P7ckSQESnho

    Leave a comment:


  • replied
    I cannot for the life of me get volumetric fog to work at all. The Exponential Height Fog just stays the same. I've watched what seems like every video on it. I follow the steps and yet, no deal. Would anybody happen to know if there is a variable in the project settings that would possibly stop volumetric fog from working, or is my unreal bugged? Or most likely I'm just an idiot and missing something so blatantly obvious... Any help would be greatly appreciated.

    Leave a comment:


  • replied
    Hey all, the Volumetric Fog tends to darken my screen when in play mode and lightshafts on... Where does this come from? is it the form the fog or is it the light ?



    Thanks

    EDIT : seems to be good in fullscreen mode. Will test with packaged, but I'm OK with it if it's just a viewport bug.
    Last edited by piotr47; 09-26-2018, 06:39 AM.

    Leave a comment:


  • replied

    Originally posted by rujuro View Post
    I wrote on the answers hub, but didn't hear anything back. In 4.19 it appears that you can't have translucency ignore fog anymore with Volumetric fog. Is this a limitation of the system? Or just a bug? It was working fine in 4.18. Makes things along the lines of heat distortion really hard to do since they pick up the fog and end up looking like smoke. Thanks!
    I logged a bug with a 4.20 preview repro sample. Not holding hope but it'd be nice to see that fixed.

    Click image for larger version  Name:	apply_volumetric_fog_trans.jpg Views:	1 Size:	115.3 KB ID:	1498084

    (P.S. I think it's more of an unimplemented feature than a bug, not sure exactly how this will be done, unless some kind of buffer exists already as a mask)
    Last edited by Spoondog; 07-23-2018, 09:52 PM.

    Leave a comment:


  • replied
    Originally posted by SteveElbows View Post
    Is the Volumetric Fog supposed to work with the new Rectangle Lights in 4.20? I havent been able to make it work if it is, kinda suspect this hasnt been implemented?

    Thanks in advance for any info you can provide.
    I tried asking about this on the 4.20 preview video stream, but the response didnt really answer the question, they sort of said yes but mostly just spoke about how shadows are not currently supported in the dynamic version of rectangle lights. I was left with a vague impression that nobody considered the volumetric fog when adding dynamic rectangular lights, and I certainly cant get it to work with the preview. Hope to be wrong.

    Leave a comment:


  • replied
    Is the Volumetric Fog supposed to work with the new Rectangle Lights in 4.20? I havent been able to make it work if it is, kinda suspect this hasnt been implemented?

    Thanks in advance for any info you can provide.
    Last edited by SteveElbows; 06-07-2018, 08:10 AM.

    Leave a comment:


  • replied
    Originally posted by Raildex_ View Post
    Is there a possibiility to implement Volumetric Fog without Height Fog (Particles only)?
    Also wondering about this. Trying to make some space gas cloud effects but i want to avoid having heightfog on the rest of the map creating an up/down gradient and blurring the skysphere. i also don't want background fog, just the fog near the volume emitters. I've set it to minimize the map fog effect outside of the volumes but it's still always there.

    Is it possible that someday we can get this same fog volume effect independent of the exponentialheightfog component?

    Leave a comment:


  • replied
    I wrote on the answers hub, but didn't hear anything back. In 4.19 it appears that you can't have translucency ignore fog anymore with Volumetric fog. Is this a limitation of the system? Or just a bug? It was working fine in 4.18. Makes things along the lines of heat distortion really hard to do since they pick up the fog and end up looking like smoke. Thanks!

    Leave a comment:


  • replied
    Originally posted by DanielW View Post
    The temporal reprojection which causes the trails is needed to make the technique work with reasonable performance (low volume resolution). Try it yourself - 'r.volumetricfog.temporalreprojection 0'.

    I think moving lights like flashlights / headlights need a completely different technique, which ray marches the shadowmap in screen space. Lots of games have done this - it was the standard technique before the Froxel Grid technique which relies on temporal reprojection. Unfortunately not something we are working on at the moment.
    Wondering what the temporal reprojection settings are - is it just a case of on or of or are there any tweaks? I have a scene that only needs a small area (so the fog can be really high res) with a couple of lights. One static so it benefits from the reprojection, the other flashing like a strobe so it looks amazing with it off.

    Leave a comment:

Working...
X