Limiting the Number of Particles in a System


Over the next series of exercises, you'll create a school of fish from a single fish object. Then you'll apply an Attracted To behavior to the fish so that they follow an object around the screen.

Opening the Fish School Project

First, let's open the 6-4 Fish School project, located in the Lesson_06 folder.

1.

Choose File > Open and select 6-4 Fish School from the Lesson_06 folder.

The project opens with a single fish in the center of the Canvas.

2.

Choose File > Save As and save the project in the My Motion Projects folder on the Desktop.

Creating Particles from the Selected Object

Particles don't necessarily have to spray, sparkle, explode, or continually flow out of the emitter. You can set the initial number of particles and limit the Birth Rate parameter so that new particles are not born every second. That way, you have the benefit of turning one object into many, without a steady flow of new particles. This technique is commonly used for emulating naturefor creating a flock of birds, leaves on a tree, or even a school of fish, for example.

In this part of the exercise, your goal is to create a school of fish. A school of fish is not a shower of fish or an explosion of fish. Therefore, the creatures shouldn't be sprayed out of the emitter like the AquaBall particles were. Instead, you'll modify the emitter parameters to start with an initial number of fish. You'll also need to control the fish population in this exercise by setting the Birth Rate to 0. Let's try it.

1.

Click the fish object in the center of the frame to select it.

2.

Press the spacebar to begin playback, if the project is not already playing.

3.

Press E to create a particle emitter from the selected object.

The frame fills with fish. What did I say about controlling the fish population? Let's modify the Birth Rate and Initial Number parameters in the Inspector.

4.

Press Cmd-3 to open the Inspector.

The Inspector opens with the Emitter tab selected.

5.

On the Emitter tab in the Inspector, drag the Birth Rate slider all the way to the left to change the value to 0.

The fish vanish from the Canvas. Now let's change the Initial Number parameter to 20 to create a school of 20 fish.

6.

On the Emitter tab, type 20 in the Initial Number value field and press Return.

Twenty fish appear in the center of the Canvas and move away from each other as the project plays.



    Apple Pro Training Series Getting Started with Motion
    Apple Pro Training Series: Getting Started With Motion
    ISBN: 0321305337
    EAN: 2147483647
    Year: 2005
    Pages: 283
    Authors: Mary Plummer

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net