## Recommended Posts

Posted (edited)
Hey guys wondering if anyone can give me some ideas to tackle this effect on a heightfield: https://twitter.com/Jose_Molfino/status/1669804412569567233 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!
##### Share on other sites

Try this ..gradient,divergence, curl, height and water , after when you are done in DOP, just import fields with SOP primitive properties and Play with different fileds, then check your LINK you have Nice tricks .. Have fun

##### Share on other sites

Posted (edited)

Hello,

@LibrarianThank you for the help! Is this sort of how the shallow water solver works?

##### Share on other sites

@adamknauer1 Basically Yes , just here you have more View(somehow not complicated to see at least for me)  , easy to control and you can adjust height , different PIC and various ways to manipulate fields.

if you search I posted also Espresso  Blend Fluid  that have nice tricks.. so combining those 2 you can make Nice effects .

##### Share on other sites

@LibrarianOk I appreciate the advice here. I will take a look at that post as well!!

##### Share on other sites

@LibrarianDo you have that hipfile so I could dive in and see what's going on? Thank you!

##### Share on other sites

Posted (edited)

You want to say that you don't have 30 minutes of your time to just create Dop (just Node DOP) and rewrite those codes.

https://www.sidefx.com/forum/topic/95230/

Edited by Librarian
##### Share on other sites

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 = volumegradient ( 0, "height", @P );
vector up = { 0, 1, 0 };
vector tangent = cross ( v@grad, up );

##### Share on other sites

Posted (edited)

@animatrixThank you! What is the structure inside of your Solver Sop? Is there just a volume vop?

##### Share on other sites

@animatrixThank you! What is the structure inside of your Solver Sop? Is there just a volume vop?

Yes only Volume VOP SOP.

##### Share on other sites

@animatrix hmm I'm not getting any advection results. Must be missing something I'm missing. Should I be using any of the inputs into the geometry file inputs?

##### Share on other sites

@animatrix hmm I'm not getting any advection results. Must be missing something I'm missing. Should I be using any of the inputs into the geometry file inputs?

Do you have the gradient field and you use the right input in advect by volume VOP?

##### Share on other sites

@animatrixI have a gradient field, should it match the bounds of the heightfield that I am advecting? Should this "gradient" field have initial values? I am currently inputting the previous frame into the advect by volumes.

##### Share on other sites

Yes if gradient is empty then it won't do anything. In my code you can see I am computing it using volume wrangle.

##### Share on other sites

@animatrixI'm confused why my setup isn't working;/ If you don't mind me asking, what is the correct input for the volume advect vop? Thanks!!

##### Share on other sites

I think it would be easier if you could attach your file.

##### Share on other sites

Posted (edited)

@animatrixOk I think you're right

##### Share on other sites

I see the issues, you need to have the grad field the same as your height field:

But most important thing is to use a non-zero Timestep value:

Then it works.

##### Share on other sites

@animatrixAhhhh I see. Makes sense why it wasn't working! Thanks for all your help here!!!

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×