Gradient Fall-off Volume

   Views 10937   Replies 10   Subscribers 0
User Avatar
Member
17 posts
Joined: Aug. 2014
Offline
Hi everyone, I am dabbling with volumes recently and I wish to know how can I have a fall-off of volume, gradiently? (see image attached).

I have zero to minimal knowledge of volume vop. Forum Users talk about volume sample and volume gradient when I search on forums regarding this issue.



**Additional Info– Better still if I can control, say, point A is densest and point B is thinnest.**



Thank you in advance.

Attachments:
grad.jpg (970.3 KB)

User Avatar
Member
1802 posts
Joined: May 2006
Online
Something like this?

Attachments:
vol_spherical_density.hip (72.4 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
17 posts
Joined: Aug. 2014
Offline
Wow, this is it. It's very nice. Thank you! Really appreciate it.
User Avatar
Member
17 posts
Joined: Feb. 2017
Offline
Super cool ! this exactly what I was looking for ! thanks thanks thanks !
User Avatar
Member
1 posts
Joined: Nov. 2018
Offline
Hi there,
i am completely new to Houdini, sorry for that.
How would i create volumetric gradient, that is more dense at the bottom and density will be less at the top?
A volumetric vertical gradient i mean.
Many thanxs for help
User Avatar
Member
4723 posts
Joined: Feb. 2012
Offline
Inside a volumewrangle you can just do:

@density = 1 - relbbox(@P).y;
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
1 posts
Joined: Jan. 2019
Offline
animatrix_
Inside a volumewrangle you can just do:

@density = 1 - relbbox(@P).y;
thanks! and how this can be achieved along all three axes x,y,z?
User Avatar
Member
178 posts
Joined: Jan. 2013
Offline
tapoh
thanks! and how this can be achieved along all three axes x,y,z?

Without testing, probably like:
@density = 1 - length(relbbox(@P));
User Avatar
Member
63 posts
Joined: Oct. 2021
Offline
jpparkeramnh
@density = 1 - length(relbbox(@P));

Unfortunately this doe not work. Has somebody a solution for this?
www.rehimi.de
User Avatar
Member
63 posts
Joined: Oct. 2021
Offline
mestela
Something like this?

this works though.
www.rehimi.de
User Avatar
Member
4723 posts
Joined: Feb. 2012
Offline
If you want to have falloff for 3 axes, you can do something like this in a Volume Wrangle SOP:

vector r = relbbox ( @P );
@density = ( 4 * r.x * ( 1 - r.x ) + 4 * r.y * ( 1 - r.y ) + 4 * r.z * ( 1 - r.z ) ) / 3;

Attachments:
x.png (880.0 KB)

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
  • Quick Links