Volume density direction

Good evening. What is the best way to regulate  volume density simultaneously in vertical and horizontal directions ? My beginner's brain came up with this scheme, but it don't work as I expected.

https://ibb.co/5WV9wwFr

https://ibb.co/7B5V1F9

1 love
Reply
  • Omar Domenech replied

    I'm not sure exactly what you mean, since vertical and horizontal is basically the whole mesh and so by default you should get that with just the volume. But maybe you mean you want to control them independently in both direction, in that case as you have it, a coordinate for each side and then joining them should do the trick.

    1 love
  • Martin Bergwerf replied

    Hi Alexey,

    I am not sure what you want exactly either, but I'd probably try something like this:

    Gradients.png

    but you might want to play with the blend mode of the second Color Mix Node, in order to get the effect you are looking for (or use a Math Node instead, if you don't need the Factor).

    2 loves
  • Alexey Zabnev(HoodZomb) replied

    Thank y'all. Yes, i want to separatly control not only fog in the sky, but also a mist on the ground to show only limited distance ahead of a camera. But when i added  two gradients together, like on the screenshot , it became too cloudy. I will try to do it your way.

    1 love
  • Martin Bergwerf replied

    Yes, important is to: "...play with the blend mode of the second Color Mix Node..."

    1 love
  • Martin Bergwerf replied

    "...to show only limited distance ahead of a camera..."

    In that case, you could also do something like this:

    Fog_00.png

    Don't judge this on the background, because that's an HDRI and that isn't affected by View (or Camera) Distance, because it's 'considered infinitely far away'.

    2 loves