Jump to content

Pyro Expand + Pump + Sink examples?


catchyid

Recommended Posts

Hi guys, I have been testing SOP Fluid Source that is configured as sink,pump and expand. Sometimes I get "good" results and sometimes I don't. I am not sure exactly what I am doing wrong?! Does anyone have examples on how to configure use these fluid sources in pyro simulation? The kind of problems I am having are similar to this:

-although I am using sink, smoke still passes through the volume! I managed to increase the absorption amount by scaling Source Volume DOP (scalar volume velocity)

-in a small example, expands pushes away smoke, in another example it does not. Does expand use surface normals to determine the direction in which to push smoke (but it's actually a volume, so normals exist!)

Thanks, merry Christmas and happy new year everyone :)

Link to comment
Share on other sites

not sure how the source volume work for this, but it's an OTL so you can check the inside...
for sink/pump/expand operations I normally use a "Gas Field Wrangle" microsolvers.

if you set your "input 1" to a SOP path with a volume then:

// load volume
float vs = volumesample(0,0,@P);
// expand
f@divergence += vs * chf("expand_amount");
// sink
f@density *= clamp(1-vs,0,1);

of course you'd need to adjust the volume values if you're using an SDF/surface field

for pump, you'd need to load 3 volumes since it's velocity:
float vx = volumesample(0,0,@P);
float vy = volumesample(0,1,@P);
float vz = volumesample(0,2,@P);
vector v = set(vx,vy,vz);
v@vel += v * chf("velocity_scale);

Edited by bunker
  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

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

×
×
  • Create New...