Advecting "gradient" Field of Heightfield?

   1874   2   2
User Avatar
Member
4 posts
Joined: Jan. 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
4700 posts
Joined: Feb. 2012
Online
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_ - March 29, 2024 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 | pragmaticvfx.gumroad.com
User Avatar
Member
4700 posts
Joined: Feb. 2012
Online
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 | pragmaticvfx.gumroad.com
  • Quick Links