week 8&9 - Splat liquid simulation
/// Goal ///
Here, I’d like to try a different simulation method—using the FLIP solver for fluid simulation. Since the Gaussian Splat is a particle cloud, it’s perfectly fine to use Houdini to simulate it as a fluid. The main question is — how will the final fluid move and the rendering result turn out?
/// Splat Fluid Simulation ///
Before proceeding with the simulation, the source points must be prepared. Since the process ultimately involves moving all points from their starting points to their corresponding splat points (using the index as a reference), the number of source points must be greater than or equal to the number of splat points to ensure that each point has both a starting position and an ending position.
Create density mask. To make the particles in the upper layers move faster, set the density of the particles in the lower layers higher - this makes them less affected by gravity(it’s 9.8 now) and causes them to move more slowly(Don't forget to enable the “density”,as well as “viscosity” and “surface tension” tabs in Flip Solver). Also, add some noise to create more complexity.
Also velocity field is required for better effect. The Flip Solver cannot import moving particles; it only generates particles at their initial positions. Therefore, only the velocity field can drive the particles to move in the desired direction.
I spent a week here figuring out how to drive the liquid to the correct position. The conclusion first — I didn’t find a way to precisely move every particle to its final destination in the DOP. If position isn’t a concern, you can use the suction method or SOP Solver to make the liquid adhere to the model’s surface. However, to make the appearance resemble a liquid, I decided to use a method that involves simulating the motion first and then transferring the position attributes.
My approach here differs slightly from standard fluid simulation. I first ran the fluid simulation, then used the fluid suction tool from the toolset. I used two Flip Solvers because the suction force uses force to drive the surface tension field, and the velocity field imported from the Volume Source would override the velocity, causing the suction force to fail. Therefore, splitting it into two solvers allows it to apply the velocity field first, followed by the suction.
/// Splat Fluid Particle Movement Completion ///
First, create a mask to modulate position. Then, extend this mask to serve as the mask for color.
Just like the tree growth simulation earlier, use Attribute Adjust Vector to convert P to oldP to shift the point's position.
Could also make a slight adjustment to P before Attribute Copy.
For “color,” the texture can actually be applied to the Gaussian-splat model. And here is the final result.
/// Add Motion Blur ///
I discovered an interesting method for adding motion blur to Gaussian Splatting. This method is based on particle velocity and does not require post-processing camera effects. The code is as follows.
/// Next Plan ///
1. Finish shot 1~2