CITY FLOOD BREAKDOWN
FLIP and RBD
The FLIP setup is not too complicated with two sources on both sides obscured by the buildings The more interesting aspect is the RBD interaction. It took quite a while to figure out since there's not much documentation on this subject.
So the gist of it is the static colliders are sourced using the static object DOP node and for volume collisions use a proxy volume SDF while for the bullet collisions, use concave geo representation. Also turn up feedback scale to 1 in the FLIP Solver.
Vorticity calculated in the FLIP simulation
Curvature calculated from FLIP SDF Post Sim
Through the Whitewater Source node, there are four ways of sourcing whitewater; acceleration, vorticity, curvature and additional inputs. The acceleration method may be the easiest to grasp because it's usually apparent when the particles are moving faster or accelerating. The less obvious methods are vorticity and curvature. By visualizing the attributes and understanding how the node processes these values, we can get a better sense of what values we need to input for the whitewater source node. In this case, the acceleration method was not used because it didn't look very appealing. Particles moving fast leave behind unwanted trails and makes it seem less realistic.
Additional inputs were added as well to the leading edges of the fluid. It seemed a bit too thin by just using the curvature values calculated by the node, so by rebuilding how the curvature was calculated, I was able to exaggerate the curvature values where I wanted it to be and use that as additional inputs.
After getting the right amount of whitewater source. The whitewater sim is fairly straightforward as well. However to give a more interesting look, the erosion, repellants and clumping values were tweaked add variety.
The wetmaps are generated by transferring a wetness attribute from the FLIP sim and the Whitewater to the colliding objects. The wetness would be subtracted over time.
However, to get that to work, points were scattered across the whole collider geometry and those points would have the UV attributes on them as well so that this wetness attribute can be remapped into the correct UV space. This is then rendered out as a black and white image sequence to be assigned as a mask for the objects' materials.
This is the reference video for the flood project.
The whole clip can be found here: