Elastic effect on flip fluids on H12

   96456   31   8
User Avatar
Member
968 posts
Joined: 4月 2008
Offline
In H11 I had a option to make my fluid leastic on H12 this is gone is there a way to achieve this effect on H12?
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
12626 posts
Joined: 7月 2005
Offline
Amazingly enough we are just needing to do this myself and you may notice the viscoelastic stuff is still only working for SPH fluids - there is no way to wire up the Gas Elasticity DOP and have it work. Even though it's named “Gas”, it operates on SPH particles and not fields.

Currently I am trying to get some results with a small amount of viscosity and some surface tension (wire in a Gas Surface Tension into the FLIP Solver). This might work for some parts of some shots, but some elastic behaviour would be very much appreciated.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
968 posts
Joined: 4月 2008
Offline
Second it!
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
373 posts
Joined: 3月 2009
Offline
+1 Love this about sph, and would love it for Flip.
Ian Farnsworth
User Avatar
スタッフ
6413 posts
Joined: 7月 2005
Offline
The problem with the SPH elasticity is that it was some stiff forces that required a higher order integrator to be stable.

It is possible with a lot of node surgery to get them to work with FLIP - Nick had them working here with the old FLIP Solver. You have to open up the FLIP solver and wire into the gas integrator a force-update version of the elastic forces.

I think the right way for viscoelastic for FLIP is with the Gas Strain Force & Gas Strain Integrate style approach, as per “A Method for Animating Viscoelastic Fluids”. You'll have to move the strains between particles and fields in a sensible way.

We've not had a chance to experiment ourselves with this to see how it shakes out, however. But in theory all the nodes are there.
User Avatar
Member
120 posts
Joined: 2月 2008
Offline
I have recently attempted to use the gas strain force and gas strain integrate also, however I couldn't get any understandable results out of it.

If you guys have any example file, at all, of any way to use it, it would be a great place to start experimenting from.
User Avatar
Member
968 posts
Joined: 4月 2008
Offline
That would be great!
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
373 posts
Joined: 3月 2009
Offline
File attached with it working. Didn't have to do too much… had to increase substeps on the flip solver to get it to be a bit more stable… pretty neat stuff!

Attachments:
H12_Flip_Elastic.hip (1.1 MB)

Ian Farnsworth
User Avatar
Member
968 posts
Joined: 4月 2008
Offline
Awesome dude, Thanks!
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
691 posts
Joined: 6月 2006
Offline
Work's like a charm!!!

Thank you.
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Member
373 posts
Joined: 3月 2009
Offline
No Prob. Thanks to jeff for pointing me in the right direction (hope that's how it should actually be set up). I think mixed with the new viscosity we should be able to create some really nice stuff.
Ian Farnsworth
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
good work Ian!
Now the only thing missing is to be able to create plasticity with fluids?!
I had no luck achieving this, at some point cranking up the viscosity/density settings doesn't really harden the fluid anymore. So is this somehow possible in H12?
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
スタッフ
6413 posts
Joined: 7月 2005
Offline
That setup looks good for strain. The only big thing missing is the strain isn't being rotated by the velocity field. So if you have a blob that is stretched in X, then rotated 90 degrees, it will still try to restore along the X axis. Gas Velocity Stretch is supposed to fix this, but it is a pretty subtle thing.

It's also a bit not-FLIP like because you are keeping a field from frame to frame. A proper FLIP approach would be to store the strain attribute on the particles and rebuild it from there. This gets a bit tricky, however. But with proper extrapolation you could probably avoid the damping you are currently getting. Without any viscosity, the fluid should keep jiggling forever, while as you see it quickly settles in your example.

As for things not properly seizing up with large viscosities… Have you tried increasing the particle radius scale on the flip object? The default 1.2 is good for splashy sims, but results in lots of underresolved ballistic particles. These particles also have effective zero viscosity. So if you are seeing drips off the edges of your model, try setting the particle radius scale to 2.0. This ensures all particles are resolved (but introduces viscosity) so they should stay together better.
User Avatar
Member
373 posts
Joined: 3月 2009
Offline
Thanks for the tips, Jeff! I'll play with it some more and see what I come up with.
Ian Farnsworth
User Avatar
スタッフ
823 posts
Joined: 7月 2006
Offline
Nice work figuring the strain stuff out, Ian. I think you might still be missing advection of the strain matrix, and as Jeff points out, that's tricky with FLIP since ideally the particles represent the entire state of the simulation at any given time.

I put together a little FLIP elasticity asset that uses the Strain DOPs and FLIP/PIC for advecting the strain matrix, storing the strain in attributes on the particles. The substepping requirement for the explicit GasStrainIntegrate DOP makes it pretty expensive, as does GasParticleToField on a matrix attribute, but it might be useful in some contexts. Also, in my tests it seems like adding a small amount of viscosity helps damp / stabilize the elasticity force.

There may be a bug in Gas Velocity Stretch's handling of matrices, so at the moment I've got that DOP bypassed within the OTL (and offhand I'm not sure the rotation works with a FLIP-style update anyway).
Edited by - 2012年3月22日 14:07:23

Attachments:
viscoelastic.hip (1007.3 KB)
viscoelastic_teapot.mp4 (669.1 KB)
flipelasticity.otl (11.4 KB)

User Avatar
Member
691 posts
Joined: 6月 2006
Offline
:shock: Thanks Johner!!!

You are a DOP Master!!!
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Member
373 posts
Joined: 3月 2009
Offline
Awesome. Thanks Johner! Makes my life easier. I just got to the point where it was ‘working’ and was like, COOL. Having it track with the particles makes sense… was going to look into that later, but now I don't have to.
Ian Farnsworth
User Avatar
Member
968 posts
Joined: 4月 2008
Offline
Wow! That's awesome!!!

Thanks for that guys!
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
スタッフ
823 posts
Joined: 7月 2006
Offline
I should have mentioned, if you're wondering what those obscure Alpha and Gamma parameters represent on the GasStrainIntegrate DOP, they're from this paper (which is actually somewhat readable as these things go):

http://graphics.berkeley.edu/papers/Goktekin-AMF-2004-08/ [graphics.berkeley.edu]

The paper and video there both have some demonstrations of different parameter values.
User Avatar
Member
373 posts
Joined: 3月 2009
Offline
Yeah, found that link after Jeff mentioned the paper earlier. Good stuff, but still a bit over my head. I understand what I'm reading, just not the formulas themselves. Thanks again for all your work on the flip solver.
Ian Farnsworth
  • Quick Links