Search Unity

How to tweak volumetric fog distance?

Discussion in 'High Definition Render Pipeline' started by PhilSA, Jan 22, 2020.

  1. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,296
    I'm wondering if it's possible to tweak the distance of volumetric fog. Take a look at this scene for example:
    https://i.gyazo.com/6f3afa28ce21f2fea939c103baa88b13.mp4

    This is a point light with fog creating "light shafts" around the capsules. If we start going about 50-100 units away from it, the volumetric fog effect starts clipping, meaning you can't see the point light's volumetric fog influence from far away.

    I've tried tweaking every Fog, Light, and Shadow setting I could find, but no success so far. Any ideas?
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,454
    You could use a different fog volume closer so the general fog is acceptable for distance, but as you get closer the fog volume for those objects will gradually take over.
     
  3. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    51
    Click the "More Options" button on your fog component and then change the "Depth Extent".
     
    PhilSA likes this.
  4. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,296
    Awesome!

    Do we know if increasing DepthExtent reduces performance, or does it only decrease the quality of the fog (same amount of calculations but spread over a larger area)?
     
  5. abstractfragment

    abstractfragment

    Joined:
    Jan 16, 2014
    Posts:
    15
    Is there a way to do this without decreasing the quality of the fog or another option I can change in tandem with DepthExtent to find a middle ground in quality between depth and quality?
     
unityunity