Particle Systems Controlling Groups of Objects: Particle Systems Flocks and Schools A complex, fuzzy system represented by a large collection of individual elements. Each element has simple behavior and appearance. Interactions between elements are usually ignored. Typical Time Step New particles are generated. Each new particle is assigned attributes. Particles that have exceeded their allocated life span are terminated. Remaining particles are animated (their state is updated). Particles are rendered. Particle Generation Particles are typically generated according to a controlled stochastic process. Example: use a normal distribution with some mean and variance to determine the number of particles generated in every frame. Parameters may vary spatially and temporally.
Particle Attributes Position Velocity Shape parameters Color Transparency Lifetime All of the above are typically randomized. Animation and Rendering Animation: All attributes may be animated (updated at each time step). Rendering: Each particle is displayed as a self-luminant luminant object no need for hidden surface removal no need for shadowing Explosions: Fireworks
Plants Plants Artistic rendering Flocking Behavior Motivation: simulate aggregate group behavior, such as the emergent behavior found in flocks of birds and schools of fish Fewer individuals than a particle system Individuals have some intelligence Simple interactions among individuals
Flocking Principles Collision avoidance: Relative to other flock members Relative to other obstacles in the scene Flock centering: Members in the middle of a flock tend to stay that way Members on the border tend to veer towards their neighbors on one side Local Control Physics: gravity, collision detection, colllision response (like in a regular particle system) Perception: concerns the information about the environment available to each member Reasoning and reaction: A module that negotiates among the various demands produced as a result of perception takes care of collision avoidance and flock centering Velocity matching Interaction with Other Members Goal: maintain separation without collision, while maintaining membership Interaction with Environment Goal: collision avoidance Usually achieved by force fields Attractive force among flock members Stronger (but shorter range) repulsion force from individual members
Global Control There is usually a global goal used to control and direct the flock: goal influences entire flock goal influences only the leader Example: animator scripts the path that the leader should follow. Negotiating the Motion Three low-level level controllers: collision avoidance velocity matching flock centering Each controller results in a desired velocity vector The task is to negotiate a resultant velocity vector given these desires Negotiating the motion Coping with Complexity Flock members to avoid Migratory urge Flock centering Velocity matching Physical constraints controls Navigation Module Pilot Module Flight Module Objects to avoid External forces e.g., wind Final desired velocity vector Current status Motion to be implemented mechanisms Flight articulation Naïve implementation will have O(n 2 ) complexity. Since interactions are limited to nearest neighbors, need to efficiently locate k nearest neighbors of each member. This may be achieved using a spatial data structure (3D grid).
Collision Avoidance Position a limited-extent extent repelling force around each object. Far away members are unaffected Nearby members are affected (force becomes stronger as distance becomes shorter). Some Problems Prevents flying in parallel to obstacle What if the object flies directly towards obstacle? Steer to Avoid Steer to closest point on boundary sphere Steer to closest point on boundary of silhouette Steer to first non-intersecting feeler Steer to closest background point of projection.