# Sticky FLIP on moving Object

## Recommended Posts

HI everyone!

It's my first time here, I hope I'm doing it the right way.

I'm practicing in a shot where I have a couple of cherries falling by gravity and hitting each other, releasing some droplets.

In order to have the droplets following the surfaces I'm using Stick on Collision in the flip solver collision tab.

Unfortunatelly, no matter how much I increase the values in the stick microsolver, the fluid start moving fine but after a few frames It starts getting off the surface.

Is there a way to consistently transfer these velocities from the geometry to FLIP?

The movie bellow shows what I've got so far.

Thanks everyone!!!

stiky_FLIP_test.mp4

##### Share on other sites

Do you try attribute transfer velocity for particles?

##### Share on other sites

In fact, I'm trying to mimic this effect:

I got your point when you say attribute transfer on POPs and for shure I would preffer to use POPs once I think the workflow is simpler, but for such kind of splashy viscous fluid... I thought It could only be done with FLIP.

Is there another method to achieve that?

Thanks again!!

##### Share on other sites

There are a couple of VEX functions you can use to help stick particles to an object, volumesample() and volumegradient(). You will have to convert your cherry geometry into a vdb to make it work. Multiplying the returned values together (and negating the volumegradient) and adding the result back onto the particle position. The code should be put in a POP wrangle and looks like this:

```@vs = volumesample(1, 0, @P);
@P += @vs * -@vg; ```
1. The "1" means to look at the POP wrangles second input, which I've set to the cherries vdb.
2. The "0" means it's looking at the first primitive of that input.
3. @P is the current position of the particle

This should work with both pops and flip.

I've attached a hip file trying to recreate that gif you linked. the above setup can be found in the DRIP_SIM section

cherries_colliding.hipnc

• 1

##### Share on other sites
On 12/13/2017 at 6:28 AM, Sean-R said:

There are a couple of VEX functions you can use to help stick particles to an object, volumesample() and volumegradient(). You will have to convert your cherry geometry into a vdb to make it work. Multiplying the returned values together (and negating the volumegradient) and adding the result back onto the particle position. The code should be put in a POP wrangle and looks like this:

```
@vs = volumesample(1, 0, @P);
@P += @vs * -@vg; ```
1. The "1" means to look at the POP wrangles second input, which I've set to the cherries vdb.
2. The "0" means it's looking at the first primitive of that input.
3. @P is the current position of the particle

This should work with both pops and flip.

I've attached a hip file trying to recreate that gif you linked. the above setup can be found in the DRIP_SIM section

Thank you very much Sean-R!

I'll try this and I'll let you know about the result.

## Create an account

Register a new account

×
• Donations