• On CBS MoneyWatch: 10 Most Expensive U.S. Colleges

Geek Gestalt

Read all 'physics' posts in Geek Gestalt
May 27, 2009 10:00 AM PDT

How technology lifts Pixar's 'Up'

by Daniel Terdiman
  • 13 comments

In 'Up,' the new Pixar film due out Friday, the studio had to figure out how to animate the more than 10,000 interdependent balloons that hoist the main character's house aloft.

(Credit: Pixar Animation Studios)

If you want to consider a difficult computational problem, try thinking of the algorithms required to animate more than 10,000 helium balloons, each with its own string, but each also interdependent on the rest, which are collectively hoisting aloft a small house.

That was the challenge the production team at Pixar faced when it set out to begin work on "Up," its tenth feature film, five years in the works, which hits theaters on Friday.

There was absolutely no way the team was going to hand-animate the balloons. Not with their numbers in five-figures, and especially not when you consider that within the cluster, every interaction between two balloons has a ripple effect: If one bumped another, the second would move, likely bumping a third, and so on. And every bit of this would need to be seen on screen.

In "Up," the story revolves around the main character, 78-year-old Carl Fredricksen, who, frustrated with his mundane life, ties the thousands of balloons to his house and sets off for adventures in South America. A small boy ends up marooned on board, and hilarity ensues.

The cluster of balloons is so central to the film's branding--it's called "Up," after all--that to promote the film, Pixar teamed up with two of the world's cluster ballooning experts for a nationwide tour involving a real-life flying armchair and dozens of huge, colorful balloons.

"You have a movie that's about a house that flies, which is a pretty far-fetched idea," said Steve May, the supervising technical director on "Up." "We all know, from kids' parties, how a bunch of balloons behave, so if we could animate balloons in a realistic way, the believability that the house could fly would sell."

For May, "Up" producer Jonas Rivera, director Pete Docter, and the many others involved in making the film, believability was key, even within the context of a story about a flying house. And while a major part of instilling that believability must come from a well-conceived and executed story and script, the animation is no less responsible for winning over potentially skeptical audiences.

Balloons, the mother of animation invention
May said that the animation department at Pixar never even considered hand-animating the balloons. But even standard computer animation wouldn't be up to the task, because of the N-squared complexity involved in the thousands of interdependent balloons. Instead, the studio's computer whizzes figured out a way to turn the problem over to a programmed physical simulator, which, employing Newtonian physics, was able to address the animation problem.

"These are relatively simple physical equations, so you program them into the computer and therefore kind of let the computer animate things for you, using those physics," said May. "So in every frame of the animation, (the computer can) literally compute the forces acting on those balloons, (so) that they're buoyant, that their strings are attached, that wind is blowing through them. And based on those forces, we can compute how the balloon should move."

This process is known as procedural animation, and is described by an algorithm or set of equations, and is in stark contrast to what is known as key frame animation, in which the animators explicitly define the movement of an object or objects in every frame.

Procedural animation has been around for some time, but May suggested that even the most difficult uses of it in the past don't come close to what Pixar had to achieve in "Up."

Pixar fans may remember the scenes in "Cars" of a stadium full of 300,000 car "fans" cheering on a high-speed race below, each of which was independently animated. That, too, was done with procedural animation, May said, since creating so many cars individually would have been a non-starter. But even that complex computation problem didn't approach the balloon cluster issue in "Up": the "Cars" scene involved no interdependent physics.

Another animation challenge for Pixar was figuring out how to handle the feathers on Kevin, an important bird character in the film.

(Credit: Pixar Animation Studios)

Getting the simulator humming properly is no easy task, as one might imagine. May said it involves setting rules for how individual objects should behave, giving the computer these initial conditions, and then "let it run."

Oddly, because the simulator does indeed run with those conditions and rules and the peculiarities of physics, the animators found themselves without precise control of what would happen with the balloons--or other objects in the film animated using these techniques.

"If the (balloon cluster) is moving too slow, we increase the amount of wind, and then run the simulator again," May said. "Then maybe we turn the wind down. It's a little fun science experiment where sometimes, hopefully by the end, we're getting what we want."

Losing control of balloons
Sometimes, given the vagaries of physics and chaos theory, unexpected things happen. The computer team inputs the rules and because some of the initial conditions are random, "you get semi-random results." One of May's favorite examples is that early in the film, when the house first is hoisted aloft by the balloons, a small group of the balloons actually broke off of the main cluster.

May said that this breakaway group of balloons is actually visible--albeit very briefly--in "Up." Eagle-eyed moviegoers can see the escaped balloons in the upper right-hand side of the screen, he said.

"We didn't mean for that to happen," he said, "but (we said) 'It's cool, let's keep it.'"

Even being able to make such choices wasn't possible at the beginning of the film's production, however. May said Pixar's physical simulator, an open-source program called ODE, couldn't initially handle the complexity of modeling the behavior of more than 10,000 balloons.

"We could handle about 500 (balloons), and we knew we needed tens of thousands," he said. "We knew we needed to develop a new simulator software pipeline...to handle an order of magnitude more complex simulation."

Of course, at Pixar, adjusting to evolving computer needs on the fly is nothing new. In fact, May said the studio has done so in one form or another on many of its films. For example, he said that when the studio made "Monsters, Inc.," it had to figure out how to animate the movie's monsters' fur. Similarly, when Pixar made "Finding Nemo," the animators had to figure out how to simulate underwater scenes.

"We had to learn about (how light refracts under water), and murk and how particulates float under water," May said.

And in "Up," too, there were additional animation challenges. Among them were figuring out how to animate and render the feathers on Kevin, a bird that is a major character in the film, and how to make the cloth on (main character) Carl's clothes seem believable.

Carl's threads were "the hardest clothing we've ever had to animate here," said May, "in part because Carl's a (small) man in an oversized suit. That was another case of (using) the physical simulation, and of setting up rules for how cloth should behave. And the looser the clothing, the more it can behave badly."

Even Carl himself presented some animation difficulties, May said, because the character's head is shaped like a cube.

Even the face of Carl Fredricksen, the films main character, presented a new animation challenge. His face is presented in a cube-like shape, which represents his lifelong sense of being boxed in by soulless development. But for animators, making him smile was hard, since his mouth would have to curve around to the side.

(Credit: Pixar Animation Studios)

Like many other elements in "Up," the cube-shape of Carl's face wasn't a random whim of the director. Rather, it is a story element: May explained that Carl's character is based on someone who, as a young man, was vivacious and adventurous. But as he grew older, his small house became more and more surrounded by buildings, and "it's like his world has compressed him into a square."

Thus, a cube-like face. But May said animating his facial expressions, which must fit into this cube shape, was complicated. Smiles, for example, had to come up and wrap around his cheek.

Still, for the award-winning filmmakers at Pixar, the goal is to make even the hardest animation problems look simple on the silver screen.

As producer Jonas Rivera put it, "The audience looks at (the balloon cluster) and says, 'Oh, that's pretty.' But they have no idea how much work went into it. We worked on that for over a year. (Then) the kid takes off his hat and runs his fingers through his hair. My mother will never know that took 15 people six weeks."

On June 22, Geek Gestalt will kick off Road Trip 2009. After driving more than 12,000 miles in the Pacific Northwest, the Southwest and the Southeast over the last three years, I'll be looking for the best in technology, science, military, nature, aviation and more in Colorado, Utah, Idaho, Wyoming, Montana and South and North Dakota. If you have a suggestion for someplace to visit, drop me a line. And in the meantime, join the Road Trip 2009 Facebook page and follow my Twitter feed.

April 9, 2008 4:00 AM PDT

The physics of baseball

by Daniel Terdiman
  • 3 comments

SAN FRANCISCO--If you were at the Exploratorium here the other day, you might well have needed to be wary of flying objects.

That's because, way in the back of the world-class science exploration museum, senior scientist Paul Doherty was giving a primer on why the curveball--one of the most important pitches in baseball--curves.

Of course, being a hands-on kind of scientist, one who had kindly taken time out of his day to explain the physics of baseball, the only way Doherty could explain the science was to demonstrate it. So he was flinging balls everywhere, and boy were they curving.

Exploratorium senior scientist Paul Doherty demonstrates how to put spin on a ball and make it curve. The demonstration was part of a talk he gave on the physics of baseball.

(Credit: James Martin/CNET Networks)

Fear not, however. These were just foam balls, and even the one kid who got hit in the head barely noticed.

What was amazing, though, was that the kid who did take the ball in the head was far, far off the straight-line trajectory the ball began on. In fact, I would say that each time Doherty flung the ball--using a hand-made contraption designed to put a lot of spin on it--it must have curved off that trajectory by at least 45 degrees.

That's unlikely to happen with a real baseball, however, because of its weight. Whereas this foam ball weighed almost nothing.

Click here for video on baseball science: CNET News.com's Kara Tsuboi checks out the sweet spot on the bat and the stitches on the ball with the Oakland A's and with scientist Paul Doherty.

It turns out that for years, there was a whole school of thought that denied that a baseball could curve at all. Some, Doherty said, believed that because a ball falls with gravity, the "curve" was an illusion and wasn't in fact a side-to-side motion but rather a much easier to understand drop.

In 1949, according to an article in Science News, aeronautical engineer Ralph Lightfoot used a wind tunnel and high-speed photography to demonstrate conclusively that a pitched baseball could, in fact, curve.

And not just a little bit, Doherty said: Up to 17 full inches.

The science behind baseball

But why does the ball even curve in the first place? That's what my colleagues and I were there to find out, and Doherty did indeed learn us.

The answer boils down to the fact that the seams on a baseball "interact" with the air around the ball as it spins.

"It acts like a little rocket motor," said Doherty. "The spinning ball throws air down and behind" it.

One thing that's clear is that the ball must be spinning really fast, Doherty said. That explains why not everyone can throw a good curveball: It takes a lot of strength in a pitcher's arm and wrist to make the ball spin so quickly.

In actuality, the theory behind the curveball is quite simple. And if you extrapolate, it explains other pitches, and even rules in other sports, Doherty explained.

For example, he said that it is illegal, in golf, to use a ball that only has dimples on the sides because the ball will self-correct in flight and won't, in the end, curve way off track. Being able to control a tee shot, then, is what separates the pros from the weekend duffers. Really being able to control tee shots is what separates Tiger Woods from the rest of the pros.

But what about a knuckle ball or a spit ball?

Doherty said that a proper knuckle ball is thrown in such a way that the ball barely rotates at all--maybe one-and-a-half times between the pitcher and home plate.

With little spin, he added, the air goes turbulent as it encounters and flows around the ball and gets deflected to the side. And that means it's rather impossible to predict what the air will do and how the ball will move. A good knuckleball, in other words, wobbles all over the place and can be nearly impossible to hit.

Ah, but throw the knuckleball wrong and trouble happens to a pitcher.

"If you get it wrong," Doherty warned, "then you get a nice, fat, slow pitch that goes right across the plate."

In the big leagues, that's the recipe for a home run.

Speaking of home runs, the best way to hit one is to hit a pitch with the "sweet spot" on the bat.

So Doherty also spent some time explaining what that is, and why it matters.

Doherty also explained the physics of the 'sweet spot' on a baseball bat. To do so, he showed what happens when you hit a bat in various places with a mallet. Depending on where you hit the bat, energy goes to different places. When you hit the sweet spot, the energy goes straight into the ball.

(Credit: James Martin/CNET Networks)

Essentially, the sweet spot is the one area on a wooden baseball bat where, if the ball hits it there, the bat won't jump at all in the hitter's hands and where all the energy of the collision between the bat and the ball goes into the ball.

If the ball hits anywhere else on the bat, he explained, at least some of that energy is directed into the batter's hands, meaning the ball won't be hit as hard and also that there might be some pain involved.

"When you hit a ball with a baseball bat," he said, "sometimes it stings your hand and other times the ball just flies off the bat."

In other words, sometimes you don't hit the sweet spot, and sometimes you do.

To explain why hitting a ball sometimes hurts, he held a bat by the knob and smacked it over and over with a mallet. Where he hit it affected how the bat flew out of his hand.

When he hit the bat right in the center of its mass, he showed how the bat doesn't spin. And that results in the energy transferring to the batter's hands.

That's in part, he said, because the collision between the ball and the bat produced 8,000 pounds of force for a thousandth of a second, much of which goes into the hands.

The final score of a game, like this one between the Oakland A's and the Cleveland Indians often depends on who has more success, a pitcher trying to throw good curveballs or a hitter trying to hit pitches with the sweet spot of the bat.

(Credit: James Martin/CNET Networks)

If, on the other hand, the ball--or in this case, the mallet--hits the bat at the bottom of its barrel, it does spin.

So over and over, he smacked the mallet on the bat, and the bat flew, spinning, out of his hand. It must have been a rather odd sight for any passers-by.

This doesn't produce Hall of Fame hitters, he suggested. Instead, lots of ground outs.

But somewhere in between the barrel and the center of mass, there's a small point where, when hit by a ball--or a mallet--the bat produces a loud, satisfying "crack" and either the ball flies off it, or the bat shoots off the mallet without spinning, dropping directly away.

"It's the center of percussion," he said, "the place where you hit it, and it doesn't jump in your hands. There's a couple of inches to hit that home run."

The trick is, Doherty explained, the sweet spot is different on every bat. So in order to find it, it takes trial and error. We know it's between the center of mass and the end of the barrel, but where exactly depends on the individual bat.

But, regardless, the message is clear: "If you want to hit that home run on opening day," Doherty said, "hit that sweet spot."

  • prev
  • 1
  • next
advertisement

E-readers' next chapter--no happy ending?

There were plenty of e-book readers on display at CES 2010, but many question whether the market for such dedicated devices can support all the new entrants.
• Photos: E-readers at CES 2010

Inside the world's long-lost first microcomputer

Vintage computer historians have long revered the Altair 8800. As it turns out, an unknown computer project at Sacramento State beat the Altair by three years.
• Images: The first microcomputers

About Geek Gestalt

Daniel Terdiman, uniquely positioned to take you into the middle of another side of technology, chronicles his explorations of the "fun beat," from cultural phenomena such as Burning Man to cutting-edge aircraft to game conventions.

Add this feed to your online news reader

Geek Gestalt topics

Most Discussed



advertisement

Inside CNET News

Scroll Left Scroll Right