Jump to content
Waasha

High FPS flip fluid and RBD sim

Recommended Posts

Hi, I would like to ask about a general approach to simulate flip fluid, colliding with a RBD in high FPS.

What I need is the simulation to behave the same as when simulated in realtime, just x times slower.

I thought it's generally done with the Scale Time parameter - So I set it to 0,4 (just for a first time test, for a final i will need something between 0,1 - 0,2, which is between 100fps to 200fps), but the fluid is acting very differently than with the Timescale set to 1. I have a simple test, where a RBD ball falls to a thin pool of water and generates a splash when it jumpes off. With the Scale Time = 1 the water splashes and falls not too far from the ball. With the Scale Time = 0.4 the water splashes and goes far away, hitting the walls of the fluid box, which is a VERY different behavior.

Correct me if I'm wrong, but I'm guessing it's behaving like this, because the forces are applied on every "frame", so when i have more frames, where the splash is happening, the water goes to greater distance..

So I set Scale Time back to 1, and tried changing the FPS of the scene to 100, but that had a totally opposite effect.. The water almost didn't splash at all - no royal crown effect at the beginning, just a few dull drips off the ball as it bounced away from the water...

So I tried editing the Time Step expression:

from ch("timescale")/(ch("substep")*$FPS)

to ch("timescale")/(ch("substep")*$FPS*0.25)

I multiplied FPS in the expression by 0.25 to have the same value of Time Step as when I had scene FPS set to 25 and it produces a weird choopy artefacty behavior of the fluid, but every fourth frame (frame 1, 5, 9 and so on...) it looks ok and the fluid on these "keyframes" behaves the same as with FPS set to 25! So that's a wanted behavior...apart from those weird mistakes..

Does anyone know why this weird choppy behavior is happening? And how to get rid of it?

I also found, that the bullet solver doesn't work correctly with the Scale Time < 1, so I had to change the solver to the Houdini original RBD solver. (BIG thanks to Igor Zanic, who suggested it to me.)

Also - Can anyone please point me in the right direction, of how the slowmo simulation is generally done correctly?

Thanks for any advice, and sorry for any mistakes, english is not my natural language.

Edited by Waasha

Share this post


Link to post
Share on other sites

Just add an id attribute to the particles (option on the FLIP solver) sim in 'real' time, cache out to bgeo's. In SOP's load in the files, at a 'time blend' SOP and then a timewarp. The time warp allows you to set the input timerange and what you want to map it to. Easy as it can be :-)

Houdini has the ability to interpolate between frames based on id's, using the timeblend. Plain awesome :-)

Edited by Nerox
  • Like 2

Share this post


Link to post
Share on other sites

Thanks for such a quick reply, Nerox!

I read about the timeblend, but i think this approach will not work, because I need a really BIG slowdown (200 FPS). I don't think Houdini will be able to compute particle positions precisely.. It will go straight (linear interpolation) from one position to another, instead of a "curvy" path... Or am I wrong?

Thank you for your time and advice!

Share this post


Link to post
Share on other sites

I just tried it and it works like a charm! Houdini really is GENIUS :)

Nerox, thanks a milion times!

I Ttimewarped 200 frames to 800 (100 FPS) and it really works..

The splash of the water starts 1 frame before the actual collision occurs, but that's due to the interpolation I guess..

I will read your article now..

Thanks for your help!

Share this post


Link to post
Share on other sites

Thanks Nerox... Good Information...

 

Any help on Time warping Pyro simulations...

Edited by sankarakumar

Share this post


Link to post
Share on other sites

Thanks Nerox... Good Information...

 

Any help on Time warping Pyro simulations...

It's the same. However, using resizing could be troublesome. Keep your container at a fixed size and it works fine.

  • Like 1

Share this post


Link to post
Share on other sites

you can use resize with out any trouble.
just read in the frame on which the pyro sim is the biggest, bound it and create a volume with the same devision size as your sim.
Volume merge your sim into the new volume.
Now the whole thing should look like you simulated it with out resize, but you still get the time save that resizing gives you.
Just do the time blending on this new volume.

  • Like 2

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

×