Jump to content
GallenWolf

Houdini: Foam with level set fluids

Recommended Posts

I've got free time this weekend and was experimenting with foam for use with level set fluids.

It's not complete but I'm moving on to other experiments, so yeah!

Alvin

Share this post


Link to post
Share on other sites

Uh....It looks like it has potential for a nice beer-sim ;-)

Looks great

Erik

Share this post


Link to post
Share on other sites

Nice one Alvin, you rock!! :D

Anyway this could be moved to a FLIP fluid sim instead? Guessing you could use the measure SOP to get the curvature from the meshed fluid, but would the advection part be doable?

Share this post


Link to post
Share on other sites

Thanks guys!!

Anyway this could be moved to a FLIP fluid sim instead? Guessing you could use the measure SOP to get the curvature from the meshed fluid, but would the advection part be doable?

This should be possible. I did not test it, but flip seems to have a distance field (mesh generated from this, and used for curvature calculations) and velocity volumes, which is exactly what I extracted from the level set fluid for the foam pass - so in theory it's just export these two volumes, plug 'em in and should work. Advection part is in pops, it's just setting velocity on the particles that are sampled from the velocity volumes and correcting the position based on the distance field. I wonder how the foam passes are done in naiad, really.

If I have time I'll have to give that a go :)

Alvin

Share this post


Link to post
Share on other sites

This should be possible. I did not test it, but flip seems to have a distance field (mesh generated from this, and used for curvature calculations) and velocity volumes,

Cool, cheers Alvin. Yeah guessing it shouldn't be too hard - I've been extracting the velocity field from FLIP in other tests for generating a "detail/marker pass" to get results of a more Naiad quality level. Will have a look or let me know if you get anything cool from it ...

Share this post


Link to post
Share on other sites

Cool, cheers Alvin. Yeah guessing it shouldn't be too hard - I've been extracting the velocity field from FLIP in other tests for generating a "detail/marker pass" to get results of a more Naiad quality level. Will have a look or let me know if you get anything cool from it ...

What exactly is a detail/marker pass?

Share this post


Link to post
Share on other sites

GallenWolf I test by you idea but particle`s position not good can you send your file?

Share this post


Link to post
Share on other sites

GallenWolf I test by you idea but particle`s position not good can you send your file?

Please see the attached file; this is the core of the correction I'm using. You will need to use the op: syntax to point it the proper fields. "correctPosition" needs to be pointed at a distance field, and "readInVelocity" to the velocity volumes.

HTHs!

Alvin

forOdForce.hipnc

  • Like 1

Share this post


Link to post
Share on other sites

GallenWolf thank you, I test it ok and i want to test with Flip and add some foam movement detail.

Share this post


Link to post
Share on other sites

GallenWolf thank you, I test it ok and i want to test with Flip and add some foam movement detail.

Cool, do post your results on the forum! I started doing some tests with flip last night but will be awhile before it's done.

Regards,

Alvin

Share this post


Link to post
Share on other sites

interesting test but wouldn't the "foam" generation decrease as the water calmed down?

Share this post


Link to post
Share on other sites

What exactly is a detail/marker pass?

You know, just a dumb particle sim using the velocity field from the original sim for advection. Only thing is, I'm not sure if the density should be exported to generate particle sources or not.

Anyway, just trying to work out some ideas to get the FLIP solver to produce denser results. At the moment, my sims crap out at around the 2mil particle mark & I've got 48Gb of RAM!! Not sure if this is right tho, memory leak perhaps? :(

Share this post


Link to post
Share on other sites

interesting test but wouldn't the "foam" generation decrease as the water calmed down?

Actually, it does. particles are only emitted based on a threshold of velocity and curvature. Ideally, it would also factor in churn, but I have no idea how to calculate that.

You know, just a dumb particle sim using the velocity field from the original sim for advection. Only thing is, I'm not sure if the density should be exported to generate particle sources or not.

Anyway, just trying to work out some ideas to get the FLIP solver to produce denser results. At the moment, my sims crap out at around the 2mil particle mark & I've got 48Gb of RAM!! Not sure if this is right tho, memory leak perhaps? :(

Oh! Ok. How is that working out for you? I am thinking you'd probably need to do what the "Particle-Transport" BOP does? Not entirely sure how that works but I'd say probably similar to the foam? Move based on velocity and correct?

Currently distracted by soho and incline cpp, may be back on this later ;-)

Share this post


Link to post
Share on other sites

You know, just a dumb particle sim using the velocity field from the original sim for advection. Only thing is, I'm not sure if the density should be exported to generate particle sources or not.

Anyway, just trying to work out some ideas to get the FLIP solver to produce denser results. At the moment, my sims crap out at around the 2mil particle mark & I've got 48Gb of RAM!! Not sure if this is right tho, memory leak perhaps? :(

I have a similar issue -- the most i've been able to get is around 3 mil overnight... and it takes forever. It's only using about 6-8 gigs of ram. I have 24... not sure what the issue is, but after the 2-3 mil mark houdini just chugs.

--Ian

Share this post


Link to post
Share on other sites

if u wanted churn you could use gas analysis to generate a curvature field from the vel field and in the curvature field the areas of high magnitude you could scatter points and spawn churn particles

Share this post


Link to post
Share on other sites

if u wanted churn you could use gas analysis to generate a curvature field from the vel field and in the curvature field the areas of high magnitude you could scatter points and spawn churn particles

Cool! Let me take a look at that. Cheers!

Alvin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×