Advecting "gradient" Field of Heightfield?

   1010   3   1
User Avatar
Member
3 posts
Joined: 1月 2019
Offline
Hey guys wondering if anyone can give me some ideas to tackle this effect on a heightfield: https://twitter.com/Jose_Molfino/status/1669804412569567233 [twitter.com] The artist Jose says that it's a heightfield expanding inside a solver and a gradient field based on height is used for advection. Does anyone know how that works? How would you advect calculated values like gradient field vectors?

Thank you!
User Avatar
Member
4515 posts
Joined: 2月 2012
Offline
Hi,

Here is one way:

1. Compute grad using VEX in a Volume Wrangle:

v@grad = volumegradient ( 0, "height", @P );



2. Advect using Volume VOP SOP inside Solver SOP:



3. Run the simulation














You can also get different results by playing with the advection vector:

v@grad = volumegradient ( 0, "height", @P );
vector up = { 0, 1, 0 };
vector tangent = cross ( v@grad, up );

v@grad = tangent + v@grad;









v@grad = volumegradient ( 0, "height", @P );
vector up = { 0, 1, 0 };
vector tangent = cross ( v@grad, up );

v@grad = tangent;





Edited by animatrix_ - 2024年3月29日 09:50:18

Attachments:
hfadvectx1.gif (2.5 MB)
hfadvectx2.gif (4.4 MB)
hfadvectx3.gif (2.8 MB)

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 | animatrix2k7.gumroad.com
User Avatar
Member
3 posts
Joined: 1月 2019
Offline
Wow this is so cool! This taught me a lot. Thank you!!
Edited by adamknauer1 - 2024年3月31日 01:44:49
User Avatar
Member
4515 posts
Joined: 2月 2012
Offline
You can also use an animated heightfield for the gradient to create more interesting variations like this:

Attachments:
hfadvectx4.gif (13.2 MB)

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 | animatrix2k7.gumroad.com
  • Quick Links