 |
Algorithms that serve up really good goop: O’Brien models the brittle, the viscous, and the volatile world
by David Pescovitz
Early one morning last winter, a graduate student walked into the Berkeley Computing Animation & Modeling Laboratory hoping to catch up on some work while most of her lab mates were still home asleep. Expecting a few hours without distraction, she was instead greeted by the cacophony of genetically enhanced super soldiers wielding plasma rifles and massive insect-shaped tanks galumphing across a bombed-out battleground. Someone was playing a round of Halo 2, a new video game for Microsoft’s Xbox video game platform. Wielding the joystick was laboratory director James O’Brien. And he had been playing all night long. This was research.
 |
ANIMATION BY ADAM BARGTEIL AND TOLGA GOKTEKIN
|
O’Brien, a professor in the Department of Electrical Engineering and Computer Sciences, models complex physical systems from snow and blood to explosions and shattering glass for computer animations. Already his algorithms have made their way into the arsenal of digital effects tools at Sony, makers of the PlayStation 2 video game system, and Pixar, the animation powerhouse behind The Incredibles. In the future, O’Brien's techniques could enhance training simulations for surgeons, soldiers, and firefighters. No matter the application, the goal is the same: Make the unreal seem as real as possible.
“If a special effect is done well, you shouldn’t even notice it,” he says.
While his research is meant to be invisible, O’Brien himself is definitely being noticed. In January he was profiled in Time as one of the world’s top experts in his field. Last October, he was named to Technology Review magazine’s 2004 TR100, a prestigious list of the world’s top young innovators under age 35. According to O’Brien though, recognition by his peers is the greater honor.
Last year, he and his students presented four new modeling techniques at the Association for Computing Machinery SIGGRAPH conference. A short film demonstrating one thread of his research wowed audiences of the popular Electronic Theater program. The brief animation showed off the researchers’ method for animating viscoelastic fluids—fluids that are neither perfectly liquid nor perfectly solid. Appropriately enough, the film was entitled Gratuitous Goop.
“Viscoelastic fluids behave like solids up to a certain threshold,” he says. “But when the strain is too large and goes beyond the threshold, the material starts to flow.”
Paint is viscoelastic. So is mud. It’s solid until you squeeze it. If a special effects artist wants to add a spray of mud to a scene of a spacecraft crashing into a forest, O’Brien says “treating the computer-generated mud like viscous water just won’t look real.” The key difference between basic fluids and solids, he explains, is the presence or absence of elastic forces. “If you squirt a little ketchup on a plate, it doesn’t flow into a puddle, but rather sits there as a glob,” he says. “That’s because there’s a very small amount of elastic force.”
The algorithm O’Brien developed with graduate students Tolga Goktekin and Adam Bargteil takes existing fluid simulations and adds the ingredient that gives materials like toothpaste, lard, and mucus the specific characteristics of both liquids and solids.
The team’s algorithms are rooted in computational fluid dynamics methods that compute how fluid materials dynamically move in response to environmental forces like stormy winds, rain, and earthquakes. Before they began programming though, the researchers took a trip to the toy store. There they found a wide variety of goops, slimes, and gross-out toys. After making a mess, it was time to do the math.
As O’Brien explains the mathematics, he tugs on a glob of Silly Putty. The rubbery material will flow if you tug on it, he points out, but it also behaves elastically. Just throw it on the floor and it will bounce, a fundamentally elastic behavior. A material like saliva has a very low threshold before it flows. Blood is somewhere in the middle. Setting the correct thresholds and modeling the flow accurately results in an animated slime that looks appropriately, well, slimy.
 |
Professor James O’Brien (far left) with students from the Berkeley Computer Animation and Modeling Group (left to right) Tolga Goktekin, Adam Kirk, Adam Bargteil, Bryan Feldman, Hayley Iben, and Chen Shen.
AARON WALBURG PHOTO
|
“It’s nice to do something that involves very complicated math but is still artistic,” says Bargteil, whose favorite goop toys remain on his desk as inspiration.
According to O’Brien, modeling viscoelastic fluids is not so different from animating ductile materials—those that deform a great deal before they finally fracture. For example, if you gently try to bend a spoon just a little bit, elastic forces cause it to spring back to its original shape. But apply enough pressure and the molecules flow into a new configuration, leaving the spoon bent. Deform it further and the metal will actually tear. O’Brien’s success several years ago animating this type of ductile fracture led directly to the viscoelastic fluid modeling.
“The physical reason that a material tears instead of shatters is actually similar to the reason that goop behaves like goop and not like water,” he says. O’Brien’s quest to model the brittle, viscous, and volatile world began while he was a graduate student in the late 1990s at Georgia Institute of Technology. At the time, his research focused on processing X-ray images of the heart for coronary angiograms. Then one evening over a beer, a few fellow computer graphics students planning to enter their work in a film festival told him they wanted to animate a man diving into a pool.
“They were convinced that the splash would be impossible to model,” O’Brien says. “I thought that all you needed was a good algorithm.” He was right. After immersing himself in the water-modeling project, O’Brien’s next challenge presented itself while he was on a mountain vacation. As his snowmobile raced over the peaks, valleys, and gentle curves of the terrain, he considered the mathematics of modeling snow accumulation. That work continues today in his lab, where graduate students are modeling snowdrifts. The aim is not to compute the position of every flake, but rather to provide just enough realism to trick the eye and mind.
“In a film, the criteria for a simulation is that it look real enough that the audience doesn’t realize it’s not,” he says. “In a video game, it’s about using limited processing power to make something look more real than the competition.”
Indeed, while the immediate impact of O’Brien's work is on the big screen, video games have recently grabbed his attention. Chalk it up to faster processors, he explains. In 1999, he developed fracture simulations for his thesis, which would take all night to render on a computer. Now, the video game company that is in the process of licensing the algorithm can run the simulations on an Apple laptop at two frames per second.
“It’s still not fast enough for a game,” O’Brien says, “but at least it’s in the ballpark. And while he’s admittedly excited that his research might ratchet up the realism in tomorrow’s video games, he sees more serious applications of his algorithms on the horizon.
“Video games are just another name for ‘training simulation,’” he says.
Recently, O’Brien, EECS/IEOR professor Ken Goldberg, and graduate student Ron Alterovitz launched a loose collaboration to explore “virtual surgery.” The idea is that physicians would rehearse on the screen before ever putting scalpel to flesh.
“One of the places you’ll see a ton of fluids with all sorts of very interesting and different properties is inside the human body,” O’Brien says. “If you’re able to model the human body with a high degree of accuracy, a surgeon can train on a simulator like a pilot trains on a flight simulator.”
Along with surgeons, O’Brien believes that firefighters could benefit from porting video game technology over to professional training simulators. Two years ago, he and graduate student Bryan Feldman devised an efficient way to model incredibly large explosions and approximate the spray of burning liquids. The method is now employed by the special effects wizards at Digital Domain, a production house founded by James Cameron, director of the Terminator films and Titanic. Someday though, far from Hollywood, a synthetic burning building complete with digital blasts could help prepare a firefighter for the worst.
“In 10 years, you’ll expect the same quality in training simulations and games as you demand from movies,” O’Brien says. “That’s the road ahead for me.”
DAVID PESCOVITZ writes Lab Notes, the College’s award-winning online research digest, and is co-editor of the popular blog BoingBoing.net. Pescovitz’s writing on science and technology has been featured in Wired, Scientific American, IEEE Spectrum, and the New York Times.
|