Particles, Flocks, Herds, Schools

Similar documents
Behavioral Animation Simulation of Flocking Birds

Flocking and Steering Behaviors : Computer Graphics April 08, 2010

The 3D rendering pipeline (our version for this class)

Topology Control and Mobility Strategy for UAV Ad-hoc Networks: A Survey

Overview. Swarms in nature. Fish, birds, ants, termites, Introduction to swarm intelligence principles Particle Swarm Optimization (PSO)

Computers in Film Making

Computer Animation. CS 445/645 Fall 2001

Fundamentals of Computer Animation

Animation. Persistence of vision: Visual closure:

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 9 The Game Engine

Today. Keyframing. Procedural Animation. Physically-Based Animation. Articulated Models. Computer Animation & Particle Systems

CS 4204 Computer Graphics

Massive Battle: Coordinated Movement of Autonomous Agents

Path Tracking for a Miniature Robot

C O M P U C O M P T U T E R G R A E R G R P A H I C P S Computer Animation Guoying Zhao 1 / 66 /

Chapter 1. Animation. 1.1 Computer animation

Ground Rules. PC1221 Fundamentals of Physics I. Kinematics. Position. Lectures 3 and 4 Motion in One Dimension. Dr Tay Seng Chuan

Project 2: Character Animation Due Date: Friday, March 10th, 11:59 PM

CHAPTER 6 TEXTURE ANIMATION

Republic Polytechnic School of Information and Communications Technology C391 Animation and Visual Effect Automation.

IMGD 1001: The Game Art Pipeline

2.5 Physically-based Animation

CS 325 Computer Graphics

Computer Animation and Visualisation. Lecture 1. Introduction

Extraction of Satellite Image using Particle Swarm Optimization

Module 3 Crowd Animation Using Points, Particles and PFX Linker for creating crowd simulations in LightWave 8.3

Keywords - animation, e-learning, high school, physics lesson

INTRODUCTION TO RENDERING TECHNIQUES

CS277 - Experimental Haptics

Halliday, Resnick & Walker Chapter 13. Gravitation. Physics 1A PHYS1121 Professor Michael Burton

Introduction to. With Slides from Dongho Kim and Karen Liu. School of Computer Soongsil University Animation. Computer Animation

Digital 3D Animation

NECESSARY AND SUFFICIENT CONDITIONS

Review Vocabulary force: a push or a pull. Vocabulary Newton s third law of motion

UNIT: PSYCHOLOGICAL RESEARCH

CS 4300 Computer Graphics. Prof. Harriet Fell Fall 2012 Lecture 33 November 26, 2012

Sensor Modeling for a Walking Robot Simulation. 1 Introduction

The STC for Event Analysis: Scalability Issues

From Self-Organising Mechanisms to Design Patterns

CS130 - Intro to computer graphics. Dr. Victor B. Zordan vbz@cs.ucr.edu Objectives

Thea Omni Light. Thea Spot Light. Light setup & Optimization

GUI GRAPHICS AND USER INTERFACES. Welcome to GUI! Mechanics. Mihail Gaianu 26/02/2014 1

FLUID FLOW STREAMLINE LAMINAR FLOW TURBULENT FLOW REYNOLDS NUMBER

Robotics. Lecture 3: Sensors. See course website for up to date information.

Eðlisfræði 2, vor 2007

Animation (-4, -2, 0 ) + (( 2, 6, -4 ) - (-4, -2, 0 ))*.75 = (-4, -2, 0 ) + ( 6, 8, -4)*.75 = (.5, 4, -3 ).

Behavior Analysis in Crowded Environments. XiaogangWang Department of Electronic Engineering The Chinese University of Hong Kong June 25, 2011

C0600 Technical Report. Computer Animation in Java Emergent Behaviour in Autonomous Agents

Example Chapter 08-Number 09: This example demonstrates some simple uses of common canned effects found in popular photo editors to stylize photos.

MS INFORMATION SHEET DRIVING WITH MS. How can MS affect my ability to drive? Simultaneous coordination of arms and legs necessary when changing gears.

Chapter 7 Momentum and Impulse

Procedural Animation. An introduction

Lecture PowerPoints. Chapter 7 Physics: Principles with Applications, 6 th edition Giancoli

CHAOS, COMPLEXITY, AND FLOCKING BEHAVIOR: METAPHORS FOR LEARNING

CAD and Creativity. Contents

Blender 3D Animation

Deferred Shading & Screen Space Effects

Behavioral Animation Modeling in the Windows Environment

A Short Introduction to Computer Graphics

Tutorial: Creating Platform Games

Graphics. Computer Animation 고려대학교 컴퓨터 그래픽스 연구실. kucg.korea.ac.kr 1

3 Ways Your Web Design Can Better Connect You to Your Audience

Adding Animation With Cinema 4D XL

Our Guide to Customer Journey Mapping

COMP Visualization. Lecture 15 Animation

cs171 HW 1 - Solutions

Pristine s Day Trading Journal...with Strategy Tester and Curve Generator

Designing Behavior-Based Systems

Introduction to Computer Graphics. Reading: Angel ch.1 or Hill Ch1.

Graphic Design. Background: The part of an artwork that appears to be farthest from the viewer, or in the distance of the scene.

Character Animation Tutorial

3D U ser I t er aces and Augmented Reality

Chapter 9- Animation Basics

NUMERICAL ANALYSIS OF THE EFFECTS OF WIND ON BUILDING STRUCTURES

SkillsUSA 2014 Contest Projects 3-D Visualization and Animation

Blender in Research & Education

Kinematics & Dynamics

Figure 3.5: Exporting SWF Files

Mount Laurel Township Schools Visual & Performing Arts Curriculum Grades Pre-K-8. Adopted by the Mount Laurel Board of Education on August 25, 2009

CSC384 Intro to Artificial Intelligence

Solving Simultaneous Equations and Matrices

Social Perception and Attribution

A Cognitive Approach to Vision for a Mobile Robot

Simulation of Crowd Problems for Computer Vision

Fire Simulation For Games

MovieClip, Button, Graphic, Motion Tween, Classic Motion Tween, Shape Tween, Motion Guide, Masking, Bone Tool, 3D Tool

Effective Use of Android Sensors Based on Visualization of Sensor Information

Explore 3: Crash Test Dummies

Introduction to Computer Graphics

HOW TO CHANGE NEGATIVE THINKING

Tutorial 13: Object Animation

CS100B Fall Professor David I. Schwartz. Programming Assignment 5. Due: Thursday, November

Transcription:

CS 4732: Computer Animation Particles, Flocks, Herds, Schools Robert W. Lindeman Associate Professor Department of Computer Science Worcester Polytechnic Institute gogo@wpi.edu

Control vs. Automation Director's imagination -> infinite Time to make movie/game -> finite Budget to make movie/game -> finite Number of animators -> finite Q: What to do? A: Automate the animation process Other benefits: Movement can be made more organic Mimics some rules of nature Can scale number of elements As long as you scale processing power! 2

Particle Systems Good at modeling "fuzzy" objects Dynamic and fluid Fire, clouds, water Stochastic procedural modeling Complex systems can be modeled with little human effort Level of detail can be adjusted fewer particles 3

Particle Systems: Examples Genesis Effect from Star Trek II 4

Basic Model of Particle Systems A collection of many minute particles For each animation frame: New particles are generated, and assigned a set of properties Old particles die, and are removed Remaining particles change their properties, e.g., position, shape, color The frame is rendered based on this new state Creation and attribute manipulation are procedural Can be the result of computations 5

Changing Particle Properties How should the properties of the particles change over time? Where does each particle move to? How does its color change? Can be based on anything Look at neighboring particles Look at scene objects, like obstacles Look at time Look at distance traveled Look at anything you want! 6

Basic Algorithm Set up particle While Animation In Progress If Particle Not Dead Then Add Particle Direction * Speed To Particle Position Add Particle Acceleration To Particle Speed Modify Particle Speed Modify Particle Energy If Particles Energy < Threshold Then Mark Particle As Dead End If If Particle Hits Object Then Modify Particle Position, Direction, Speed and Energy End If Display Particle End If End While 7

Example: Movement of Particles S t is the state of all particles at time t At t=0: S 0 Images: Greg M. Johnson (http://www.geocities.com/pterandon/boids.html) 8

Example: Movement of Particles Compute the influence of all other particles within some range Attraction, repulsion Images: Greg M. Johnson (http://www.geocities.com/pterandon/boids.html) 9

Example: Movement of Particles Add all forces together, and use that to update the current position Images: Greg M. Johnson (http://www.geocities.com/pterandon/boids.html) 10

Example: Movement of Particles Wait, there might be other forces Whatever the goal is of the scene Images: Greg M. Johnson (http://www.geocities.com/pterandon/boids.html) 11

Example: Movement of Particles Again, sum these as the forces on the particle Repeat these steps for each particle Images: Greg M. Johnson (http://www.geocities.com/pterandon/boids.html) 12

Particle Systems: More Examples Fire Explosions 13

Particle Systems: Final Thoughts In many cases, ignore self collisions What does it look like when two fire particles colliding? Very general framework! We can make special cases to get specific effects Just change rules, objects, etc. How would you represent this system in code? 14

Flocks, Herds, and Schools A flock consists of a group of discrete boids moving in a visually complex fashion. There appears to be some central control, but evidence indicates that the motion is just the aggregate result of individual object motions. Problem How do we simulate the motions of a flock in computer animation? 15

Behavioral Systems Special instance of particle systems Flock is a group of objects that exhibit the general class of polarized (aligned), non-colliding, aggregate motion. Boid is a simulated bird-like object, i.e., it exhibits this type of behavior. It can be a fish, dinosaur, etc. 16

Flocking Solutions Well, we could use key-framing for each one We know what we are getting Tough to handle collisions VERY animator-intensive work! Does not scale well Instead, allow each object to determine its own behavior 17

General Approach Each boid maintains An internal state A set of bahaviors Fits very nicely into a C++ (Java, etc.) class Each boid is an instance of this class Three main behavioral rules Separation Alignment Cohesion 18

Three Rules Separation Steer to avoid crowding local flockmates Alignment Steer towards the average heading of local flockmates Cohesion Steer to move toward the average position of flockmates 19

Three Rules, Restated Avoid collisions with neighbors and obstacles Attempt to match velocity (speed and direction) of neighbors Attempt to stay close to neighbors These are not orthogonal Collision avoidance helps establish a minimum distance to neighbors Velocity matching maintains it 20

Boid Brain Each boid has access to whole scene Each one only considers flockmates in neighborhood Typically defined using a radius Think of fish in murky water, birds in fog 21

More Rules? What else could you do with this? 22

More Rules: http://www.red3d.com/cwr/steer/ Seek and flee Food vs. Food? Pursue and Evade Wander Arrival Containment Wall following Path following Leader following 23

Problems with Behavioral Techniques Trade control for automation Difficult to get exact desired effect Solution: Follow the leader How to define leader Solution: Use only for background Use something else for foreground characters Need to consider every boid O(n 2 ) complexity! How can we fix this? 24

Interacting with the Environment We need a way of steering clear of obstacles Just add more force vectors 25

Problems with Force Fields Does not allow boids to get close to objects Can lead to stopping Tough to move through an opening Collision prediction can be used to test if action is needed Ray/sphere intersection test 26

Knowledge of the Environment Boids actually have perfect knowledge of the environment Just a database lookup! Can led to super powers Seeing through walls Can use vision ( hearing, etc.) to limit accessible knowledge to be local 27

Vision of a Boid Based on real vision Limited Field of View (FoV) Visual occlusion Can use only FoV to simplify things Can use: Ray casting Simplified Z-buffer Once an object is seen, access more info from the database E.g., prey vs. predator 28

Memory of a Boid Since vision is fleeting, maybe we need to remember some things Can build a map as you fly, e.g., an occupancy map using an oct-tree Doesn t work for dynamic environments Maybe we need something deeper Model more-intelligent behavior An open-ended problem in AI If you think boids are tough, try humans! 29

Autonomous Behavior Modeling cognitive processes Must solve the similar problem to simple behavioral motion Balancing various needs and desires Cycle for boid decision making Model objects in the local environment Reason about its current state External environment Internal, time-varying urges, desires, emotions Plan a reaction to its current circumstances Carry out actions 30

Autonomous Behavior (cont.) Can get very complex, very quickly! Need to stop at some point Remember: Good enough is good enough! Senses (e.g., vision, touch) Perception Memory Causal knowledge Common sense reasoning Emotions Predispositions 31

Internal State Current feelings can change the weights of different forces Hungry, survival, etc. Can divide them into Imperatives Things that must get done Desires Things that should be done, if possible Idle What to do when I m not doing anything else 32

Levels of Behavior Can divide things up into levels 33

Keeping Control All of this is about automation What about control? Pure automation needs to be tempered with some control At various levels Influence can be used in proportion to animator s desire Action sequences Strategic goals Motor control 34

Crowd Simulation: Two Main uses Visual effects Usually mix live (foreground) action with CG (background) action http://vimeo.com/channels/belalsalem Simulation Precision is key Crowds in/out of a stadium or theme park 35

Crowd Simulation: Differences Can be multidirectional Can involve psychology Avoidance is primary activity High-density areas: Avoid 5-feet ahead Rotate body, side step Low-density areas: Avoid 100-feet ahead Change paths, move to open side, or to the right Pass people by slowing, overtaking, speeding up 36

Crowd Simulation: Internal Structure Subgroups form based on Common urges (going to lunch) Belief systems (political allies) Emotional state (soccer fans) Belief system can change Experience, senses, learning, cause/effect 37

TJ Laughlin s WPI Thesis Work People are complex Traits Age, gender, etc. Tendencies Likes dislikes, etc. Mood Changing of weights Social circles Who am I with? Who can see me? 38

Behavioral Systems: Examples Bats and penguins in Batman Returns All battle scenes in Lord of the Rings Most battle scenes in Star Wars Add some stochastic behaviors in order to deter uniformity Rob, show Reynolds PlayStation Videos! 39

References W. T. Reeves, "Particle Systems - A Technique for Modeling a Class of Fuzzy Objects", Computer Graphics, vol. 17, no. 3, pp 359-376, 1983. C. W. Reynolds, "Flocks, Herds, and Schools: A Distributed Behavioral Model", Computer Graphics, vol. 21, no. 4, pp 25-34, 1987. http://www.red3d.com/cwr/boids/ http://www.red3d.com/cwr/steer/ http://www.siggraph.org/education/materials/hypergraph/animation/particle.htm http://www.research.scea.com/pscrowd/ 40