Driving FLIP Fluids with Velocity


This was my main project during my internship at Side Effects Software in Toronto.  I was given the goal of using the characters velocity to drive the FLIP simulation, so that when the chartacter was more animated, she would birth more particles specifically from the parts of her that were moving.  I hadn't really worked too much with FLIPs before but fortunately Houdini has a lot of nice built in nodes that make this a relatively easy effect.

The main effect I wanted to achieve was to have the amount of water emitted be directly related to the velocity of the geometry.  We can add a Velocity attribute to the points by using a Trail SOP and changing the "Result Type" from Preserve Original to Compute Velocity.  I also changed the Velocity Approximation parameter to Central Difference, which generally gives better results than Backward Difference.  Then, I create another point attribute to store the length of the velocity and promote it up to a Primitive attribute, using Average for the Promotion Method.  This value is then used in a Scatter SOP as the "Alternate Attribute" parameter.  I also promote the Primitive attribute to a Detail attribute, this time using the Sum as the Promotion Method.  This value is then used to set the Number of Points paramter in the Scatter SOP using the expression "detail("../attribpromote2", "SumVel", 0)".  This way, as the geometry moves faster, the Scatter SOP will create more points and focus them only in the areas that are really moving.

To refine the effect, I wanted refine it so that I could scatter points only on the parts that were moving forward.  I did this using a VOP SOP and checked to see if the Dot product of the surface normal and the velocity vector is greater than 0.  If it's not, then I know that the point is not moving in the same direction as the normal.  




Download Example Scene

zephmann@gmail.com