Fluid Particles engine patch at last!

Hi all 🙂

Here’s at last the first public patch of the Particle Fluids engine , this means that this still doesn’t have particle surfacing included because it’s still a work in progress but the engine is pretty useful in its current state and particles can be rendered via splatting or using point density for more advanced volumetric particle effects (remember my pouring moss tests?) and finally you could use instanced particles to whatever you want , including metaballs, though those are not replacement for the upcoming particle mesh surface 😉

I just sent the patch to Jahka for his expert review and commit, and once integrated in its final GUI form Stephen and me could start writing down documentation of the many features it have.  I have included also two quick .blend test files to figure out of the settings

I love Open Source , I love blender and I fall in love with the Blender community 🙂 and since I have received a lot of help from you as Blendiac and WhifeOfBlendiac and ChildOfBlendiac will visit me soon what better present to give back to the community?


TEST BLENDS:  http://www.pasteall.org/blend/1959    and  http://www.pasteall.org/blend/1960

The main actors of this achievement are Stephen, Jahka and your servant: Farsthary

I will enjoy this part: Feedback

Cheers to all and THANKS!

PS: in the future the engine may change a bit because I’m researching ways to speed up simulations by data structures other than the kdtree currently used 😉

Fluid Particles engine patch at last!

33 thoughts on “Fluid Particles engine patch at last!

  1. thanks again. you’re work and research is always fun to watch and I hope all these things make it into blender in one way or another.
    having domain independent particle fluids in blender would be great and an awesome tool. i mean, you know that – you’re developing it 😉


  2. Agus says:

    Lets all cross the fingers for Jahka to commit it soon, after this you should ask for commit rights to SVN, you Raul alreay make severals contributions.

    A really smart person and committed to the community. Thank you so much Raul!!!


  3. farsthary says:

    oops! sorry, struct TRIANGLE was in the isosurface files but you simply could ignore or define a provisional one because is is not used in the engine

    triangle have only 3 points for now ….


  4. cc says:

    I changed the line
    + glVertex3f(pdd->tris[i].p[j].x, pdd->tris[i].p[j].y, pdd->tris[i].p[j].z);
    +// glVertex3f(pdd->tris[i].p[j].x, pdd->tris[i].p[j].y, pdd->tris[i].p[j].z);
    and tried again, now works.


  5. spacetug says:

    ah, bug already…

    if you try to add a particle system to anything but the default cube, it crashes.
    windows xp 32 bit, using the build provided by “cc”.


  6. Thanks for the feedback to all!

    @CC: thanks a lot for the corrections and the build 🙂
    @spacebug: I thougth that bug was external to particle fluids, I have to try it with a clean version, thanks to point it out 🙂

    Cheers to all


  7. Linny says:

    here is a patch with CC’s correction which builds fine with rev 27120 under linux (and hopefully OSX) with scons.


    btw. i can confirm the crash if you add a particle systems to other objects than a cube.

    this already looks like a great addition to blenders toolbox 🙂
    You are amazing farsthary.


  8. Linny says:

    you are right. the shape of the cube can be modified. i can add extrude faces or anything else without a crash.
    btw. something small i noticed: if you turn ob the buoyancy the slider reacts much too fast. moving the mouse just a tiny bit increases the value about a couple of thousand units.

    @Jacob Moore:
    sorry i thought it should work because of the similarity between osx and linux.


  9. Linny says:

    blender even crashes with the original 25832 revision
    here is what gdb tells me:

    Program received signal SIGSEGV, Segmentation fault.
    initialize_particle (sim=0xbfffea4c, pa=0xaf312028, p=0) at source/blender/blenkernel/intern/particle_system.c:1554
    1554 pa->state.fluid.col[0]=ma->r;

    and this is the backtrace:

    #0 initialize_particle (sim=0xbfffea4c, pa=0xaf312028, p=0) at source/blender/blenkernel/intern/particle_system.c:1554
    #1 0x0868efc4 in initialize_all_particles (sim=) at source/blender/blenkernel/intern/particle_system.c:1616
    #2 system_step (sim=) at source/blender/blenkernel/intern/particle_system.c:4001
    #3 0x08690316 in particle_system_update (scene=0x93d68f0, ob=0x9a0ef88, psys=0x9a089c0)
    at source/blender/blenkernel/intern/particle_system.c:4187
    #4 0x086fa4bf in particleSystemModifier_deformVerts (md=0x9a034c8, ob=0x9a0ef88, derivedData=0x0, vertexCos=0x99cff68, numVerts=4,
    useRenderParams=0, isFinalCalc=1) at source/blender/blenkernel/intern/modifier.c:6973
    #5 0x0866ae06 in mesh_calc_modifiers (scene=0x93d68f0, ob=0x9a0ef88, inputVertexCos=0x0, deform_r=0x9a0f338, final_r=0x9a0f33c,
    useRenderParams=0, useDeform=1, needMapping=0, dataMask=, index=-1)
    at source/blender/blenkernel/intern/DerivedMesh.c:1805
    #6 0x0866b925 in mesh_build_data (scene=0x93d68f0, ob=0x9a0ef88, dataMask=25) at source/blender/blenkernel/intern/DerivedMesh.c:2252
    #7 0x0864c84e in object_handle_update (scene=0x93d68f0, ob=0x9a0ef88) at source/blender/blenkernel/intern/object.c:2442
    #8 0x086ad857 in scene_update_tagged (scene=0x93d68f0) at source/blender/blenkernel/intern/scene.c:875
    #9 0x082ab559 in wm_event_do_notifiers (C=0x9244f68) at source/blender/windowmanager/intern/wm_event_system.c:266
    #10 0x082a4db8 in WM_main (C=0x9244f68) at source/blender/windowmanager/intern/wm.c:328
    #11 0x0829bf41 in main (argc=1, argv=0xbfffeef4) at source/creator/creator.c:911


  10. farsthary says:


    Yes, it was a crash due to a bad particle initialization, I will upload the corrected patch in my next post and also will edit this one.

    Thanks for the feedback 😉


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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.