Houdini 16 - Flip Fluid Upresing ?

   18709   16   9
User Avatar
Member
2 posts
Joined: June 2012
Offline
Is Flip Upresing a new feature available in H16? In the Whats New in H16 video and the live event a new technique of using lowres simulation as guide for upres flip simulation is shown. But I am not able to find anything related to this in H16 or any documentation related to this. How is it done?

Thanks.
Pramod

https://vimeo.com/user10771375/videos [vimeo.com]
User Avatar
Member
280 posts
Joined:
Offline
wondering about that my self….
User Avatar
Member
166 posts
Joined: March 2013
Offline
Any news on this? I suppose it's similar to the Guided Ocean Layer (using the Gas Guiding Volume DOP), but I'm not sure how to set it up with flipsim -> flipsim.
User Avatar
Member
16 posts
Joined: Nov. 2013
Offline
Gas Guiding Volume works nice
User Avatar
Member
166 posts
Joined: March 2013
Offline
vanyfilatov
Gas Guiding Volume works nice
How do you approach it though? With the particles especially, do you source them from the same source as the “lowres” sim?
User Avatar
Member
73 posts
Joined: Sept. 2014
Offline
Hi everyone,

We have a masterclass coming out soon that will explain how to set up a re-sim of a river simulation. However, I will do my best to explain the workflow here and answer any questions that come up.

The re-sim idea comes from the addition of the “Boundary Layer” in the FlipSolver node. With the Boundary Layer, we can maintain a surface and velocity in a thin layer around the volume limits of the simulation based on SOP volumes that we link in. This is valuable because we can now prescribe in-flow and out-flow velocities at the volume limits, whereas before the limits were closed (i.e. zero velocity) or open (i.e. any outflow velocity). By setting the velocity to exactly match our linked velocity volume, we have much more control over our simulation. The surface volume controls how the geometry is maintained in the boundary layer strip. Any voxels below our surface will be reseeded with particles and any voxels above our surface will have particles removed. This allows us to maintain fluid volume in the simulation when we want fluid flowing into the simulation through one region and out through another. For this reason, the Boundary Layer option is used heavily in the Oceans toolset.

For rivers, we need to bake out our low-res simulation first. We then load the baked geometry (surface and velocity) in to our up-res simulation through a File SOP and wire the surface and velocity into the Boundary Layer. In the example from the launch video, the up-res FlipSolver's volume limits were adjusted to focus on a small section of the river to be up-res'd. We also modified the scene by adding a collision object. Finally, we need to seed new particles into the first frame. In the same Geometry node as the File Sop, we used Points from Volume to seed particles into the low-res surface (only within the volume limits of the new simulation) and sampled the velocity from the baked velocity to assign to the particles. Theses particles used the new, high res particle separation. We then wired these particles into the FlipObject's intial data. This allows us to start the simulation with right lo-res velocity.

It is also possible to drive the up-res with GAS Guiding Volume (which is used primarily for the Guided Ocean Layer). But BUYER BEWARE we found that turbulence tends to form at the seam between the guiding volume and the free fluid volume. Because of this, we do not currently endorse this approach for doing an up-res, but we are researching how to solve this in a future version.

If you want to try anyway, GAS Guiding Volume is similar in spirit to the Boundary Layer but with arbitrary volumes. The surface of the guiding volume will force the fluid simulation to match the guiding velocity, much like how the Boundary Layer forces the fluid simulation to match its velocity at the volume limits. Therefore, you will need to modify the low-res baked surface to only be “plugs” on either end of the simulation before you link it to the guiding volume. Finally, it's essential to make the appropriate modifications to the “Solver” tab in the FlipSolver so the guiding volume is visible to the solver (see http://www.sidefx.com/docs/houdini/nodes/dop/gasguidingvolume [sidefx.com] for instructions).

I hope this helps!
Ryan
Edited by rgoldade - March 1, 2017 11:12:32
User Avatar
Member
280 posts
Joined:
Offline
any hip files we can play with
User Avatar
Member
73 posts
Joined: Sept. 2014
Offline
Ah right. I should have anticipated such a question. I will post some example files this afternoon.
User Avatar
Member
166 posts
Joined: March 2013
Offline
That sounds really neat, and something I could definitely use with what I'm working on now. Looking forward to those hips I can dive into tomorrow at work!
User Avatar
Member
73 posts
Joined: Sept. 2014
Offline
I've attached the .hip files used for the river re-sim. The boundary_layer_river.hip file is the “low res” river, using the boundary layer to maintain the flow rate and water level of the river. The resim_river.hip file loads in the geometry from the boundary layer example and re-sims at a higher resolution, with a collision object and only simulated in a small region of the river.

I've attached an example of using the guiding volume approach instead of the boundary layer. This is for those who are curious about the setup. Again buyer beware here. The tool was designed for use with Oceans in H16 and has the potential to be generalized for many other features. However, we have noticed some instability at the seams so we don't currently endorse using it for this purpose.

Enjoy!
Ryan
Edited by rgoldade - March 1, 2017 17:51:15

Attachments:
boundary_layer_river.hip (1.8 MB)
resim_river.hip (2.0 MB)
guiding_volume_river.hip (1.9 MB)

User Avatar
Member
166 posts
Joined: March 2013
Offline
Thanks for that! Looks really interesting
User Avatar
Member
166 posts
Joined: March 2013
Offline
I have one question. The thing I'm working on needs to be pretty quick, so I upped the initial velocity to 10, both for the boundary vel and initial vel on the flipobject. However, doing this the top of the river starts eating itself forward and I get a gap where it won't seed any particles (because the surface isn't there anymore?). Eventually the velocities at the top there goes really crazy and kinda blows up in a big wave.
In the boundary_layer_river.hip, set your initial velocities to 30 or higher and you'll see what I mean.
Why does this happen? Is it a case of needing substeps or something else?

edit: It works a lot better if I add a source to fill in that gap, and the velocities there no longer blows up as well. But this seems a bit counter-intuitive seeing as the setup is “source-less”. Could the problem be because the particles is being seeded and then advected directly afterwards? As opposed to sourcing post-solve which seems to “solve” it.
Edited by Skybar - March 2, 2017 11:36:45
User Avatar
Member
73 posts
Joined: Sept. 2014
Offline
Could the problem be because the particles is being seeded and then advected directly afterwards

That could definitely cause a problem if your river is flowing fast enough to escape the boundary layer in each frame. The boundary layer acts as a source at the reseed step. This happens before the advection step so in your example it makes sense that using a source shows an improvement.

For slower moving rivers, the source might seed into non-empty voxels and create more particles than necessary, which will then be deleted in the next reseed step. The boundary layer doesn't over populate voxels, making it more efficient, but is susceptible to fast moving simulations.
User Avatar
Member
280 posts
Joined:
Offline
does this technic only applicable for stuffs in a container? what if its a small scale simulation and we just want to add details to the simulation? and also can the upres simulation be blended with the low res sim one?

thanx
Patar
User Avatar
Member
73 posts
Joined: Sept. 2014
Offline
There's no real satisfying solution for upressing something like a droplet. The suction fluid tool might help direct the high res simulation to match the low res. However it tends to behave like an elastic band if the hi res deviates too much from the low res. Adding drag to match the low res velocity might also help. Both of these approaches can get the high res closer to matching the low res but it will require a lot of parameter tuning. Because of this, we only encourage upressing using container boundaries.
User Avatar
Member
1 posts
Joined: Jan. 2017
Offline
Guided bend river is hard to setup on daily basis, with that box setups everywhere, it didn't work in my case, i used like 9 bend nodes to make the box bend on my river, but later part on generating velocity, the bends distorted the particles mucb further, dont know why still Searching for solutions, i think is due to the volume and match size stuffs which I don't know about, anyone with solution?
User Avatar
Member
73 posts
Joined: Sept. 2014
Offline
Are you able to provide an example file? I would be happy to take a look and offer some help.
  • Quick Links