[Bf-committers] From Farsthary moving colliders patch

Raul Fernandez Hernandez raulf at info.upr.edu.cu
Thu Apr 8 14:41:48 CEST 2010


Hi Janne :)

  Starting the documentation I have exhaustive tried the commit and have
found several issues, hopefully I have the solution for two or the three
problems I have found.

   First the moving fluid emitter:
    when you play a fluid sim and start moving emitter particle fluids
inherit the moving emitter speed which is not a desired feature. I was
suspecting it was due to some relative velocity therm and I was rigth
, here's the patch (is fairly simple, just a line of code):

//-------------------------------------

Index: source/blender/blenkernel/intern/particle_system.c
===================================================================
--- source/blender/blenkernel/intern/particle_system.c	(revision 28047)
+++ source/blender/blenkernel/intern/particle_system.c	(working copy)
@@ -2308,8 +2308,7 @@
 	VECCOPY(start, pa->prev_state.co);
 	VECCOPY(end, pa->state.co);

-	sub_v3_v3v3(v, end, start);
-	mul_v3_fl(v, 1.f/dtime);
+	VECCOPY(v, pa->state.vel);

 	neighbours = BLI_kdtree_range_search(tree, radius, start, NULL, &ptn);


//-------------------------------------

While the previous approach aparently is more stable, when the user move
the emitter, the difference between end and start position, quickly jump
and is no longer a measure of the particle initial velocity. Moreover,
that older approach ignore completely the particle speed Damp factor, you
could change it and nothing happens, that is the second issue that is now
solved with the new approach.

And the more anoying issue is regarding the random particle explosions
that happen with colliders. Tracking down the issues I have found that it
has nothing to do with the SPH because it worked perfectly with older
revisions, and seems to be due to recent changes that have being commited
to the particle mesh colliders code ... what where those changes?
  That is a special problematic issue because it is prevempting from
propper collissions and fill containers because everything explodes.




More information about the Bf-committers mailing list