How to simulate a squid shower

How to simulate a squid shower

Behind ‘Watchmen’s’ raining squids sequence

So, here’s a VFX challenge: make it rain squids. In fact, make it rain baby squids. And then make them change shape right after they’ve fallen from the sky.

This was pretty much the task set to Hybride for the first episode of HBO’s TV series, Watchmen, based of course on the DC Comics series created by Alan Moore and Dave Gibbons. Here’s how the VFX studio pulled it off.

Voronoi-fractured squids

For Hybride – led by visual effects supervisor François Lambert who worked with production VFX supervisor Erik Henry – the first step in making it rain squids was to build a squid model like any regular asset. However, as Hybride TD Mathieu Leclaire notes, the shading was even more important.

“These squids are very translucent, so we knew shading was going to be an issue. We had to build various layers of interior geometry and internal organs to texture and shade. We researched various styles inspired by things like egg whites, fish eggs, jellyfish and other aquatic animals and did a lot of R&D before we found the right recipe and to achieve the final look.”

Leclaire adds that Hybride was conscious that raytracing through translucent creatures with multiple complex internal structures could lead to very long render times. “So,” he says, “we exposed a bunch of controls to quickly activate-deactivate certain layers of shading, control the number of rays relative to motion blur intensity, and allowed artists to experiment with various de-noising solutions. This allowed enough flexibility to handle the complexity that comes with rendering multiple layers of transparency, reflection and refraction levels between the melting squids, the goo left behind from the previous squids; the windshield, as well as with the actors in their environment location.”

While shading approaches were being considered, Hybride’s FX team began experimenting with simulations. The creatures themselves would have to move in certain ways, as well as make proper collies with the ground and, in particular, a car in which the main characters were seated.

“We started experimenting with a Finite Element Method solver and Houdini’s Vellum solver to see how far we could push the simulations,” explains Leclaire. “The dynamic simulations looked great, but to achieve the level of results we were after, we couldn’t simulate more than a few squids at a time before the memory requirements exceeded the memory limits available in our machines. We kept a few simulations that we liked, but since our mandate requested that we simulate multiple hundreds of these creatures with full interactions, we needed to find another approach.

“That’s when we decided to turn towards a custom RBD solution,” continues Leclaire. “We created a lower-resolution outer shell of the squid that we voronoi fractured. We then created soft constraints between the fractured pieces and used that template to simulate hundreds of copies. This way, we could easily and efficiently simulate multiple hundreds of these RBD-squids. We simply needed to create a few custom constraint forces to ensure the squids would stick to the collision surface; bounce, roll, and slow down just the right way until we got a believable simulation. Once we were happy with the simulations, we did a simple post-process to cage deform the high-resolution render meshes using the low-res fractured simulated meshes.”

Now the squids could be efficiently simulated. However, this also created a different look-and-feel issue, in that the RBD sims meant the squids began to look stiff and rigid (remember, they needed to feel squid-like and be ‘soft and squishy’. In order to, as Leclaire describes it, “retrieve our jelly-like property back into our simulations,” Hybride then developed a custom squish-and-squash deform operator that would compress the deformed mesh towards the surface using the surface normal with volume retention. “The post-process enabled us to regain control and helped us deliver the expected results,” says Leclaire.

Squid splatter

For moments when the squids crash down onto the ground or other surfaces, Hybride established high-resolution FLIP simulations to produce gelatin-type liquids that splatter when the squids land. Again, this was a data-intensive effect, so the studio created a system that would automatically cluster squids together to create smaller zones. Details Leclaire: “We would isolate the squids interacting in that zone and send a FLIP simulation on the farm to simulate each zone independently. The set-up would then gather all the simulation caches and read them simultaneously to create a final render mesh.”

Although there was no interaction between the different zones because they were simulated independently, the overlapping nature of the results made it almost impossible to notice any lack of interaction, notes Leclaire. “Having the simulations split into sections also meant that we would just have to simulate the area in question when changes were required. In this way, we didn’t have to worry about resolution limits, which allowed us to quickly manage very complex simulations by dividing them between different machines.”

Ultimately, it was determined the extra-terrestrial squids would dissolve within 10-15 seconds after entering the atmosphere, but during the process they had to stay recognizable as long as possible. In order to do so, Hybride converted its squid meshes into a dense set of FLIP particles. “We then used various propagating noises to increase the heat in the simulations affecting density and viscosity of the FLIP simulation, allowing us to vary and control where the mesh would melt off,” states Leclaire. “Since this was a noise-based solution, that meant no two squids would melt the same way.”

It also meant that Hybride needed to find a way to properly transfer the surface shaders and UV information to the FLIP particles, in order to control the shading as the FLIP-generated mesh deformed.

“To ensure the textures didn’t start to stretch as the squids were melting and dissolving,” outlines Leclaire, “we used a combination of transferring certain texture information into particle attributes, while certain shaders used distance information relative to the particles original neighbors to fade out the use of certain parts of our textures.”

Squids, lots of squids

Several shots in the sequence are wider views of the squids raining down. For these, Hybride turned to instancing techniques, as Leclaire explains: “We used FEM to simulate a few squids falling onto a flat grid. Once we achieved simulations that were satisfactory, we cached those out and instanced them all over our scene with random orientations and time offsets. To obtain proper results on non-flat surfaces, we used a point based cage deformer to deform the simulations from a flat grid onto the curved surfaces where we instanced the squids.

“We also mixed these results with particle-based simulations where we instanced pre-cached FEM impact deformations. We basically took the original cached FEM simulations and removed the translation to keep the squid at origin, while keeping the shape animations resulting from the collisions. We then synchronized and aligned the instances on the particles so we could match their impact time with the impact time of the zero out deformation cache.”

For the gooey splashes, a similar approach was undertaken for collision surfaces that were flat. When the collisions were not flat, however, Hybride relied on a point-based caged deformer to deform and stick the cached result to the curved surface. “For the areas where the cage deform was too extreme and wasn’t holding up,” says Leclaire, “we simply re-simulated the gooey FLIP simulation using the same distributed solution explained earlier.”

“We also used regular particle simulations for whatever was either quickly passing by in the foreground, or crossing behind our mid-range instanced squids,” says Leclaire. “On those particles, we would instance static squids. Finally, to fill backgrounds that were further away, we simply used regular particle simulations rendered as pink spheres to ensure quick rendering.”

And that, everyone, is how you simulate some pretty sticky squids.

Support befores & afters on Patreon, and get bonus content in the process!