Will Smith plays a misanthropic superhero in Hancock. Image courtesy of Sony Pictures.
Director Peter Berg kept the visual effects department on its toes with his run-and-gun style. Image courtesy of Sony Pictures.

Like its misanthropic superhero, director Peter Berg didn't mean to create havoc off the set of Hancock (now on DVD and Blu-Ray). It's just that his run-and-gun style left the film's visual effects department, Sony Pictures Imageworks—accustomed to longer lead times and meticulous advance planning—scrambling to keep up. But Digital Effects Supervisor Ken Hahn is proud to report that the team rose to the occasion and even embraced opportunities to impress its fearless leader, beginning with one jaw-dropping shot affectionately dubbed "butt-head."

Bottoms Up

In the midst of a public relations campaign for redemption, the film's eponymous lead character, played by Will Smith, is thrown in the slammer with every criminal he's ever manhandled. And now they're eager to manhandle him. Warned by Hancock that if the harassment continues, he'll shove one inmate's head up another inmate's, um, bum, they persist and Hancock can't resist being true to his word.

"When I read that scene in the script, I laughed out loud," says Hahn. "I assumed, like everyone else in pre-production, that it would be sleight of hand, you'd never see the gag on-screen." So, that's the way the live action plate was shot, from several angles with multiple cameras. And Hahn thought the rough assembly of the scene was pretty funny. But, according to Berg, one thing was missing: the "money shot" of the offending inmate's head stuck in the other inmate's backside. This is the part where jaws dropped.

"We had already wrapped principal photography and, because we didn't anticipate this as a visual effects scene, we hadn't acquired the necessary data," Hahn recalls. That data would have included full body scans of the two actors involved to create digital doubles, texture photos for hair, skin tone, and eye color, and digital stills of the set. To his surprise, far from daunted, Ken's team was actually excited about the shot. "They said, 'We live for stuff like this!'" he laughs.

Their objective was to create a composited live-action and CG wide shot of the two actors, visible from head to toe, in the correct position and environment, and properly lit, while the other actors, including Will Smith, react to the gag. Ordinarily, the team would start with a reference shot, but "we didn't have it, though we did have alternate takes of the shot from multiple cameras, all with similar lighting conditions." This data was used to re-construct the environment and begin to build the CG characters.

"The inmate whose head is in the, uh, unfortunate position was entirely CG in the missing shot," says Hahn, "and the other inmate was partially CG." The team wanted to preserve the head and chest of the partial CG character because "we don't want to try and replicate an actor's work," but they did add a pair of virtual arms, flailing against the invading force. According to Hahn, it took four team members four months, working on "lots of cloth simulation with Maya, really working on the texture aspects" to get it right. "One person worked on muscle rigging [layering virtual muscle with human properties on a CG skeleton]," Hahn recalls, "one person paint-fixed the entire plate [to remove unwanted objects from the frame] and worked on plate re-construction, a third person worked on cloth simulation, and a fourth worked on the lighting and composting." In the end (ba dump bah!), Hahn acknowledges that it was worth it. "That scene gets the biggest laugh in the movie."

Video still
The inmate with his head in the unfortunate position is entirely CG. Clip courtesy of Sony Pictures. (Click to open video in a new window or right-click to download.)

Production Derails

If the VFX team were caught off guard with the prison sequence, they were almost over-prepared for Hancock's inadvertent train derailment scene. "We had pre-vized the whole thing [created a rough, animated comp in advance of the shoot]," Hahn recounts, "ending on this beautiful dolly boom shot [the camera simultaneously moves back and up] that reveals all the destruction Hancock has wrought by trying to save the day." But the problems with pre-viz, as Hahn sees it, are two-fold: first, filmmakers get wedded to virtual camera moves that often can't be replicated in the real world, even in this era of computerized rigs and cranes. "And," adds Hahn, "we spend so much time inputting data into these animatics—and it's inaccurate data."

Hancock Train Tracks
The VFX team spent countless hours pre-visualizing the train derailment sequence, only to toss it out in post production. Image courtesy of Sony Pictures.

For instance, when the production team got to the actual train yard location in Long Beach, California, it was different from its pre-visualized counterpart. "The biggest difference was the unachievable camera move due to the differences between the pre-viz model and the actual location" says Hahn. The camera's choreography couldn't be achieved with the techno-crane (a computerized rig that controls the camera's movement), and its resting position was not high enough to take in the whole tableau of destruction: Hancock, the train wreck, all the collateral damage, and lots and lots of gawkers.

"We were all frustrated that the scene was not working out the way we had anticipated," says Hahn. "We started with Will Smith, the first train car, and the railroad tracks, plus several cars in the [live-action] plate, then inserted additional CG train cars and automobiles, replaced a bridge in the background, removed a palm tree in the foreground, layered in the Los Angeles skyline, and added lots of debris and other destruction." Still, using the pre-visualized, computer-generated camera move was not resulting in the epic reveal the filmmakers were after. "We finally realized that the reason it wasn't working is that we were slaving to the original animatic," says Hahn. "As soon as we ditched the animatic and approached the scene from a fresh perspective, everything fell into place, which was very gratifying."

CG train cars were layered onto the live action plate in the train derailment sequence. Images and clip courtesy of Sony Pictures. (Click to open video in a new window or right-click to download.)

Stormy Weather

Even more gratifying for Hahn, was a scene described in the script with one sentence: "Hancock and Mary [played by Charlize Theron] duke it out on Hollywood Boulevard." It sounded simple, but as the two engage in battle, they conjure up elements, like tornadoes and lightning that represent their respective mythologies. And these elements were left up entirely to the VFX team to render.

Charlize Theron, as "Mary," gets ready for an epic battle with Will Smith on Hollywood Boulevard. Image courtesy of Sony Pictures.

"John Dykstra, Visual Effects Designer, was overjoyed," Hahn remembers. "These elements weren't represented in an animatic, they weren't created by the production design department." Knowing that the visual effects team would be solely responsible, John wrote a five-page treatise on what the elements should look like as the scene unfolds. "First, we wanted the elements to represent the characters," says Hahn. "John wanted a certain motion and life to them. Since the characters are battling, he wanted the elements to be ominous, but with an outer shroud that was beautiful and graceful."

For the Hollywood Blvd sequence, Hahn and Dykstra worked with cinematographer Tobias Schliessler to shoot additional under-exposed passes, along with the native 35mm footage shot under clear blue skies. These passes would later be used by the visual effects team to manipulate the photographed plates since the changing weather conditions were added in post. "This usually makes DP's [directors of photography] nervous," Hahn acknowledges, "because the dailies [film developed and screened on a daily basis] look dark, but we needed the plate a little darker to make the virtual lightning and tornadoes work." In addition, "thousands" of digital stills—above and below key settings in HDRI format (High Dynamic Range Imagery)—were shot, which gave the team enough digital information to re-create the in-camera environment in the computer.

This contact sheet and video show the progression of the creation of this sequence. Image and clip courtesy of Sony Pictures. (Click to download video or right-click to download.)

"We wanted everything to look seamless and invisible," says Hahn, who, together with Dykstra, studied footage of actual tornadoes, a la The Wizard of Oz. "But John reminded me, we weren't in Kansas any more," says Hahn. "Hollywood Boulevard is not an expansive Kansas prairie." The first order of business was to create the wind and its virtual impact on everything in the vicinity, including Hancock and Mary. "There were two 15-foot fans blowing on set, but they barely ruffled Charlize's hair in the practical plate," Hahn chuckles, "so we had to add virtual, gale-force winds to the initial composite." Hahn says his team "wrote a fair number of extensions for the plug-in architecture of Houdini and Maya" to intermix lightning with dark frames illuminating particulate matter. "Our director would see the animations and say, 'more threatening, more threatening!'" But, ultimately, he was very happy with the end result.

Cut to the Chase

As proud as Hahn is of the visual effects department, he gives props to his practical brethren in special effects on one scene in particular: the spectacular SUV chase sequence. (Special effects are created on set, in camera through make-up, prosthetics, and stunts, while visual effects are created in computer, during post-production.)

The scene starts with a visual effects gag: Hancock flying after the speeding SUV and landing in the back. Well, not so much flying—gliding heroically, like other superheroes—as hurtling haphazardly, crashing through a road sign before plopping in the back of the speeding SUV. "We shot Will Smith on a wire, against a green screen," explains Hahn, who admits that wire work has its limitations. "The body doesn't hang in space the way it would without the wires," he says, even with computer-controlled winches. According to Hahn, the kinetic motion the director wanted was lacking, so the VFX team created a CG Hancock for the opening section of the scene.

Video still
Hancock took flight through a combination of practical effects, including wire work, and visual effects such as green screen. (Click to play video in a new window or right-click to download.)

"The rest of the SUV chase sequence was done practically, through amazing coordination and choreography between the special effects department and stunt teams," says Hahn. Fourteen cameras were set up on the 105 freeway in Los Angeles, half of which were remote-controlled, to capture all of the action in a single take. "Everything was rigged," Hahn recalls. "A chase van followed the picture car [the car, or SUV, that would appear on camera]. Anyone who was not needed directly on set was at a remote location about a quarter-mile away. Logistics were mind-boggling." Ordinarily, Hahn and his team would get camera and lens information for each camera, "but it was so crazy that day, we gave it up to God!" Though there was some augmentation, or digital enhancement, in post, by and large, the scene seen on–screen was captured in camera. "We color-corrected [digital manipulation of the frame] to maintain consistent daylight, since the set-up took all day, from sunrise to sunset to shoot," says Hahn, "while on-screen, elapsed time is only a minute or two."

Hancock Image
According to digital effects supervisor Ken Hahn, actor Will Smith understands the technical challenges of making an effects-driven film like Hancock. Image courtesy of Sony Pictures.

3D in Stereo

With a well-deserved break after his work on Hancock, Hahn looks forward to catching up on the all the latest technological advances in his field. Looming largest: the transition from 2D composites to 3D, "stereoscopic" finishing. "Even though much or our work in visual effects is done in 3D, creating 3D objects or characters," Hahn explains, "the finished project is composited into two dimensions for release on traditional theatre screens." But that's changing, as more and more filmmakers, such as James Cameron, shoot films, like the upcoming Avatar, stereoscopically—in 3D, requiring 3D glasses. "Yep, just like they used to wear in the 50's," laughs Hahn. "Which I find the biggest impediment to its success. I won't wear them."

"It's a whole, new way of thinking for VFX artists and technicians," he adds, "especially the layering aspects. Your eye is always trying to converge on something, and in 3D, we have to fix that convergence point." According to Hahn, the bar will be higher for visual effects finished in 3D. "We have certain 'cheats' with 2D composites," he says. "With stereoscopic finishing, we won't be able to 'paint-fix' our way out of things, because the eye will see artifacts or warpages." As a fan, though, Hahn acknowledges he would like to see his favorite comic book films, like X-Men, in 3D. Even if he has to don the dorky glasses.