Tuesday, December 13, 2016

Creating Stereoscopic 3D Images

Note: these images require Red/Cyan anaglyph 3D glasses to be viewed properly. Click for full size!

Saturday, November 19, 2016

Bonus Points: Lighting a Scene in Maya




Building a Scene in Maya

The Science Behind Pixar Exhibition!

I went to "The Science Behind Pixar Exhibition" at the California ScienCenter, and it was INSANELY COOL.

The exhibit hosted recorded interviews from Pixar employees on "What's it like to work at Pixar", hands-on demos on each part of the production pipeline––my favorite was the simulation demo: Pixar rendered clips from some of their movies with and without certain simulations (hair/fur, water, crowds) and gave the museum guest the power to switch back and forth between the same scene with and without the simulations.

The drive down to LA from SJ was 5 hours, but honestly I'd do it again just to see this exhibit alone. Maybe one day I'll be in one of the black boxes in the exhibit talking about what I do at Pixar... :)

Tuesday, November 8, 2016

Character Animation

To create this animation, I used Dragonframe and my DSLR to capture the frames, and After Effects to put the frames together and export as a video. The motion and physical posing was done using my bare hands. Unfortunately, I recorded an extensive amount of video and did not have the time to edit it all, so I chose the clip with the most movement as my animation.
Character Animation from Justin Tennant on Vimeo.

Tuesday, November 1, 2016

Science Fact or Cinematic Fiction

Gravity! It’s that invisible force keeping us all anchored to this lovely home we call Earth. The effects of gravity combined with other known properties of physics such as inertia and air resistance give us the physics of trajectories, otherwise known in the animation world as paths of actions. When we toss a ball up in the air, we expect it to rise and decelerate to a peak point, then fall and accelerate until we catch it, following a parabolic path. This is a fairly intuitive and natural property of physics: moving objects will display parabolic paths of actions due to the force of gravity, with their arc curves and lengths determined by their inertia and drag amount due to air resistance.

Say for instance, a ball is thrown in the air. Due to gravity, the ball quickly decelerates as it rises. As it reaches the apex height, instead of stopping, it continues rising for a few seconds at a constant slow velocity. Then suddenly, the ball drops as normal. Strange behavior, right? Such a deviation of standard “physics protocol” would be very visually noticeable - an observer would surely spot the odd floating ball, and maybe remark about forgetting to take their pills. Oddities like this don’t ever happen in real life (thank goodness), but they certainly do happen in fictional worlds artists create, like in films and movies. Sometimes erroneously, and sometimes intentionally, filmmakers have occasionally forgone the rules of paths of actions in their visual creations. This has resulted in clips and scenes that, had the clip or scene played out in real life, the moving objects would have had very different arcs, and thus, very different overall outcomes. Here we begin our analysis of three separate films, each chosen with one physics-defying scene that illustrates an improper path of action.

Los Angeles, CA – the year is 1994. A certain Hollywood actor Keanu Reeves is starring in an action thriller film Speed, in which a certain bus has been rigged with explosives. Keanu, an LA city cop, is told by the bomber via phone that if the bus accelerates to 50 mph or more, the bomb will activate, and if the bus then decelerates to 50 mph, the bomb will detonate. Keanu races to said bus, just barely making it aboard when the bus hits 50 mph. Plot and certain small events happen onboard the bus. What’s important to know is that Keanu manages to keep the bus above 50 mph through it all – nicely done Keanu.

Until the bus approaches this: the unopened 105 Freeway. Keanu learns that a portion of the freeway is incomplete – on the overpass the bus is heading towards, there is a sizable gap separating one side of the overpass from the other. With his keen Hollywood logic and LA cop bravery, Keanu forces the driver to put the petal to the metal in an attempt to jump the gap. The scene is tense, thrilling, and undoubtly entertaining – the bus slowly accelerates, approaches the gap, and… raises into the air? Huh? Let’s take another look at this scene.

At the moment the bus’s front wheels approach the edge of the gap, the entire front of the bus suddenly rises up, as if there was a perfectly angled ramp placed conveniently on one side of the gap. But in the shot displaying the gap, there is no ramp to be found. Could it have been an act of God, a helping hand from an otherworldly deity, who ever so slightly tugged an invisible string attached to the front of the bus, leading Keanu and his people to safety? Perhaps so. But in reality, if the bus were to approach the gap with no ramp in sight, the bus would have no lifting force to propel its front up as seen in the movie. Rather, the inertia of the bus would cause it to continue moving straight forward past the edge of the gap. At the same time, the heavy weight of the bus (aka gravity) would cause the bus’s pitch (aka lateral axis) to tilt downwards, along with its velocity, leading to a parabolic path of action headed downward for the bus and subsequently the bus missing the other end of the gap. Had this scene been filmed with a bus really physically jumping the gap, we would be in tears, knowing that Keanu Reeves and Sandra Bullock never would have survived the jump, which would mean we would never get The Matrix, The Proposal, The Heat, or Gravity.

Cue our next movie – Mac and Me, a fully-featured McDonald™’s sponsorship film released back in 1988. Considered by none to be a necessary spiritual successor to E.T. the Extra-Terrestrial, Mac and Me is without a doubt a delightful watch. In a certain Academy-award deserving scene, our main wheelchair-bound character Eric Cruise (played by Jade Calegory) spots the visiting alien outside his home and tries to chase after him. Instead, Eric loses control of his wheelchair and begins to quickly descend down a hill. He then reaches the end of the hill, and unfortunately the beginning of a sharp cliff. Eric flies off the cliff and falls down to the lake below, where more Academy-award deserving acting continues.

Hold the phone though – we see the angle of the hill in one shot, the width of the lake in another, and in the falling scene, Eric is dropping straight down? That’s not quite right. Had Eric really continued his descent off the hill and down the ravine, his path of action would have been in a parabolic arc, due to his high inertia (from his high speed). Realistically, Eric would not have landed in the lake; rather, his parabolic path would have lead him into the rocks on the far side of the ravine. The filmmakers wouldn’t have the kindness to end Eric’s suffering early, and they knew they couldn’t end the film without getting to the McDonald™’s birthday party scene. Thus, we are gifted with this iconic falling scene, forever locked in history.

We are now at our final movie, and final scene, to be analyzed. Kung Fury, an independent short film released in 2015, is without doubt, the coolest martial-arts cyberpunk movie released that year. Regardless of how much I encourage everyone to watch this movie, it certainly has select scenes that some would say “stretch” the rules of reality.

In an early character backstory-building scene, our main hero and city cop Kung Fury loses his partner to a sudden ninja attack. In a series of lightning and cobra strikes, Kung Fury is gifted with the power of kung fu, and proceeds to smack the living daylights out of the enemy ninja. Specifically, Kung Fury kicks the ninja into the air, then jumps up to follow the ninja’s ascent. A second shot shows Kung Fury approach the ninja in mid-air, kicking them downwards, and continues flying up into the air. The final shot of the scene shows the ninja landing on an appropriately gas-filled tanker truck, causing it to explode, while Kung Fury lands in the foreground in an impressive classic Jean-Claude Van Damme split pose.

I will come out and say that if this scene were portrayed realistically, there would be many, many things that could not and would not happen as shown in the film. Putting that aside and nitpicking just this one scene however, we can assume that Kung Fury has an impressive jumping and kicking ability. Still, no highly skilled jumper could ever jump in the air, kick another person to the ground, and continue ascending into the air without a natural parabolic path of action. It’s just not fathomable. We see no realistic deceleration in the ascent, no acceleration in the descent, and no peak/apex of Kung Fury’s arc. Kung Fury’s weight should have at least slowed him to a stop at some given height, and then descended and accelerated due to gravity. Here's the full scene:

To conclude, in looking at all three of these films and their erroneous scenes, some of them we can forgive in the name of good, fun film. In the effort to provide a thrilling moment, to continue the plot, or to give a good laugh, sometimes forgoing science and physics is necessary in telling a good story. Had all of these films been shot with realistic physics shown, each moving object should have visually indicated a parabolic path of action. However, we are given some scenes that look a little funny, or are actually really funny, but all are undeniably entertaining.

Monday, October 31, 2016

The Animation Show of Shows!

Hey, check it out!

I went to the Animation Show of Shows screening this weekend. It's a tastefully curated collection of animated shorts from all over the world. In my opinion, this year's selection was fantastic. I was awed, surprised, shocked, amazed, and amused from nearly all the shorts. Easily worth the $7 I paid. I would highly recommend the event to anyone with an interest in animation. Go see it!

Tuesday, October 25, 2016

Outline for the Second Term Paper

1.     Introduction
a.     Paths of actions
                                               i.     Due to acceleration, gravity, and inertia
b.     Thesis: In certain scenes, some films lack proper parabolic paths of actions.
2.     Speed (1994 film)
a.     Bus is required to keep a certain speed, or else a bomb attached underneath will detonate; certain events lead the bus to an incomplete highway overpass with a large gap
b.     Path of action should lead the bus in a downward arc towards the ground, but instead the bus is lifted by an “invisible force” and completes the jump
c.     Directors/producers likely aware of improbability for bus to make the jump, but allow it for thematic purposes
3.     Mac and Me (1988 film)
a.     Eric, a wheelchair-bound boy, spots and chases after a visiting alien (MAC). Eric begins to roll down a hill and loses control of his wheelchair, eventually falling off a cliff into a lake
b.     The angle of descent down the hill doesn’t match the arc-lacking drop in the falling shot, making the jump from the hill rolling shot to the lake falling shot pretty hilarious. Eric should have followed a parabolic arc that probably would have lead him to hit the rock wall on the other side of the lake
c.     Likely unintentional error (poor cinematography/visual effects), and was not re-recorded/fixed due to low production value.
4.     Kung Fury (2015 film)
a.     In an early scene where Kung Fury gains his kung fu powers, Kung Fury kicks the enemy ninja into the air. He then jumps up in the air with seemingly instant velocity and no deceleration, kicks the ninja down, and continues flying up
b.     Next shot, shows him landing in a classic Jean-Claude Van Damme split pose
c.     Realistic arc (for any human capable of jumping that high) would have a natural arc to Kung Fury’s jump with a deceleration and eventual speed of 0 (for a brief moment) at the apex of the arc, which is not shown at all in the scene
d.     Intentional breakage of physics laws for comedic effect
5.     Conclusion
a.     Some films break physics erroneously, and some do it consciously for comedic effect or to complete a plot point.

b.     Kung Fury should not be taken seriously, but is highly a recommended watch

Tuesday, October 11, 2016

Stop Motion Animation of Falling

For this assignment,  I wanted to make something more out of the required fall, so I decided to create a little story with it. I created this animation using my DSLR, Dragonframe, and too much free time.

For the intro walking scene, about half of the shots required a counterbalance for the teapot to stay standing, so I used an extended paperclip to hold it into place. I set up a "key light" with my desk lamp and used a tripod to stabilize all the shots.

In the shower scene, I used a combination of paperclips and a swiss army knife (it was the only thing I had nearby that was strong enough to hang the teapot from!) to pose the teapot, both on top of the bar and in mid-air. For the actual drop, the frames were planned ahead using the odd rule to calculate the distance per frame of the falling teapot.

After shooting, I compiled the frames together in After Effects, did some editing to remove my hands and paperclips, and added some music and sound to liven up the animation. The animation was shot on twos, but I lengthened certain frames for dramatic effect/editing.

Tuesday, October 4, 2016

The Laws of Physics in an Animation Universe - WALL-E

WALL-E is a feature animated film by Pixar Animation Studios, released in 2008. The movie illustrates a story of a dystopian future Earth, where humans have departed from the planet and left it in a trashed state, with only an army of compacting “WALL-E” robots to clean it up. As it turns out, a single WALL-E lives on amongst the army during the 700 years of the humans’ absence, who has gained sentience and a charming personality. WALL-E ends up finding a healthy plant amongst the trash, and is later visited by a scouting robot, EVE, who retrieves the plant. WALL-E, who is infatuated with EVE, hitches a ride on EVE’s ship back to her “mother” ship, the Axiom, and the rest is Disney film history.

Part of WALL-E’s great appeal is its relatability – the two main characters WALL-E and EVE are stylistically robotic machines, but with clear humanistic personalities and emotions. The interactions between the two emulate a classic, one-sided, head-over-heels in love relationship which certainly power the film’s romantic storyline. But what really sells the film’s relatability and belivability is their realistic physical appearances, and the realistic physics of their actions and the world around them. To engage the audience in the film’s story, the laws of physics in the animated world of WALL-E were developed intentionally to be highly similar to real-world physics. Some of the many laws of physics Pixar emulated in their film have been chosen to be examined in this essay; we will begin with action & reaction.

As stated in Isaac Newton’s third law of motion: “When one body exerts a force on a second body, the second body simultaneously exerts a force equal in magnitude and opposite in direction on the first body.” This is a familiar concept to most of us: we perform a physical action, like a push or a pull, and expect an equal force in the opposite direction. Animators commonly use this action/reaction property for producing anticipation, in order to allow audiences to see certain actions on screen and have said actions feel realistic. In WALL-E, the animators used this law to not only demonstrate realism, but provide dramatic and humorous effect. The “Define Dancing” clip seen below is an iconic scene from WALL-E, showing WALL-E and EVE flying around the Axiom exterior in a synchronized swirling dance. WALL-E is propelling himself through space using a fire extinguisher – this is certainly possible in reality! With the expulsion of the fire extinguishing agent, there is a significant enough force to push a human with low friction. This has been demonstrated in videos online (https://www.youtube.com/watch?v=8lCGw6Ta-l0), and in WALL-E’s case, a small robot in an essentially friction-less space could accelerate very quickly from the force of the extinguisher.

Another scene that demonstrates the action/reaction property is at the first quarter of the film, when EVE ends an angered outburst by blowing up the beached ship that had inadvertently trapped her with its crane-hanging magnet earlier. As the ship blows up and tips over, it collides into the ship next to it, causing that ship to slowly tip and collide with the one further down, and so on. Similarly to how domino blocks fall and the action/reaction property that enables them to, the ships fell in a cascading manner that required an action from the previous ship tipping over to cause the reaction of next ship tipping over.

One more instance that illustrates the action/reaction property is shown numerous times in the second half of the film, onboard the Axiom. Due to the microgravity environment and reliance on automated crew and hoverchairs, the futuristic humans have lost most of their motor controls and gained significant weight. In several occasions, some humans are shaken, bumped into, or fall off their hoverchairs, with their bodies jiggling and reverberating like jelly. Just like a water balloon might vibrate after falling to the floor, the animators did an amazing job recreating the gelatinous effect in the humans’ bodies. Even in the scene with the captain’s fight with the auto-pilot system “Auto”, as the captain grabs hold of Auto and is swung around, his body shakes and swings, illustrating his weight and a reaction to Auto’s rotational action.

Inertia and drag are two other physical properties that Pixar emulates impressively well to further the realistic look in the film. Newton’s first law of motion, “An object either remains at rest or continues to move at a constant velocity, unless acted upon by a net force”, is the usual baseline description of inertia. We see it in play in a number of scenes:

Near the end of the film, the captain loses control of the steering to Auto, who begins to tilt the Axiom on its side. A high angle shot from inside the ship shows all the human passengers beginning to fall and eventually roll to one side of the ship. A following shot shows one passenger who slides past another, reaching their hand out desperately to grab something or someone to stop their descent. A stationary passenger grabs hold of one falling person, but upon grabbing the hand of another, the stationary passenger himself begins to fall off of his hoverchair and down to the side of the ship. The friction of the passengers’ suits and the floor keeps them from accelerating too quickly, but the inertia of their large bodies prevented the one stationary passenger from saving the other two.

Another scene which demonstrates the properties of drag is one of the Axiom bridge scenes, where the captain has just acquired the plant for the first time and is watching a recorded video of some dancers. As the captain shakes the plant in time with the dancers, a leaf falls off the plant and drops slowly in a classic side-to-side spinning motion, typical of real leaves. This is a realistic replication of the inertia and air resistance (which is essentially drag) property of leaves, due to the simulated gravitational pull inside the ship’s bridge.

A final set of properties that Pixar aimed to replicate realistically are magnetics and heat – while they were less prominent in the film compared to the other properties mention earlier, these details are worth pointing out for their accurate replications:

In a scene mentioned earlier with EVE blowing up a beached ship, a few seconds before she shoots the ship, EVE was trapped by a large hanging magnet on a crane of the ship. Realistic to how a metallic object (like EVE) would react, as she first flew over the ship, the magnet above her slowly rotated to follow her path. As she stopped to think, the magnetic pull lifted her and violently collided her into the magnet, leaving her trapped. Only until she used her ray gun to explosively exit the magnet could she manage to escape the magnetic pull. Given a real magnet used in real-life shipyards, a metallic object like EVE could easily be similarly “stuck” to it.

Finally, the physical properties of heat are shown in the film in various scenes – when objects accumulate large amounts of heat, they typically emit electromagnetic radiation visible to our eyes in the form of color (blackbody radiation). An object can visibly glow at a certain temperature, depending on its material, but can be estimated by the color too. In the scene of the film that shows the descending ship containing EVE, as WALL-E rises from his hiding spot in the rocks directly below where the ship landed, the rocks are shown to be red hot as a result of the high temperature from EVE’s ship rockets. Another scene early in the film with WALL-E naively waiting for EVE to wake up atop his trailer replicates a property of heat in air (convection), and how it produces a mirage called heat haze. The blurred shimmering effect shown in the foreground of the shot is the realistic emulation of that property.

With a film like WALL-E, Pixar knew that convincing the audience of the reality of “the last robot on Earth” would have been difficult if it were ‘cartoonized’ too strongly. The connection to the main character would have been lost, and the story arc less impactful. In that effort to connect the audience to the world of WALL-E, the physics of WALL-E were made to highly mimic the real word. The success brought on by the film reveals the truth to this theory, and sealed it in history as one of the best animated films of all time.

A closing note: on the development and animation of the robot characters, Andrew Stanton, director and co-writer of WALL-E, said in an interview, “We wanted the audience to believe they were witnessing a machine that has come to life. The more they believe it’s a machine, the more appealing the story becomes. I kept trying to make the animators put limitations on themselves, because I wanted the construction of the machines and how they were engineered to be evident,” Stanton added. “The characters seem robotic because they don’t squash and stretch.”

As the director himself fantastically stated, Pixar intentionally did not squash and/or stretch the robot character animations. To keep the illusion of the robots as real functioning machines, Pixar intentionally limited the rigs to only allow realistic motion and movement – no heavy manipulation of the model shapes allowed. In both physics and animation, Pixar kept the magic alive through realistic imagery.

Note about outline: I've taken out a few examples from the outline that I felt were weak + replaced the counter-arguments section with my note about realistic animation.

Monday, September 26, 2016

First Term Paper (Outline) - The Physics of WALL-E's World

1.     Introduction
a.     Animated film: “WALL-E”, 2008. (98 min)
b.     Thesis: The laws of physics in the animated world of WALL-E were developed intentionally to be highly similar to real-world physics.
2.     Action / Reaction
a.     Wall-E propelling himself around space with a fire extinguisher  (58:50)
b.     Eve blows up one of the beached ships – it slowly tilts and falls into another beached ship, which tilts and falls into another ship, in a domino effect-like fashion (21:45)
c.     In essentially every scene with a human in their floating transportation units, every turn/acceleration of the unit jiggles their bodies.
d.     In one part of captain’s fight with Auto, the captain grabs hold of Auto and is swung around. His swinging motion illustrates his weight and a reaction to Auto’s rotational action (1:18:42)
3.     Inertia & Drag
a.     As the spaceship captain loses control of the wheel and the Axiom, the ship, begins to tilt, the human passengers begin to fall/roll their way to one side of the ship (1:20:30)
b.     In the trash disposal area, when the disposal robot engages the air-lock and closes off the disposal room from space, all the debris fall to the ground in an arc, illustrating the re-activation of gravity & their inertia (1:13:33)
c.     As Wall-E holds on to Eve’s ship during its return to the Axiom, his body slowly ascends away from the ship, illustrating his inertia + lack of air resistance and gravity in space (35:09)
d.     Leaf falls off plant in shoe and falls slowly in a classic side-to-side/spinning motion typical of light/feathery objects, due to air resistance/drag (1:05:02)
4.     Magnetics / Heat
a.     Eve is trapped by a strong industrial ship magnet, due to her being made of a magnetic/metallic material (21:25)
b.     After Eve’s ship arrives on Earth, in a close-up shot of Wall-E slowly rising from his hiding spot in the rocks, the rocks are shown to be red-hot, a result of Eve’s ship’s landing rockets (13:55)
c.     The heat waves shown in the foreground of an early scene with Wall-E naively waiting for Eve to “charge” (29:35)
5.     Counter-arguments
a.     Induction & Lightning
                                               i.     Wall-E being electrocuted by holding up his umbrella; unlikely chance since the buildings in the background are far taller, but for humorous effect (29:52)
b.     Action / Reaction
                                               i.     Wall-E opens Eve’s arm to hold her hand, and her arm suddenly slams closed on Wall-E’s hand after a pause, for humorous effect (30:43)
                                              ii.     After being electrocuted by the ship’s autopilot system, Wall-E dramatically wavers and then falls into the bridge chute, instead of immediately dropping (1:11:15)
6.     Conclusion
a.     In an effort to connect the audience to the Wall-E world, the physics of Wall-E’s world highly mimics the real world.

b.     Certain scenes call for dramatized physics, for comedic/dramatic purposes.