CS 348C Position Based Fluids in Houdini

Professor: Doug James
Due date: Wed, Feb 26, 2020



In this assignment, you will implement a simple particle-based fluid simulator related to smoothed particle hydrodynamics (SPH).  Specifically you will implement the "Position Based Fluids" (PBF) approach described in [Macklin and Muller 2013]. Although it doesn't achieve high accuracy, it is simple to implement and parallelizes well on the GPU. As the title suggests, this assignment will be done in Houdini, which should make your task a lot easier since you can use it to find particle neighbors, surface the fluid, render, etc., thereby allowing you to spend more time on the algorithm while getting visually nice results.

Groups: Work on your own, or in a group of at most two people. Additional work is expected from a group submission, such as a more elaborate creative artifact or modeled phenomena. PhD students are encouraged to work alone, and pursue a more challenging creative artifact. 

Starter Code:  There is no starter code for this Houdini assignment, however you may use the earlier "particles in a box" example for inspiration. You have a lot of flexibility in how to implement things, e.g., use VEX, or python, or even a C++ plug-in if you want (although it's more work). (In case it needs to be said, you should not use any Houdini fluid simulation assets to implement this assignment. )


Assignment Steps:
Tuning parameters can be a real pain in physics-based animation, and this simulation model, which has many parameters to adjust, is no different. Fortunately you can use Houdini to expose parameters in the top level node to allow you to interactively adjust values. There are many sets of parameters that will produce decent results (but also many bad ones) since the parameters in this paper are coupled, e.g., since the paper uses m=1 for all particles, changing the particle size/resolution will affect the density. A student from a previous class asked Miles Macklin about suggestions for parameters, and here was his feedback:
"Here are the parameters I would recommend for a traditional dam-break style scenario, similar to the ones in the paper:
Particle mass: 1.0kg
Kernel radius (h): 0.1m
Rest density (rho): 6378.0kg/m^3
Density Iterations: 4
Time step (dt): 0.0083s (2 substeps of a 60hz frame time)
CFM Parameter (epsilon): 600
Artificial Pressure Strength (s_corr): 0.0001
Artificial Pressure Radius (delta q): 0.03m
Artificial Pressure Power (n): 4
Artificial Viscosity (c): <= 0.01"
Tips: It's worth pointing out that the particle mass, radius and fluid density are all coupled, so if you use a finer sampling of particles, you will want to adjust these parameters. To make your examples, I suggest fixing the fluid density, then adjusting the particle mass and radius depending on the resolution you use. You may also need to add a slight fudge factor depending on how closely particles pack together in the fluid volume. Other students received good results with very different parameters depending on resolution, and you can also adjust the Artificial Pressure values and still achieve good effects. In practice, try introducing things one at a time to test parts separately.

After you get the basic simulator working, here are some things to help you make an interesting animation:
Hand-in using Canvas:  
Start early. Ask questions. Have fun!!! 

On collaboration and academic integrity: You are allowed to collaborate on the assignments to the extent of formulating ideas as a group, and derivation of physical equations. However, you must conduct your programming and write up completely on your own (or with your partner), and understand what you are writing. Please also list the names of everyone that you discussed the assignment with.  (You are expected to maintain the utmost level of academic integrity in the course.)

References: