Page 1 of 2

How to add density falloff using Std Volume Medium

Posted: Thu Nov 07, 2024 7:58 pm
by tombyrom
Hello,
I am struggling to do something I thought was easy. I have a basic mesh volume with a cube as the object node. I assigned a Std Volume Medium to the volume.

I want the volume to be dense at the bottom of the cube and 0 density at the top. Just a simple falloff.

I have tried all types of nodes in the density texture slot. I have tried to use a planar field in the slot which works by itself but does not produce a gradient it is a hard cut off, I tried to add a gradient texture node after and I cannot get it to have any meaningful effect.

Basically, I just want a mesh volume with a simple falloff for the density on the Z axis... Can anyone help?

Thanks

Re: How to add density falloff using Std Volume Medium

Posted: Mon Nov 11, 2024 7:44 am
by larsgehrt
Is this for a ground fog effect?

I do think in regards to volume effects you need to look at something else, zdepth or maybe create it via another render.

Re: How to add density falloff using Std Volume Medium

Posted: Mon Nov 11, 2024 10:39 am
by tombyrom
That doesn't answer my question... Lots of reasons why you might create volumetrics in specific areas and want falloffs on the density.

My question still stands which is how can you use Std Volume Medium to create a falloff effect on the Z axis, its the only node that allows a texture in the density slot so something has to be possible, just I have had no real success with different nodes in the slot so can only assume I am doing something wrong. Or using wrong node in it.

Re: How to add density falloff using Std Volume Medium

Posted: Fri Nov 15, 2024 4:30 am
by neonZorglub
Hi tombyrom,
There are several maps that could do this.
What about the distance texture ?
You can specify the axis, a scale with the normalization range, and the bottom Z value with the reference transform
(note that Octane 'y-axis offset' is for the 3dsMax Z axis)

Connect it to a Gradient texture for more control, optionally invert it depending on the usage and you get some values from 0(1) to 1(0) from bottom to top

Here the Left cube uses this in the Absorption of a Volume medium, the right cube uses it in the Transparency weight of a Std Volume medium..
density_from_distance.png
volume_density02_mx21.zip
(80.33 KiB) Downloaded 174 times

Re: How to add density falloff using Std Volume Medium

Posted: Fri Nov 15, 2024 1:17 pm
by tombyrom
Hi neonZorglub,
Thanks for providing a file, when I open it and hit render it looks nothing like your screenshot?

The left hand one does not show anything and the right hand one has no fall off on the medium?

Why would this be the case?

I am using 3dsMax 2024.2.5 and latest version of Octane

Re: How to add density falloff using Std Volume Medium

Posted: Fri Nov 15, 2024 1:40 pm
by tombyrom
Don't worry I think I've got it working the file provided had the textures plugged into the wrong slots on the mediums, I can get it looking like your screenshot now.

Thanks for this it should help me

Re: How to add density falloff using Std Volume Medium

Posted: Sun Nov 17, 2024 11:42 pm
by neonZorglub
Hi tombyrom,
Ho, that's right, the sample file had something wrong, sorry about that !
Glad that you could fix it.
Here is a new version, for reference:
volume_density02b_mx21.zip
(80.01 KiB) Downloaded 181 times
Thanks

Re: How to add density falloff using Std Volume Medium

Posted: Wed Nov 20, 2024 5:19 pm
by tombyrom
No worries, the relative distance map in the transparency weight and then using the transparency depth to tune the falloff works perfectly for what I will need in the future. I used quite high numbers for the depth but it's prob scale dependant.

Also to get this working even nicer set the scatter anistropy on the Std Volume Medium to something like 0.5/0.6 and then you have perfect fog which blends with it's environment, the attached image using path tracing.

Re: How to add density falloff using Std Volume Medium

Posted: Thu Nov 21, 2024 8:08 am
by larsgehrt
Hey Tombyrom,

can you share that scene for 3ds max 2022?

thanks, and if not no worries :)

Re: How to add density falloff using Std Volume Medium

Posted: Thu Nov 21, 2024 9:57 am
by tombyrom
Here you go, I have an additional noise in the density, you can change the noise type or remove it, but can help just break up ever so slightly.

The relative density map normalization range is capped at the same height as the volume mesh, in this case 200 meters. So adjust that if you have a bigger volume. Also it is relative to Z axis, so if you move the mesh on the Z axis then offset that normalisation range to account for it otherwise it won't work and it will disappear.

Changing the transparency depth will change the depth of the transparency/density which helps for fine tuning. I have put 500 but going higher makes the gradient falloff more obvious 1000+

Change step length for a bit more speed but it will thin out the volume. 10-20 seem fine here

I'd leave the scatter anistropy around .5/.65 depending on the situation.