highly viscous flip fluids "sticky" by default?

   34064   20   8
User Avatar
Member
57 posts
Joined: 2月 2014
Offline
when i crank up the viscosity in a fliptank sim until i get some thick mud, dough type effects, the fluid sticks to geometry. firstly i have a fliptank in which the fluids stick to the sides unless i make them open, and also ( its a car in mud) the fluid sticks to the rotating wheel and wraps around it.. how on earth to avoid this effect?

i want some stickiness, but it needs to be controllable, and i dont want my wheels to become glutinous blobs the moment they rotate!

note: i dont have any sticking effects enabled, pretty default flip setup, but with viscosities ranging from 10,000 to 30,000 in testing.

thanks in advance for any help.
User Avatar
Member
57 posts
Joined: 2月 2014
Offline
ok just to spur conversation, im attaching the simplest example i can. a standard fliptank, with high viscosity and the lower particles deleted.

if you playback you can clearly see the fluid is sticking to the sides of the fliptank. im assuming this is the same effect that is causing my rigid bodies to become wrapped in glue when they encounter viscous fluids.

surely this is not the correct default behaviour?

of course caveat this with the fact im only on week 2 of my houdini adventure.

Attachments:
viscous sticky.hipnc (1.4 MB)

User Avatar
Member
57 posts
Joined: 2月 2014
Offline
im not sure if im asking a silly question, or if nobody knows the answer, but this has really stopped me dead at the moment. i want a mud that can be pushed around but not stick to geometry unless i specify.

a good example is a tyre rolling in mud and leaving a tyre print. obviously if it was simply that i needed there would be other ways to do it, but thats the basic idea.

i wasnt sure if it was maybe friction rather than stickyness causing this, but even with dynamic and static friction at 0 on the fluid, i still get the same result.

i remembered the dough cutter example. which doesnt appear to have the same stickyness issue, but that wasnt done with the flip solver so not much help here.

are there any other places i could ask to get an answer to this?
User Avatar
スタッフ
823 posts
Joined: 7月 2006
Offline
robinlawrie
im not sure if im asking a silly question, or if nobody knows the answer, but this has really stopped me dead at the moment. i want a mud that can be pushed around but not stick to geometry unless i specify.

Definitely not a silly question. The viscosity solver currently only supports a “no slip” condition when considering collision velocities, which essentially means the “stickiness” between collisions and fluid is the same as internally to the fluid. Improving the viscosity solver to support a varying amount of stickiness is a good RFE; I'll add it to the bug db.

In the meantime you can cheat a bit by manipulating the collision velocity field before it goes into the viscosity and pressure solves. Essentially you want to mix the fluid velocity that is tangent to the collisions back into the collision velocity field. So when the viscosity solver looks up the collision velocity it will actually use the fluid's velocity in the tangent direction. The pressure solver ignores tangential velocities anyway (enforcing only a non-penetration constraint), so as long as we modify only the tangential velocities we should be OK using that modified collision velocity for both solves.

Fortunately there's a DOP asset that will do this for you: the Gas Stick on Collision DOP, which ironically we can use in reverse to achieve a non-stickiness by reversing the fields it operates on. In this case it mixes “vel” (fluid) into “collisionvel” (collisions).

This won't work at the fluid boundaries since those are handled differently inside the viscosity solver. If you want slippery walls you'll need to create actual collision geometry for them.

And I'm sure there are cases where this won't work that I'm overlooking, but it's worth a try for your setup. See attached .hip and .mp4. The first pass through the flipbook shows with the velocity modification active; the streamers show modified velocities. The second pass through just shows the default behavior.

Edit: I should add, the Stick on Collision DOP supports scaling its effect via an external field, so you should be able to control the location of the effect. Also it's just an asset with a GasFieldVOP inside, if you want to look at how it works.

Attachments:
viscous_slip.mp4 (1.2 MB)
viscous_slip.hipnc (1.4 MB)

User Avatar
Member
57 posts
Joined: 2月 2014
Offline
amazing. ive not had a chance to look at the stuff yet, but that reply sounds quite authoritative. thank you!
User Avatar
Member
4189 posts
Joined: 6月 2012
Offline
robinlawrie
that reply sounds quite authoritative.

Should be - johner writes this bit of the software I believe
User Avatar
Member
57 posts
Joined: 2月 2014
Offline
haha ops:

well extra thanks then, as a developer who provides support, even to people with the free software is a wonderful thing. ill add you to my list alongside chaosgroup.

i think sidefx's strategy with the apprentice thing, in combination with a real useful forum, is spot on.
User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
There is a Control Field input that you can use to supply a volume mask attached to your simulation object to control this behaviour. It defaults to a name of “stick” or in other words, if you have a volume called “stick” attached to your simulation object, then it will be used as a mask.

This mask is variable so that it can be any value to control the stickiness on the surfaces.

See the fully commented example file attached to this post to see how to construct the SOP volumes, how to use the Stick on Collision Control Field parameter with the default of “stick”, and how to actually add a field called “stick” to your simulation object and then populate it with any volume data you want. I used the Source Volume DOPs to add the stick fields copied in from SOPs.

It's wide open as to how you want to approach this. Some ideas would be to modulate the density Volume you feed in to the sticky fields by the velocity of the turning wheels or to accumulate the stick across time by adding a second field to hold on to the previous frame's stick field and add that in on the current frame, etc.

Using the above methods, you can override any field in the FLIP sim including the “stickvel” vector field to even boost or cut this.

—-

Note that the entire sticky logic works by grabbing the collision field in the simulation and expanding it out a bit. Then use this field to “capture” the FLIP particles and then modify their velocity using the stickvel vector field. Nothing special happening here. No geometry/polys are used at all in the Solver. All volumes.

The Stick Scale parameter multiplies the stickvel field.

Max Distance is actually the amount that the collision field is expanded to “trap” those particles.

Stick Bias is a bias factor blending in/out the vel.

Normal Scale and Tangent scale determine the amount of vel perpendicular to the surface and tangental to the surface that is applied to the particles.


Yes if you dive in to the FLIP Fluid object, you can gain control over all of these parameters if you want to but no need at all in this case. Only if you want extreme control and it is all just DOP Micro-Solvers. Any other simulation engine you'd be knee deep in C++ by now.

For now the attached example should get you what you want: how to control the stickiness within the FLIP Simulation.

Hope this helps.

Attachments:
FLIP_collision_stick_masking.jpg (129.1 KB)
FLIP_collision_stick_masking.hip (2.9 MB)

There's at least one school like the old school!
User Avatar
Member
57 posts
Joined: 2月 2014
Offline
wow.. thanks a million. yes i appreciate houdinis power in this regard, it feels almost limitless compared to 3dsmax.. having said that methinks its a touch more involved to learn

cant wait to test this stuff out tomorrow.
User Avatar
Member
57 posts
Joined: 2月 2014
Offline
one quick question.. using Johner's method, the mud wont stick to the tyre and wrap around it.. however does this mean i will lose the effect of mud being thrown out backwards by the wheel if it spins?

im not familiar enough with fluid dynamics to know if this “sticky” effect is the same one that causes mud to be flung out behind a spinning wheel.

if so i guess using an intermediate stickyness level could give me control over that.



possibly what Jeff was getting at with his suggestion to control stickyness by wheel rotation velocity.
User Avatar
スタッフ
823 posts
Joined: 7月 2006
Offline
robinlawrie
one quick question.. using Johner's method, the mud wont stick to the tyre and wrap around it.. however does this mean i will lose the effect of mud being thrown out backwards by the wheel if it spins?

possibly what Jeff was getting at with his suggestion to control stickyness by wheel rotation velocity.

For coarse control you can just turn down the Scale parameter on the Gas Stick on Collision in the setup I attached. That will just use more of the original collision velocity and add partial stickiness back into the sim.

For higher grain control, yes you might try one of Jeff's excellent suggestions.
User Avatar
Member
57 posts
Joined: 2月 2014
Offline
unfortunately real work has intruded. in the meantime, if anyone fancies explaining the difference between friction and stickyness in this situation?

if stickyness causes the particles near the rigid body surface to assume the surface velocity.. what does friction do? does it only relate to interparticle behaviour?

in this case the rigid body object friction settings will not affect the fluid behaviour..?
User Avatar
Member
57 posts
Joined: 2月 2014
Offline
so i finally had a chance to sit down with this.. Johners method works very well and seems to be just what im looking for.. ill test it out with a more suitable scene for my needs next.

id note that the method for controlling stickyness provided by Jeff (using “stick on collision” ) does not work with even slightly viscous fluids. i get the same stickyness on both the left and right test objects, even if i only increase the viscosity to 0.1 . i guess that is what Johner meant when he said “The viscosity solver currently only supports a ”no slip“ condition when considering collision velocities”
User Avatar
Member
15 posts
Joined: 7月 2013
Offline
Hey guys,

sorry for intruding on this post but I found it very useful. I'm trying to create an effect in which a creature gets thrown some liquid that sticks on him and he's supposed to get rid of it based on his velocity.

I've been playing with both setups (Johner and Jeff's) and I've been getting some decent results with Johner's setup but I need a bit more control.

I attached a video of what I got so far with his setup.
In the example I'm keyframing the flip viscosity and the scale on the “gas stick on collision” but I kinda need the flip to be stuck on the geo and coming off based on the geo vel.

Any help is tremendously appreciate it!
Thanks in advance

Attachments:
test.mov (1.3 MB)

User Avatar
Member
621 posts
Joined: 8月 2008
Offline
diego can you post the example file so we can look at the setup you are using?
the one corresponding to the mov file.
User Avatar
Member
2 posts
Joined: 10月 2012
Offline
Sorry to bug you guys but thanks to this post I finally solved a lot of issues!
I'm using the Johner's setup that seems working very well but I was looking for a way to add the velocity field just on a couple of objects in my scene.

Johner said:
Edit: I should add, the Stick on Collision DOP supports scaling its effect via an external field, so you should be able to control the location of the effect.
But I'm kinda lost with Gas DOPs/VOPs
Any help would be very appreciated!
Thanks in advance.
User Avatar
Member
2 posts
Joined: 10月 2012
Offline
Anyone? :cry:
User Avatar
Member
13 posts
Joined: 8月 2012
Offline
I know I'm a little late in the discussion but I have an example scene (had to zip it up because it was too big)
But I feel like I'm on the right track, just missing something but can't put my finger on it.
The aim is to be able to use this with viscous fluids, ie, honey, as I have a modeled dipper I want to have the honey rolling off of. I'm trying to get some massive stickiness into it. Do I need to map this to the stickvelocity rather than collisionvel?
Any improvements to this?

Attachments:
visc_test.rar (136.7 KB)

—–Neil
www.kirbyfx.com
vimeo.com/kirbyfx
youtube.com/frescalus
User Avatar
Member
13 posts
Joined: 8月 2012
Offline
So I updated the file and created this video:

https://vimeo.com/100476877 [vimeo.com]

the right has Jeff's setup included, the left does not.

Thoughts?

Attachments:
visc_test2.rar (114.5 KB)

—–Neil
www.kirbyfx.com
vimeo.com/kirbyfx
youtube.com/frescalus
User Avatar
Member
84 posts
Joined: 7月 2013
Offline
@Jeff: big thanks for your great explanation and hip file notes. its not that intuitive, but it shows the power of houdini…amazing.

where is the tangential and normal field are calculated and what is the best to influence it?

…first idea is to compute the gradient field (normal field) of collision geo and do this double crossproduct thing to get the tangential field. then i woudl blending both for create a stickvel?
thx in advance.
  • Quick Links