Search Unity

Any way to increase the base width of volumetric lighting effect?

Discussion in 'High Definition Render Pipeline' started by dgoyette, May 19, 2020.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I was considering adding general volumetric lighting to the lights in my scenes. My lights are generally spotlights, even though the renderer for the light looks like a large square:

    upload_2020-5-18_23-53-16.png

    The problem with the look of the volumetrics here is that the fog compacts to a tiny point where the spotlight is located. That looks pretty silly. Ideally the fog would look more trapezoidal. Is there a way to broaden the base of the fog so it covers roughly the area of the light's mesh?

    Other approach I can try have some downsides:
    • Increase the spot angle: But that significantly reduces the resolution of the shadows it casts.
    • Cut a hole in the ceiling, move the spotlight up half a meter: That would probably work, but then it would require me to cut wholes everywhere I want to put a light, which is extremely inconvenient.
    Any other options?
     
  2. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Does area lights work with Volumetric Fog?
     
  3. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    440
    I don't think it does.
     
  4. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Just checked it and yeah, not an option for this.
     
  5. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    You could probably just move the spotlight up but not cut a hole. Then put the ceiling and lamp mesh to different light layer than the spotlight.
     
    Last edited: May 19, 2020
  6. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    If the issue is just the "base" and you don't mind losing the light cone of the spot light, you can change the shape of the spotlight to Box.
     
  7. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I'll take a look at some of those options. Right now, many of my rooms are just single ProBuilder objects, so the roof and the floor are the same objects (and therefore the same layer), so putting floor and ceiling on separate layers would be pretty awkward. But maybe I've been over conservative about making all of my geometry two sided as far as shadows go, and maybe the light could just be on the other side of the ceiling without impacting its light propagation.

    I don't think the box shape will work, as the light still needs the cone shape to look reasonable. The volumetric detail was just an added visual touch I was looking for, but the light itself still needs to illuminate the conical volume below it. Thanks though.
     
  8. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    >Does area lights work with Volumetric Fog?
    I confirm, not supported yet.