Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Grainy volumetric shadow. Why?

Discussion in 'High Definition Render Pipeline' started by Fressno, Jul 5, 2020.

  1. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    185
    hey.
    I was trying to get a volumetric shadow pointing towards the camera, but i get this low res grainy/spotty/dust particle effect where its suppose to be as black as possible.
    What is wrong?

    Its only a sphere in the way of a direcitonal light. Inside a density volume
     
  2. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    Did you tried the "Filter" option for the Volumetric Fog?
     

    Attached Files:

  3. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    431
    Alternatively, in your camera's custom frame setting, enable Fog Reprojection. The effect only works in the game view, not in the scene view, however.

    If performance isn't a constraint, activate both. And in later versions of HDRP (9 and above), you can set custom settings for the slices used for the volumetrics fog. The cost can rapidly increase though.
     
  4. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    185
    question, what do you mean by "activate both"? Both what?
    The performance and cost isnt an issue due to my hardware. And this is just for show, not to be played other then on my pc which can handle the stress.

    but thanks for the reply.

    sorry, didnt see Fox reply. i will try both suggestions.
    Thanx guys
     
    Last edited: Jul 6, 2020
  5. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    185
    Is that in edit>preference>graphics?
     
  6. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    It's in the Fog component of your game Object with the Global Volume or Sky and Fog Volume.
     
  7. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    185
    Roger roger.
    Thanx
     
  8. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    185
    I used both of youre suggestions and it worked out perfectly. The grainy particle thing is gone, but there is a slight cloudy shadow now, but its so vauge you can hardly see it.
    Thanx guys.

    edit:
    this also helped me with some jagged borders of my spotlight.
    thanx Fox
     
    Last edited: Jul 7, 2020
  9. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,120
    And in case anyone has trouble finding the "Filter" property on the Fog override, note that you need to click the little "More Options" button first:

    upload_2020-7-8_23-20-27.png
     
    Camarent likes this.
  10. BinAly

    BinAly

    Joined:
    Feb 13, 2018
    Posts:
    2
    Hey guys, sorry for reviving this topic, but it was the only place I found were people were talking about an issue similar to what I'm having.

    I'm using Local Volumetric Fog to build a "Hevenly Sky Scene", and the shadows are very weird and grainy:

    upload_2023-6-9_10-55-21.png

    I've tried everything you guys mentioned here in ths thread, did not fix it. Anyone has more info on it?
     
  11. lacas8282

    lacas8282

    Joined:
    Apr 25, 2015
    Posts:
    123

    Camera dithering on
     
  12. Misaki_eKU

    Misaki_eKU

    Joined:
    May 3, 2018
    Posts:
    59
    That's because you don't have enough sample count. Also, using volumetric fog to create large cloud is not a very good idea.