Subframe simulations patch

Hi all 🙂

Stability is one of the most desired feature of a simulation and in particle systems is a must have. The fluid particles exhibit random explosions (which I think could be reduced because in older SVN revisions that does not happen) and in general the particle systems have a leaking trough wall containers behavior when the container rotates. (think of the typical wine glass falling example 🙂 )
As a suggestion from Jahka and several members of the community I have implemented particle subframe simulations not just for particle fluids but for the whole particle system.
http://www.pasteall.org/12304/diff


Subframe simulations greatly increase the stability of the simulation to any desired level, it basically perform a user defined number of pre-simulations in between frames, allowing finer grain sims, and a nice side effect of it is that now particle-surface collisions could be properly captured so there’s no leaking effect when containers rotates.

Subframe simulations do increase the calculation time proportionally to the number of sub-steps, so the user has to made a trade-off between stability and simulation time. But the good news is that there’s now a lot of methods to reach stability in the particle systems so a combination of them will help to get very low substeps (even none) to get stable simulations and very fast proper particle collision detection.

Here are some examples:

2 subframes (you don’t even want to see no subframes 😉 )

4 subframes

6 subframes

Fluid in rotating container, with no subframe

Fluid in rotating container, with 5 subframes

Newtonian particles with a rotating container and no subframe

Newtonian particles with a rotating container and 4 subframes

Advertisements
Subframe simulations patch

24 thoughts on “Subframe simulations patch

  1. Hoverkraft says:

    Thanks so much. This is definitely an immense benefit to the whole dynamics toolset. I still hope you can take another look a the older implementations… I’ve watched your older videos and the sim seemed much more stable then. I am using the same settings you did and the particles are all over the place.

    Nonetheless, thanks again!

    Like

  2. David says:

    Thanks Farsthary! Great new feature and cool vids!
    BTW removing this line
    3052 col.t = dt;
    form file:
    C:\Build32\blender\source\blender\blenkernel\intern\particle_system.c
    seems to stop the random explosions!
    Hope this helps you find the cause of the explosion problem. 🙂
    Although I did have some pretty neat popping simulations. 😉

    Like

  3. absolutely awesome…this will propably solve a lot of issues I had with particles like using them on a plane with wave, and displacemodifier. they just fell through the plane whenever the plane started moving now it’s possible to do floating effects and much more. And having subsamples is just awesome. The wine glass should work now too – but I will wait to try until the surface generation is there 😉

    Like

  4. Tansunn says:

    I feel like I’m missing something in the rotating container sims… What’s up with the particles riding up the back part of the container and spilling from the top? Shouldn’t they stay pooled at the bottom?

    Like

  5. Hi there, just became alert tto your blog through Google,
    and found that it’s really informative. I’m goiung to watch out for brussels.
    I’ll be grateful if you continue this in future.
    A lot of people will be benefited from your writing.
    Cheers!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s