AWS Thinkbox Discussion Forums

Any tips on removing internal "bubbles" in fluid sim meshes?

Heya Folks,

I’ve to render a few fluid shots at the minute and frost seems a pretty quick way of meshing. On thing I find a bit of an issue though is the sim is pretty much a water tank with an object splashing into it so I’ve a box of particles that get sloshed around on impact. There’s a wave pattern on the surface so I need to keep a small radius to capture that detail, but the issue is that I then get problems with particles appearing on the inside of the tank - more or less like bubbles which will ruin the nice clean look of the refractions and also slow down renders. It seems like the low density threshold of zhu / bridson should help but I’m having difficulty in getting a balance.

Has anyone come up with anything quite sneaky that’d make a difference? It’s a pretty dense particle sim - 40m x 40m x 6m box approx and about 15 million particles.

Thanks for any insights - I’m doing the usual dublin thing of doing a really specific type of work every three years and having to relearn everything each time!

Cheers,

John

There might be several approaches to fight this problem, but it depends on the simulation source and whether you have Genome or not :wink:

For example, if the simulation is coming from Naiad, you would have access to a special “Droplet” channel. This channel gives you the probability for a particle to be detaching from the body of the fluid, which lets you detect and separate particles deep inside the fluid, at the surface and in splashes. Using a Magma modifier, you could vary the radius of particles based on this channel, so that the body of the fluid uses a larger radius than the surface where you want the finer detail…

Not sure whether RealFlow has a similar feature, but I believe there was something to figure out what is on the surface and what not…

Using Genome, you could detect mesh elements with very small area or volume (consistent with bubbles inside the volume) and select them for deleting. You could also add a test at the center of each element to look for particles within a specific range to determine whether the element is surrounded by particles or is an actual droplet in the air to avoid selecting parts of actual splashes… Or you could provide a reference Z height where the surface is expected and only select small mesh elements below it (deep in the body of the fluid).

I hope these possible approaches give you further ideas…

Yep it’s naiad alright. I’ve no access to genome here, only krakatoa and frost but yeah that gives me some good ideas alright. Even possibly a really low res frost of the sim with a push to make an inner volume might give me something to cull with? Fingers crossed - meshing in naiad on large sims seems to be slooooooow!

Thanks for the pointers bobo - you gonna take a trip over to eue this year?

The “Droplet” channel will have negative values (around -100.0) for particles that are deep inside the body of the fluid, go around 0.0 at the surface and have positive values for particles that are likely to detach from the body of fluid. The values are probabilities though, but should work. So you can try to say in Magma - Radius = If Droplet < 0 then 2.0 else 1.0. This will require an InputChannel Droplet connected to a Less operator, a Switch with inputs 2.0 and 1.0 and Less connected to 3rd socket, and the Switch’s output goes to Radius channel. Then in Frost, check “Use Radius Channel” and your particles will have different sizes inside the fluid and at the surface.
Change 1.0 and 2.0 to whatever you want…

Would it be possible to benchmark it for me when you have a minute? I have heard that it can be slow, and I have heard numbers, but I want more, and I don’t have Naiad to test myself…

No EUE for me this year, I just came back from New York where I did Max and Maya User Groups, and I will be going back to NYC in June for Collider, and then to Siggraph in July.

Rhys and I were just talking about this too, he was explaining a little to me how he utilized Genome to rid his Frost meshes of any gaps against a surface. What he did came out beautifully. :slight_smile:

I too haven’t got a hold of Genome, I am seeing some amazing problem solves with it, decisions…decisions…

All good bobo - what’s the best way to get measurable benchmark numbers for you?

BTW FYI the making of is posted here :slight_smile:

vimeo.com/64284173

That’s having a bit of a fit dealing with 1.5 million particles so you could be right - I’ve got a prt loader set to use 10% of render amount of 100% and it’s not happy. I’m thinking I might be better to predelete the particles into a new prt instead?

Yep - culling based on that channel has worked really nicely. You’re right that it’s a bit slow but rendering out to a treated prt and then back into frost has been great - going to make my renders far cleaner now.

Much appreciated sir!

For Frost, you can enable Debug mode in the Help rollout and watch the exact numbers in the Frost Log window.
For Naiad, I have no idea how you benchmark, but it would be nice to get comparable timing for the same data.

Then simply email me: bobo AT thinkboxsoftware DOT com

Ah sorry - I don’t have naiaid here myself, I’m just getting PRT files for rendering from it.

Much appreciated for the tips though, it’s about time I went back and learned krakatoa and magma properly.

Privacy | Site terms | Cookie preferences