Jump to content
Sign in to follow this  
jackassol

dynamic goal position for flips - how?

Recommended Posts

Hej guys - I am looking for a way, to add a goal position for flips after a specific time.

 

What I basically want:

the fluid is "falling down" ......after 50 frames.....flow back to the initial state ( but dynamically -  each point exactly to its original/initial start position)

 

I know this is well possible with grains via these attributes:  

targetP , targetweight ,targetstiffness

 

With "popsteer" and "popattract"  i could not got is work, because the particles never really stopped moving smoothly.

 

I attached the file:scene.hiplcscene.hiplc

 

 

 

Some an idea?

 

Best jack.

 

 

 

 

Share this post


Link to post
Share on other sites

Here's one approach. I store initial position with one pop wrangle (if I were setting up from scratch, I'd do this outside DOPs), then switch on another pop wrangle at an arbitrary frame. In the second wrangle, I just add a force to each particle in the direction towards its initial position. To keep them from moving forever, I just test against distance and if it's 'close enough,' move it to the initial position and set 'stopped' to 1 so it stops simulating.

Note, it's not perfect because some particles get blocked from their original position by the already settled particles. You could potentially sort this by directly pushing position, maybe after an additional delay. But hopefully this gets you started. An additional, critical detail is to turn off reseeding! Particles generated mid-sim to fill in density gaps aren't going to have well defined initial positions, not to mention even initially-existing particles may be culled.

 

flipreset.hiplc

Edited by diffuse.gray
Updated to replace mass=0 with stopped=1
  • Like 1

Share this post


Link to post
Share on other sites

Another quick tweak - after a secondary delay, you can set the particles to 'ballistic' (after turning on Force Override on the particle motion tab of the solver), so that they'll no longer collide with each other. That seems to get the final few stragglers back into position relatively smoothly.

lwoQTT5DO3.thumb.gif.e47c35b0d7ab69bd4e510a1fe57e3e30.gif

flipreset_ballistictoggle.hiplc

  • 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
Sign in to follow this  

×