Framestore Delivers Sand Room, Vipers for Prince of Persia
June 8, 2010

Framestore Delivers Sand Room, Vipers for Prince of Persia

London - One of this year's tent pole productions for Disney, Prince of Persia: The Sands of Time was released on May 28 in the US and UK. Based on the successful video game of the same name, the film is directed by Mike Newell and produced by Jerry Bruckheimer. It stars Jake Gyllenhaal as Prince Dastan, Gemma Arterton as Princess Tamina, and Ben Kingsley as Nizam. The film's stunning visual effects were created almost entirely in London, with Framestore contributing some 124 shots, including the creation of the movie's breathtaking penultimate action sequence.
Dastan (Gyllenhaal) is a street urchin in Persia. After showing valor in battle, he is adopted by the king as his heir, so the king's two sons will not fight over the throne. He teams up with Princess Tamina (Arterton) to rescue the Sands of Time, a gift from the gods that controls time, from the hands of the villainous nobleman, Nizam (Kingsley).

Appetite for Creation
Framestore's VFX supervisor for the project was Ben Morris, whose background includes his Oscar-winning work for the company on The Golden Compass. Morris spent six weeks on location in Morocco's Atlas Mountains and elsewhere, before returning to London for what turned out to be one of the longest post-production jobs Framestore has yet seen. Morris and his team worked closely with the film's VFX supervisor, Tom Wood, and an enriching and creative relationship developed.

"We were delighted to find that we were really able to stretch ourselves on Prince of Persia," says Morris, "The production team was extremely open to creative input, something that Framestore is in an excellent position to provide."

The two main elements on which Framestore worked were the Hassansin Vipers, a breed of murderous, supernatural snake that Dastan has to fight, slay and even dissect; and the Sand Room sequence, featuring a deadly chamber filled with a sandy vortex through which our hero has to pass en route to his showdown with Nizam. Both of these contrasting elements - one creature, one environmental -- were concepted, created, and executed in-house at Framestore, with the company's artists and technicians playing a crucial role in developing them for the screen.

Dune It Right
The Sand Room sequence began life as a logistical problem. As the film's climactic showdown between hero and villain draws near, the script and edit had brought Dastan to within shouting distance of his nemesis, but had not yet come up with a satisfactory transition sequence through which Dastan could struggle, which would take him from this beautiful city to the showdown's location.

"It was getting rather late in the day," recalls Ben Morris, "There were only a few weeks left of live action shoot time and the transition had yet to be solved. The production team came to us one Friday and said (I'm simplifying here), 'Okay, we're stumped -- what can you come up with?' We love a challenge and several of the team, including animation supervisor Pablo Grillo and VFX Art Director Kevin Jenkins, immediately headed off to a space where they could brainstorm ideas. Jenkins drew up some concept sketches on the train over that weekend. By Monday, we had an idea to show the client, and by the following Friday we had a go-ahead from the production."

The idea the Framestore team came up with was simple, audacious, and in harmony with the film's themes and imagery. Dastan and Tamina find themselves at the edge of a huge chamber. The room feels oddly proportioned -- it's very wide, deep, and feels slightly flat, with huge buttress supports that don't seem to make sense, and a huge light stream coming through the roof over a cupola. Tamina says that they must make their way to the cupola and, using her magic, illumines a path from which Dastan must not stray for fear of activating the chamber's defenses.

All is going well until a tiny pebble is dislodged and hits the sandy surface of the ground beside Dastan. Immediately a hole forms through which the sand begins to fall, and within seconds the plughole has become a whirlpool and the entire sandy contents of the chamber are dropping away, revealing an entire cityscape beneath which also begins to crumble and collapse. The couple is separated, with Tamina making an early escape, and Dastan must use every physical feat in his repertoire to elude a sandy demise.

Every project throws up its own heroes within its team, and Prince of Persia was fortunate enough to produce two such individuals: Alex Rothwell, lead FX artist, who developed ingenious and invaluable technical solutions to the unique computing challenges posed by both snakes and sand; and Kevin Jenkins, VFX art director, whose concept art work for the Sand Room so impressed the film's production team that he found himself seconded to their art department for six weeks, where he worked closely with production designer Wolf Kroeger and supervising art director Gary Freeman, helping ensure that the Sand Room sequence looked as good as it could.

"VFX are normally secondary to the action and the characters," says Morris, "But in this case, the VFX are the action and the room itself is the character. Kevin Jenkins' phenomenal design concepts were our starting point, and his work ultimately became the closest thing to a style-bible we had. In a period of two weeks we built an absolute bare minimum of props for the shoot. It was the last thing in the film to get shot, actually. Normally something on this scale would get maybe a month's shooting time - we got six days. It was shot in December 2008, and over the subsequent six months we (along with Tom Wood) completely reconstructed the scene."

About 75 percent of the sequence features an entirely digital environment, whilst the Dastan we see is a cunning blend of Gyllenhaal, stuntmen and digital doubles. For a sense of the scale on which the team was operating, one not untypical shot contains some 1.2 billion sand particles.

The Sand Room posed numerous technical challenges, says Alex Rothwell, "Firstly, we needed a very general way of rendering lots of sand doing lots of different things. I came up with the idea -- which might seem somewhat counter-intuitive -- that we just render all of the sand as particles, whether it's a flat surface of sand or sand flying through the air. That way we'd just have one solution to all our problems, so we could pour time into that solution and make it as good as we could. The solution we came up with had to be rendered in Renderman, but how we generated the input needed to be up to us. The framework I put together took particles from Houdini or Maya and processed them through a proprietary system which efficiently organized the data, ensuring that only the minimum necessary amount was ever being thrown at Renderman when it was needed."

With a sequence as tightly choreographed as this, the sand wranglers didn't want to do one big simulation and leave the resulting imagery to the chance events that would ensue. Instead they created something that was much more controllable by the artists, with factors such as speed, direction of flow, the sort of shapes being formed, all eminently tweakable.

Key in the look development of the Sand Room's atmospheric lighting was lighting supervisor Rob Allman, whilst Rothwell was also responsible for helping illuminate the sand, modifying 'Occvox', a piece of software he'd previously designed to handle the occluded light on Aslan's mane in Prince Caspian. It proved very useful for handling millions of sand particles in flight.

The second key digital component in the Sand Room is the collapsing architecture -- columns, arches and entire buildings tumbling around and on top of Dastan as he hurtles around the chamber. One of the chief demolition experts was CG co-supervisor Laurent Hugueniot. "We had to set up a system of meticulously controlled chaos," he says, relishing the oxymoron. "Using dynamics we had to destroy huge quantities of architecture. We'd distress key points on the path of destruction. We would build a wall as one piece and then subdivide it. We had a system to distress the geometry, and another to shatter the bricks. Throughout it had to look physically possible, but control was essential. Destruction can be as much of an art as creation."

Big Screen Vipers
Another result of the openness of Prince of Persia’s production team to external creative input was the look of the Hassansin Vipers, as well as the manner of some of the grisly deaths they suffer at Dastan's hands. Used as a form of living ninja weaponry by Dastan's foes, the vipers are six foot long, armor scaled and lightning fast. Dastan's first encounter with them occurs during a nighttime rest at an oasis.
Burrowing at speed under the ground and hurtling through the air to strike, the vipers nearly make short work of Dastan's party. Fortunately, the magical dagger with which he is equipped has the power to roll back time. Using this power, Dastan is able to return to the start of the assault and anticipate the vipers' every move, dispatching them one after the other. The snakes are seen in extreme close-up and in slow motion during the fight, demanding the highest level of photo-realism.

A number of the London facilities involved in the film's post production pitched for the vipers, but it was a handful of beautifully executed concept drawings created by Framestore's head of texture, Daren Horley, that won the day, based on Tom Wood's brief for a snake with armored rather than flat scales. In addition, the Framestore team came up with a number of suggestions as to how Dastan might interestingly dispatch the critters during the oasis fight.

Once more, the talents of lead FX artist Alex Rothwell proved invaluable. With no existing in-house way of quickly attaching scales to a shape, he devised a procedural way of generating the snake, writing a snake plug-in which generated a snake with sliders covering such variables as number of scales down the length of the body, number of scales round the circumference, width of belly scales, etc. The snakes are as beautiful as they are deadly, and among those crucial to making them look and move with such deadly serpentine grace were CG co-supervisor Andy Kind and lead TD Neil Weatherley.

Further appearances by the snakes include a scene in which one of them crawls slowly over Princess Tamina's sleeping body, and a 'living-autopsy' sequence, during which a live snake is sliced open so that the dagger that it has swallowed can be retrieved. "The Tamina crawl was pretty unforgiving," comments compositing supervisor Chris Zeh, "It was slow and close-up -- there was no hiding behind motion blur. And the autopsy was also tricky. A bicycle tire filled with guts was shot as the basis for our 3D work, so the tracking had to be pixel perfect -- not easy with such a squidgy subject!"

Framestore's work on Prince of Persia: The Sands of Time shows a company at the top of its game, executing some of the best VFX anywhere and also contributing creatively throughout the process. In the film world's continuing quest for new wonders, such partnerships open new realms of possibility for everyone.