Volumetric Lighting Problem

Hi guys,

I’m wondering if anybody knows what I’m doing wrong (see link to video above). I’m trying to use Unity for rendering out my shots (no game development) and I want to use the HDRP pipeline with volumetric lighting. I’m trying to follow all the tutorials I can find on this, I think I’m doing it correct. I’ve tried tweaking all the settings I can find without success. I’m now starting to think it’s my graphics card. In the video you can see that when I play in-game the volumetric light has some weird artifacts and flickers. The procedures I’m following are:

  • Make sure HDRP package is installed/updated through the Package Manager
  • Color space - linear
  • Quality - Ultra
  • Project Window (Assets Folder) - right click - create - rendering - High Definition Pipeline Asset
  • Rename file HDRP
  • Edit - Project Settings - Graphics - drag HDRP file to “Scriptable Render Pipeline Settings”
  • Hierarchy Window - Create - Rendering - Scene Settings
  • Select Scene Settings file in Hierarchy Window
  • Inspector - Fog Type - Volumetric
  • Inspector - delete the Exponential Fog tab
  • Inspector - Add component overrides - Volumetric Fog
  • Lighting Window - Lightmapping Settings tab - untick “compress lightmaps”
  • Select Camera in Hierarchy Window
  • Inspector Window - Rendering Path - Deffered

My graphics card: Nvidia Geforce GTX 750 Ti

Thanks in advance!

Craig

Hi
On 2019.X you can use the render pipeline wizard to check if your settings are correct.
Go to Window / Analysis / Render Pipeline Wizard

Also it would be interesting to know :

  • is your camera moving ?
  • would you be rendering a big transparent quad that fills the entire screen ?

Hi Laurenth,

Thanks for the information. I just downloaded the latest Unity 19 version and testing. The wizard did find a few problems, but couldn’t fix it. I’m going to re-build my scene in a new project using the wizard and see if it works.

Do you know if there an official step by step documentation somewhere I can read on how to setup scenes just for rendering? I want to do an animated short movie and I’m really interested to learn Unity for only rendering.

Thanks,

Craig.

The easiest way to go is to create your project by choosing the HDRP template (and not 3D or 2D).
Then you can upgrade the version of HDRP using package manager to be sure you’re using the latest.

I think I discovered the problem. If I change the spotlight to Shape - Pyramid, it flickers in volumetric fog. Is that a bug?

This is not exactly a bug rather a limitation, the definition of the volumetric fog is limited in order to be fast to evaluate. We improve this by jittering the samples at runtime and accumulating the results over time (hence the improvement in play mode).
The pyramid spot doesn’t have a soft transition between light and no light (whereas the cone has a gradient) which makes the noise in the fog very obvious at the edges of the pyramid (some samples will catch the light and be very bright, some won’t and they will be darker).
This can be improved by using a light cookie to soften the edges of the pyramid

@laurent-h I’m currently using a pyramid spotlight that uses a cookie for projecting a RenderTexture into a wall. I’m trying to simulate a film projector effect.

The results are pretty accurate because the light responds according to the color of the texture pixels, as a real film projector does.

But, I still have the same problem you were discussing above. The tip of the light from where the lights comes out, is extremely pixelated, even using Ultra Quality settings for HDRP.

Are there any plans to improve this in the near future?

Maybe the new filter option can help you smooth it out ? have you tried it ? it’s a checkbox in the fog settings (you might have to toggle the advanced properties using the little cog icon)

Also using a bigger emission radius helps smoothing out the source of the volumetric lighting.