Jump to content
Atom

Extend FLIP Coverage (without extending sim area)?

Recommended Posts

Hi All,

I have a small flip tank that my character is wading within. This small area is all I really need for my scene but I want to extend the edges of the FLIP tank so it appears the water extends out into a lake at render time.

What is the best technique to extend the look without making the sim area any larger?

Untitled-1.jpg

Edited by Atom

Share this post


Link to post
Share on other sites

Very useful thread, I'm also very interested in that topic !

Can't wait to see how this is dealt with.

Share this post


Link to post
Share on other sites

Ultimately it's going to be a volume, I would just make some other volumes to mix in once you are at that stage?

Share this post


Link to post
Share on other sites

Hmm..I thought when I surfaced my flip it would be a mesh.

How do I get a seamless blend between a volume and a mesh, assuming the extension volume is a box?

Share this post


Link to post
Share on other sites

The way I approached it was by flattening the area around edges of a simulated fluid mesh and further extending it using pad bounds parameter of a particle fluid surface node. After that I added a huge grid and simply blasted the area of the grid that intersects with a fluid mesh. Then I just merged the two. The key is to match water level.

Share this post


Link to post
Share on other sites

Haven't done it in a long time now, but last time I rendered the ocean and flip separately and just put the flip ontop in comp. For the flip mesh I cut away the sides and bottom to only keep the top surface, and then applied an alpha gradient along the edges so that it would blend nicely. Might not work for more delicate cases, but it worked perfectly then.

Share this post


Link to post
Share on other sites

if you got the VDB way (I was hoping for a diff approach, if any) I've made a thread about it, with a neat solution from users :

 

Share this post


Link to post
Share on other sites

@Atom you are always dealing with volumes in FLIP. When you go to create a mesh from particles it will be converted to a volume/sdf first. This is where I would blend in other volumes but if you need a really large extension it might make sense to use volumes to blend into your lake mesh. 

Share this post


Link to post
Share on other sites

Thanks for the information. I get the concept but I am not sure what node combination I need to lay down to accomplish a valid mix to feed to the surfacer. How do I create a compatible surface volume from a box? And what node would mix two surface volumes together?

The image shows an attempt at blending in an external box referenced by the ObjectMerge.

Untitled-1.jpg

Edited by Atom

Share this post


Link to post
Share on other sites

You need to create an empty volume that is the size/res that you want and then vdb combine sop to add them in (make sure they are vdbs). I'll try to whip up an example...

Share this post


Link to post
Share on other sites

My bad you don't need to do the empty volume. Notice also how the operation is set to Minimum and the combination is perfect!

vdbCombine.hip

 

edit: Union is also perfect.

Edited by stevegh

Share this post


Link to post
Share on other sites

I have migrated your example setup into a typical FLIP setup and even though I can combine the two volumes, without errors, the particlefluidsurface1 node does not recognize the new extended area? It still surfaces only the area supplied by the import_fliptank node.

 

Is the extension volume empty by default?

 

Untitled-1.jpg

ap_flip_surface_extension.hipnc

Edited by Atom

Share this post


Link to post
Share on other sites

How about you create some points from a volume of the extended area and merge those points with your flip points and then mesh them afterwards?

Share this post


Link to post
Share on other sites

To blend flip mesh with ocean surface just plug your mesh into the same ocean evaluate and bake the maps. You also need to cache the mesh cache from evaluate's output so it will have uv/point/ foam and cusp (optional) attributes. then apply ocean shader. Will only work for calm water shots, big waves is more complex technique

Share this post


Link to post
Share on other sites

@Jesper: Do you have an example of this? I don't want to add more particles for the FLIP solver to evaluate.

@Yon: I am not using an ocean surface, only a FLIP tank. I really want to keep this light weight. I think Stephen's idea for merging in a secondary volume is good. I just don't have that concept working yet.

Can someone take a look at my posted HIP file and explain how to make the particlefluidsurface1 surface the cube boundary as well?

Share this post


Link to post
Share on other sites

 

21 hours ago, Jesper Rahlff said:

How about you create some points from a volume of the extended area and merge those points with your flip points and then mesh them afterwards?

The problem with this is you'll end up having to mesh uneccesary points.

What I've done in the past is filtered out non-moving points and deleted them and meshed only these, then merged the result with the the extended. I'll post an example later. I can't quite visualize it atm.

Edited by shawn_kearney

Share this post


Link to post
Share on other sites

I am able to combine the extension area and the result after the fact. But this softens the fluid one more time to go through the conversion process.

Untitled-1.jpg

Share this post


Link to post
Share on other sites

You can use the fluid surface SOP to output a VDB directly. This will allow you to also smooth the boundary area prior to conversion. This might be helpful if there is motion at the edges of the tank.

What i'd do is this:

Make your simulation and export the particles
Make a box that nearly encompasses the detail area you want to keep. Give a little bit of padding so it's slightly smaller than the FLIP tank.
Make a box that represents the extension. This can be as deep as you want, but be aware of any secondary sims, such as whitewater.
Convert both to SDF Surface using VDB from Polygon (this can be fairly low resolution at this point)
Use Combine VDB using SDF difference so that you have a cavity for your fluids to live. It should be slightly smaller than the fluid itself.
Now your extension is prepped you can move onto the fluids

Using VDB from Fluid Particles (or Surface from Fluid Particles with export to VDB Surface enabled) convert the particles to an Surface VDB
Using VDB Combine use SDF Union with Resample Lower to Higher
If you need to smooth the boundary, you can use Smooth SDF with masking.
Convert to polygon surface using Convert VDB.

Edited by shawn_kearney

Share this post


Link to post
Share on other sites
Quote

You can use the fluid surface SOP to output a VDB directly.

Thanks, that was it. Now I don't have to convert twice.

  • Like 1

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

×