|Page (1) of 5 - 09/14/04||email article||print page|
An Introduction to Motion, Part 2Behaviors and behavior modification
Behaviors, as we've discussed in previous articles, are procedural animation presets, meaning that they cause objects in your composition to animate without the use of keyframes. For our project this week, we'll take a look at the creation of a Pong simulation, which, though simple on the surface, introduces several different types of Behaviors and requires a little Behavior modification that is, as of this writing, completely undocumented. The purpose of this exercise, then, is not to show you how to create a specific effect, but to get you thinking about the ways in which Behaviors can be used to achieve results that could otherwise take a considerable amount of manual keyframing. Here's the result we'll be going for this time around.
Now, keep in mind that this entire animation uses only one keyframe (when the ball exits the screen). The paddles track the ball automatically, and the ball moves around and bounces all on its own. All with no scripting. In case you're wondering, the heretofore undocumented trick in this animation is constraining the X positions of the paddles, while still moving up and down to hit the ball when it approaches them. We'll take a look at that as well. (No, it doesn't involve converting the Behavior to keyframes.)
The base elements
This entire composition consists of eight objects, a couple of filter effects and several Behaviors. All of these have been created directly in Motion. If you'd like, you can download my complete project to help you see how things are arranged. It's available here (16 KB). Otherwise, if you'd like to build it from scratch, it's not difficult to do. The static elements include the border, the half-court line and the top text objects. (When the score changes, I'm simply replacing one text object with another.) The animated elements--highlighted below and shown with their motion paths in red--include the ball and the two paddles.
We won't concern ourselves with the creation of any of these elements (just simple primitives), but focus instead on the animation of the elements.
Creating the animated ball
To begin, we'll work with the ball. You can begin by positioning it anywhere in your composition (or outside the comp window, if desired). This involves two Behaviors. The first, Throw, is located in the "Basic Motion" category in your Library palette.
Apply this Behavior (and all others) by simply dragging it onto the appropriate object in your Layers palette.
Related Keywords:apple motion, behaviors
To Comment on This Article, Click HERE
Most Recent Reader Comments:
Click Here To Read All Posts
Must be Registered to Respond (Free Registration!!!, CLICK HERE)
Source:Digital Media Online. All Rights Reserved