Wipe out: ‘Poseidon’ Fluid Simulations

The luxury cruise ship Poseidon, with a little help from ILM, gets hit with a 150 foot freak wave in one of the most complex and visually stunning fluid simulations yet accomplished. We talk to ILM’s Mohen Leo and discuss in depth the approaches they used and the algorthim issues they had to deal with.

The Film

In this remake of the 1972 disaster classic ‘The Poseidon Adventure’ , a luxury ocean liner capsizes from a colossal tidal wave, leaving its survivors to fend for themselves as they find a way out, but done with a modern aesthetic and vastly greater visual effects resources than were possible 34 years ago. The film is directed by 65 year old Wolfgang Petersen of Troy, Perfect Storm and the landmark 1981 German classic Das Boot , clearly no stranger to filming ocean based dramas. The visual effects supervisor was Boyd Shermis ( Speed), who oversaw the implementation of more than 600 VFX shots. ILM was awarded approximately 100 of the most complex shots. the ILM team was headed by Kim Libreri (Matrix I,II and III) and associate visual effects supervisor Mohen Leo, who we talk to in this week’s podcast.

pilm/P_wolfgang
Director Wolfgang Peterson on set

“In terms of scope it’s one of the most complex VFX pictures ever created,” Shermis is quoted as saying, and he offers Poseidon’s innovative opening shot as an example of the level of expertise brought to bear on the film, by Libreri and the ILM team.

For the title opening shot, and title sequence, the film starts under the water rises to reveal the ship, rotates around the bow and down the side of the ship, “then spots a figure running along the deck,” Shermis outlines. “The camera comes in tight on him, dollying 180 degrees around him. We lead him up a flight of stairs, then pull back to take in the beauty and grandeur of the ship, the upper decks, people having fun by the pool, then climb high up to the smokestacks and beyond that to a beautiful sunset on the ocean.”


“It’s two and a half minutes,” Petersen says of the remarkable sequence. “The only real element in the whole shot is the jogger, Josh Lucas” – who was filmed against a green screen at the San Fernando Valley’s Sepulveda Dam, one of the film’s only two off-lot locations, then integrated into the virtual landscape. “It’s the boldest, most insane shot ever done in the history of CG, yet completely photorealistic. I don’t expect people will think, what a great CG shot, instead, they might think, what a great ship; where did they find it?'”


pilm/runninggreen
This entire opening sequence from under the water to around the yacht was CG
pilm/runningfinal
Here is a frame from the final shot. Note the link below for a full 2K res version

For a close-up look, click here download a full resolution 4000×2000 frame from the movie.

pilm/P_wave
The wave that starts it all. The 150ft high wall of water.

The Ocean

With a virtual ship, the effects work ran the gauntlet of problems from extensive wire and wig removal, to photorealistic wide shots and some of the most complex water simulations ever done.

The issue with wide open ocean shots has been ‘solved’ in computer graphics for some time, but the ILM team were required to take their water shots to a whole new level. Unlike simple ocean wide shots – which can be simulated on a home PC, the Poseidon water needed to provide realistic motion while crashing into a 20-story grand ocean liner more than 1100 feet long and carrying 4,000 crew and guests. The water simulation needed to achieve the depth and translucent sub surface scattering, micro surface texture, spray, vortexing and believable crashing into hard body irregular shapes like an ocean liner, for minutes of screen time – often in closeup and lengthy on screen shots.


pilm/insidewave
the wave boat crashing sequence is a several minute long sequence

Often time even real water does not film well, on screen even real water can look fake and not scale at all well. In the film A Perfect Storm, a lot of accurate wave work needed to be redone since on screen the correctly sized waves just did not look large enough nor dangerous enough. In Poseidon, this was addressed and special attention given to the depth of the water visually, the internal”glow” large bodies of water seem to have.


pilm/P_wall
Fuild simulations required working with real sets,as modelled hard body objects, and some real water

In Poseidon by employing the latest computer graphics research to create the ocean, all exteriors and the ship in its entirety, the filmmakers did not need to compromise in scale, and were creatively free to both simulate and design the effects the film required. The computational simulation provided an unparalleled level of realism but it still needed to be tempered with ILM’s technical artistry to sell each shot.


How they did it

pilm/sinks_boat
The main cg yacht.

With R & D input from Stanford University’s computer graphics department, ILM special effects supervisor Kim Libreri led a 100-member team of software developers, engineers and artists for a year to create the proprietary software used on Poseidon. Called computational fluid dynamics, a new technology that simulates how water interacts with objects, it’s a system so advanced it required the simultaneous development of new hardware just to run it. Says Libreri, “Existing machines weren’t fast enough. What that means on screen is that, You’e really going to see the wave react with the ship in ways traditionally not seen in computer graphics,” he says.


pilm/sinks_fluid
Here you can clearly see the fluid sim.

As you can hear in the podcast, ILM worked with Standford university and with Stanford Professor Ron Fedkiw on incorporating the latest fluid dynamics research into ILM’s tools. This allowed for the time between research and implementation to fall to just days.
Ron Fedkiw and his team at Stanford University developed PhysBam, which is an Eigenvector fluid dynamic simulation system that could be used on many natural phenomenom such as fire and smoke. PhysBAM was then built into the ILM tool Zeno. an in house tool, that was the basis of the ILM fluid sims.

The system works by conserving volume and energy. In the simplest terms if you pour water into a fish tank full of rocks and objects- while the water deforms and splashes – it remains the same volume, if you were to model this and take into account the potential energy of the water as it falls in, and then account for that in terms of the waters movement you have the basis of the model. the next consideration is surface tension, at some point water breaks apart causing spray and splashes. Furthermore a wave of splash can be reincorporated into the main body of water – but in so doing it can spawn underwater particles which the program uses to model air bubbles. The model is not a surface renderer but rather a closed system that accounts for surface, energy and internal forces.


pilm/sinks_surface
The surface texture.

One of the many aspects that the Stanford’s team have pioneered is what is termed “vorticity”, which is the swirl or spin effect seen as water crashes around rigid body objects. Without vocrticity contributions – the liquid often looks thick and honey like, a common problem on many earlier sim systems. Not only are these aspects accounted for in the Zeno system, but localized Vorticity controls were added to allow the film makers to increase the effects where it was needed dramatically in the visual story telling. “For the first time we can simulate particles of water striking objects, rolling over them, colliding with the back-spray and recombining in a naturally fluid way”, added Libreri.


pilm/sinksFINAL
The Final Frame

In an August VFXworld article, Ron Fedkiw stated that “Most fluid solvers just try to simply solve equations. We strive to better mimic the key aspects of the fluid dynamics. For example, with smoke, fire and explosions, this would be the vorticity, which is the swirl or spin effect. Thus, we’ve written papers addressing different aspects of vorticity such as confinement, vortex spin particles, etc. For water, this also includes the way the surface behaves and thus we invented the particle level set method for better surface detail.”


pilm/rolling
The wave boat crashing sequence is a several minute long sequence

Actually the relationship between Stanford and ILM did not begin with Poseidon, the easiest use of this technology at ILM was on the female robot in Terminator 3, it was also used on the Dragon’s breath in Harry Potter and on some pouring shots in the up coming Pirates of the Caribbean, but it is best seen on screen in several of the major lava flows of Star Wars Ep III.


PART 2: Behind the Images, the algorithms under the waves

fxguide spoke to Stanford Professor Ron Fedkiw about his research which is incorporated into ILM’s in house code.

fxg: What is your background in Research?

RF: I came to UCLA’s math department in 1991, and started learning these techniques that year. After getting a Ph.D. in math at UCLA in 1996, I spent time there and at Caletch in the Aeronautics department finally arriving at Stanford in Computer Science in 2000. So I’ve been working on fluids for math and engineering for about 15 years. For graphics I did a bit of work at Arete and Centropolis starting in 1998, so 8 years in the effects industry. But my real focus on doing effects work didn’t start until I came to Stanford, which also corresponds to when I started wotking with ILM (January 2001).

fxg: Can you explain the algorithms behind your PhysBAM research and the special controls such as Vortcity ?

RF: There are conservation laws for mass, moimentum and energy, but for water one can ignore compressibility and treat the incompressible form of the equations. This allows one to drop the energy equation, and replace mass conservation with volume conservation, and solve for velocity instead of momentum. This is typically done on a background uniform grid in an Eulerian manner, but yes, as you say, we incorporate special controls to make the simulation less viscous. One technique is vorticity confinement and we’ve been doing this for some time. The other is a Lagrangian particle framework, called vortex particles, that helps a lot! A whole lot! This really makes it less viscous and makes it appear more like water.

fxg: I understand that you introduced localised Vorticity controls to give the film makers more control?

RF: Yes, the vortex particles mentioned above. These are controlled in the usual particle framework, just like td’s love.

fxg: The base model is PhysBAM – which is an Eigervector Fuild sim engine which ILM then placed into their Zeno tool box, but that you continue to develop this with your students at Stanford?

RF: PhysBAM does fluids, deformable solids, rigid bodies, solid fluid coupling, rendering, etc. We’ve been developing this for some time. Then as you say, Zeno is the front end, and has a lot of controls of its own. That is, there’s really 3 levels:

1. Zeno as a user interface,

2. PhysBAM under the hood, and

3. there’s a dynamics engine we called Dyn that plugs the two of these things together. Dyn has some “secret sauce” developed by ILM’s R&D department over the years.

fxg: You and your team has done specialist under water simulation work – almost as much as the surface property simulation.. such as wind blown spume and spray etc ?

RF: The part of PhysBAM we use for the water is basically the particle level set method. It mixes particles and level sets for interface treatment. One major benefit of this method is that it automatically generates particles in parts of the domain where the level set is having trouble resolving the interface. This is similar to the gneration of spray and drops due to surface tension, which happens at small spatial scales. This means that we get automatic spray generation above water and automatic bubble generation under water. It was an accidental feature of the method, one we always knew would eventually be useful, but eventually turned out to be on this movie.

fxg: What areas have you and your team most recently been researching?

RF: A very recent development is in the MPI parallel implementation of the fluid solver. It had long been the case that the best algorithms didn’t work well on parallel machines. Thus, one had to either use the really good algorithms on a single proc, or to use less popular algorithms on many procs. It usually turned out that the parallel implementations and the serial ones were neck in neck in what they could deliver because of the difference that better algorithms made.

Recently, because of both hardware and algorithm advances, we were able to put the state of the art algorithms into a parallel environment across many computers. This made a *huge* difference!

On screen Poseidon is a remarkable achievement of computational maths and crafted film making. The film opens this month worldwide. Our special thanks to ILM and Warners for this story.

pilm/P_ship
The Ship was partly modelled on the QE2
pilm/underwater
A lot of complexity was added to the nature of the way light worked underwater