How to avoid volumetric light bleeding through objects?

I’m rather new to Unity, and I’m trying to wrap my head around the basics, and now I’m stuck at volumetric lights.

I tried to let volumetric light shine out of objects, and while it does shine out of the objects openings just like I’ve expected, it somehow also bleeds through the object’s shells, it looks like this:

The left pipe has a non-volumetric point light, the radius is huge, but nothing bleeds through the object. The middle one is the same as the left one, but with volumetric enabled, as you can see, there’s quite some bleeding. The right one uses a spot light, which shows similar bleeding.

I’m wondering if I’m doing something wrong, or maybe there’s a trick to avoid this, or whether that is actually the expected behavior and a possible limitation of Unity’s volumetric lighting support?

I’ve attached the test project in case anyone wants to see how exactly things are configured.

Regards,
Oliver

5858941–622753–volumetric-light-bleed-test.zip (518 KB)

hi,
sorry haven’t open the scene, but my guess would be that the volumetric fog resolution is too low, thus why you get those bleeding. A possible workaround would be to add a density volume to kill the fog at the object location, or to increase the volumetric fog resolution.

Hi Sébastien, thanks for the reply.

I was just working at it again, and managed to reduce it to quite some extent by balancing the light’s radius, intensity and fog multiplier. It’s still clearly visible, right in the center, but much less.

5872645--625249--volumetric-light-bleeding-reduced.jpg

Dialing down the fog’s ansiotropy removes it even further, but on the shadow side of the objects (respectively anywhere where no additional light is shining onto it) there’s still some weird bleeding going on, and of course changing ansiotropy changes the look in a manner that might not be desired, but I’ll try going with that, AFAIU that setting is experimental anyways.

I’ve tried your suggestion using density volumes, but I wasn’t able to reduce the fog, only to increase it. If I understand the docs correctly, the density volume works additively, so I’m not sure how I could use it to reduce the fog?

Regarding increasing the fog resolution, I assume you are referring to the “Lighting > Volumetrics > High Quality” setting in the HDR Pipeline asset? That makes the fog look way better, and reduces the bleeding, but it’s still very much visible unless dialing back the ansiotropy, and even then it’s still visible on the shadow just like in the above example, but at a 20th of the original FPS :wink:

I’m not sure how exactly the 3D grid for the fog works, how it relates to the camera frustrum, I guess it might get stretched/squashed accordingly? Changing the camera’s far clipping plane to a very low value (< 3), the bleeding seems to completely disappear, but cutting the view off after 1 meter is a bit too radical :slight_smile:

I’ve attached the updated sample project in case you (or anyone else) might want to take a look.

Regards,
Oliver

5872645–625255–volumetric-light-bleed-test-reduced.zip (812 KB)