“The Loki water state machine was crucial for delivering the sheer volume of large-scale water shots in this movie. In a typical VFX-heavy movie, water shots of this complexity are few and far between and require many iterations and passes from very experienced artists. In contrast, our state machine approach was able to deliver great results after just a single pass, even by artists who had just entered the industry.” – Sean Flynn, simulation lead, Unity x Wētā Digital

A majority of the water tools developed by the team sit within Wētā’s proprietary simulation framework, Loki. This piece of tech includes solvers for multiple water states, including procedural water waves, bulk water, spray, mist, hero bubbles, diffuse bubbles, foam, capillary surface waves, thin film, and residual wetness.

State machine

Many of these solvers sit within the Loki state machine – an airborne spray system. The water states are coupled with the surrounding air, with transitions between states handled in a mass- and momentum-conserving way.

Rather than a one-size-fits-all approach, the Loki state machine allows multiple solvers to run in tandem. Each solver is optimized for the level of detail required by its respective state, such as bulk water, spray, and mist. This helps keep large-scale water simulations efficient while still capturing the very fine droplet interactions required by spray and mist.

All of the states including the surrounding air are completed in a single simulation pass. As all solvers are computed with proper physical interactions between them, this is what helped to create such natural and realistic water interaction throughout the film.

Source: Unity Technologies Blog