Elastic effect on flip fluids on H12
96456 31 8- mzigaib
- Member
- 968 posts
- Joined: 4月 2008
- Offline
- jason_iversen
- 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.
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]
also, http://www.odforce.net [www.odforce.net]
- mzigaib
- Member
- 968 posts
- Joined: 4月 2008
- Offline
- Solitude
- Member
- 373 posts
- Joined: 3月 2009
- Offline
- jlait
- スタッフ
- 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.
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.
- josh3light
- Member
- 120 posts
- Joined: 2月 2008
- Offline
- mzigaib
- Member
- 968 posts
- Joined: 4月 2008
- Offline
- Solitude
- Member
- 373 posts
- Joined: 3月 2009
- Offline
- mzigaib
- Member
- 968 posts
- Joined: 4月 2008
- Offline
- Alejandro Echeverry
- Member
- 691 posts
- Joined: 6月 2006
- Offline
Work's like a charm!!!
Thank you.
Thank you.
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
- Solitude
- Member
- 373 posts
- Joined: 3月 2009
- Offline
- asnowcappedromance
- Member
- 512 posts
- Joined: 7月 2009
- Offline
- jlait
- スタッフ
- 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.
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.
- Solitude
- Member
- 373 posts
- Joined: 3月 2009
- Offline
- johner
- スタッフ
- 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).
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
- Alejandro Echeverry
- Member
- 691 posts
- Joined: 6月 2006
- Offline
:shock: Thanks Johner!!!
You are a DOP Master!!!
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]
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
- Solitude
- Member
- 373 posts
- Joined: 3月 2009
- Offline
- mzigaib
- Member
- 968 posts
- Joined: 4月 2008
- Offline
- johner
- スタッフ
- 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.
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.
- Solitude
- Member
- 373 posts
- Joined: 3月 2009
- Offline
-
- Quick Links