Page 1 of 2

Volume effects fog distance

Posted: Mon Jun 03, 2024 12:10 pm
by J.C
Is it possible to add one more control to the Fog effect? It would be great to have a "Start Distance" slider which would determine the distance from the camera that the fog will start.
Currently If you want a thick looking fog every object in front of camera is covered in fog, in reality it does not happen unless you are covered in a smoke or similar medium.

In the example below Fog extinction distance is 150, the first person in front of camera is 3 meters away the landscape is 50 meters away.

Re: Volume effects fog distance

Posted: Tue Jun 04, 2024 3:43 pm
by frankmci
This is a good use case for the 2D Plane fog trick. Make a plane that defines the start of your fog by applying a Specular material to it which has a IOR of 1, a Transmission of 1, Reflection of 0, and a Scattering Medium. Essentially it's an invisible plane with only the Scattering Medium altering what is visible behind it.

While the shader is applied to a 2D plane, the fog effect is calculated 3D, and interacts properly with light sources. It's fast, easy to control, and simple to set up.

Re: Volume effects fog distance

Posted: Tue Jun 04, 2024 5:08 pm
by J.C
I came across this trick 5 years ago while working on my client's project.
I'm hoping for a solution that doesn't involve tricks or workarounds.

Re: Volume effects fog distance

Posted: Tue Jun 04, 2024 6:59 pm
by frankmci
J.C wrote:I came across this trick 5 years ago while working on my client's project.
I'm hoping for a solution that doesn't involve tricks or workarounds.
Um, this is 3D CG animation, after all. Tricks and workarounds have been my bread and butter for 35 years, and will probably remain a core of the skillset until AI makes the entire field obsolete. :D

Re: Volume effects fog distance

Posted: Wed Jun 05, 2024 12:30 pm
by J.C
frankmci wrote:Tricks and workarounds have been my bread and butter for 35 years...
35 years on bread and butter is far from healthy. You should have some proper vegetables and fruit instead :P

Re: Volume effects fog distance

Posted: Sun Jun 09, 2024 4:03 pm
by pegot
This is fine for still shots or simple animation but fails when camera has to rotate around the plane or do more advanced camera moves. You can animate the plane as well but it gets tricky and things can fall apart easily.

Re: Volume effects fog distance

Posted: Tue Jun 11, 2024 7:14 pm
by frankmci
pegot wrote:This is fine for still shots or simple animation but fails when camera has to rotate around the plane or do more advanced camera moves. You can animate the plane as well but it gets tricky and things can fall apart easily.
I just make the plane a child of the camera, and it generally works fine. It will mess up with Z-depth passes, but it's easy enough to exclude the fog plane geometry from those if you need to output a separate Z. There are also instances where motion blur can get funky, but again, I'd generally render a motion vector pass sans fog plane for that.

Re: Volume effects fog distance

Posted: Wed Jun 12, 2024 9:40 am
by J.C
frankmci wrote: I just make the plane a child of the camera, and it generally works fine. It will mess up with Z-depth passes, but it's easy enough to exclude the fog plane geometry from those if you need to output a separate Z. There are also instances where motion blur can get funky, but again, I'd generally render a motion vector pass sans fog plane for that.
The plane effectively blocks all objects behind the plane for masks creation like cryptomatte or object id.
Again this is a workaround suitable for specific cases. I asked if current tools could be improved, not if there are any workarounds... and I'd like to hear opinion from developers if possible.

Re: Volume effects fog distance

Posted: Thu Jun 13, 2024 12:13 pm
by frankmci
J.C wrote:The plane effectively blocks all objects behind the plane for masks creation like cryptomatte or object id.
Again this is a workaround suitable for specific cases. I asked if current tools could be improved, not if there are any workarounds... and I'd like to hear opinion from developers if possible.
Yes, that's exactly what I meant by needing to do a separate pass for things like Z depth, which includes crypomatte and such. Sorry if my attempt to be helpful was misguided.

Re: Volume effects fog distance

Posted: Wed Jun 19, 2024 2:57 pm
by J.C
frankmci wrote:
J.C wrote:The plane effectively blocks all objects behind the plane for masks creation like cryptomatte or object id.
Again this is a workaround suitable for specific cases. I asked if current tools could be improved, not if there are any workarounds... and I'd like to hear opinion from developers if possible.
Yes, that's exactly what I meant by needing to do a separate pass for things like Z depth, which includes crypomatte and such. Sorry if my attempt to be helpful was misguided.
Yet another workaround to fix workaround. Feel free to work like this. I prefer to ask developers to improve the software to avoid such issues.