I’ve been trying to get up to speed with Unity’s HDRP feature and specifically the one I guess most want to know about, Volumetric Fog. However I’m having absolutely no luck getting it to behave logically.
There seems to be a paucity of information/tutorials covering the subject but along with the online ref, I’ve been trying to follow Brackeys video ‘How to get GOOD GRAPHICS - Upgrading to HDRP’ However, I get to the stage of adding the scene settings object and altering the Volumetric Fog settings and they just refuse to work according to Brackeys video.
I’m running the latest 2019.2.10f1 and I’ve made a very simple room object 4mx4mx3m with a few windows. All I want is to be able to see the fog within the room, yet it refuses to show up. I can see it in the scene editor view, but waaaay up in a corner of the screenspace. Not like Brackey has it in his scene where it seems to be logically centrally located. My fog obeys the Directional Light’s rotation but seems to eminating from a spot way off in the distance??
Does someone know what I could be doing wrong? I’ve restarted and rebuilt and restarted and rebuilt several times now with always the same result.
You need a few things added / checked they are active:
Add a Density Volume. You can find this in Hierarchy, right click, then navigate to “Rendering/Density Volume”.
Check your HDRP asset and it’s Inspector exposed settings. You need to have at least Volumetrics enabled.
Make your density volume 10x10x10 or something sensible sized, adjust it’s Volume/Size setting, not the object scale.
If you lower the Fog Distance in Density Volume script attached to the object, you should see a dense fog appear, as if it’s a fog volume in real world.
Also be aware that Scene Settings (I hope you have created it already if you work with HDRP) contain settings that affect the fog.
You need to have Visual Environment override added and there you need to have Fog/Type set to Volumetric Fog. Otherwise it won’t show up.
Then you can also add a Volumetric Fog override in order to be able to adjust it’s settings. With that override you can adjust Base Fog Distance and other things that affect the fog volumetrics, but that Density Volume is the one that allows you to make dense fog.
Hopefully this helps you get started. Read the manual, it contains a lot of information.