Behavioral animation CSE 3541 Matt Boggus. Material recap and trajectory Geometric – Artist specifies translation and rotation over time Physically based.

Slides:



Advertisements
Similar presentations
Chasing, Evading, Intercepting, Pattern Movements
Advertisements

Reactive and Potential Field Planners
Lecture 7: Potential Fields and Model Predictive Control
7.2. AI E NGINE AND S TEERING B EHAVIOUR I Design of an AI Engine and introduction to steering in game AI.
Controlling Individual Agents in High Density Crowd Simulation N. Pelechano, J.M. Allbeck and N.I. Badler (2007)
Beyond the Centralized Mindset
Evolving Flocking Simulation and Robotics Dan Sayers iotic.com.
Flocking Behaviors Presented by Jyh-Ming Lien. Flocking System What is flocking system? – A system that simulates behaviors of accumulative objects (e.g.
Flocks, Herds, and Schools: A Distributed Behavioral Model By: Craig Reynolds Presented by: Stephanie Grosvenor.
BOIDS by Craig Reynolds Cs 527 Computer Animation. Dr. Robert Kenyon. Vaidyasubramanian Chandrasekhar Vaidyasubramanian Chandrasekhar.
1 CO Games Development 2 Week 22 Flocking Gareth Bellaby.
Behavioral Animation Procedural Animation Type?. Behavioral Animation Introduced by C. Reynolds (1987) Animating many things at one time –A group of the.
Rick Parent - CIS682 Flocking Geometric objects Many objects Simple motion - e.g., local rules, more physics, collision avoidance Consider other members.
Forward and Inverse Kinematics CSE 3541 Matt Boggus.
1 Reactive Pedestrian Path Following from Examples Ronald A. Metoyer Jessica K. Hodgins Presented by Stephen Allen.
1Notes  Assignment 2 is out  Flocking references  Reynolds, “Flocks, Herds, and Schools…”, SIGGRAPH’87  Tu and Terzopoulos, “Artificial Fishes…”, SIGGRAPH’94.
John S Gero Agents – Agent Simulations AGENT-BASED SIMULATIONS.
KAIST CS780 Topics in Interactive Computer Graphics : Crowd Simulation A Task Definition Language for Virtual Agents WSCG’03 Spyros Vosinakis, Themis Panayiotopoulos.
Flocking and Group Behavior Luv Kohli COMP259 March 24, 2003.
1cs426-winter-2008 Notes  Please read: C. Reynolds “Flocks, Herds, and Schools…” SIGGRAPH ‘87
Crowd Simulation Seminar ”Steering Behaviors For Autonomous Characters” By Craig W. Reynolds Rudi Bonfiglioli ( )
Steering Behaviors For Autonomous Characters
Collective Animal Behavior Ariana Strandburg-Peshkin.
Virulent SophtWear Virul-Glider V1.0 Josh Smallman Mjumbe Poe Zach Clegg.
Physically Based Animation and Modeling
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Introduction Tracking the corners Camera model and collision detection Keyframes Path Correction Controlling the entire path of a virtual camera In computer.
Localisation & Navigation
Biology: flocking, herding & schooling Day 5 COLQ 201 Multiagent modeling Harry Howard Tulane University.
1 Animation & Java3D ©Anthony Steed Overview n Introduction to Animation Kinematics Dynamics Boids n Java3D Scene graph Animation Vehicles.
Collision handling: detection and response
Flow Fields Hao Li and Howard Hamilton. Motivation for Flow Fields Multiple AI algorithms in a computer game can produce conflicting results. The AI must.
Spring Rigid Body Simulation. Spring Contents Unconstrained Collision Contact Resting Contact.
(Interactive) Cinematography Ref: Chap. 16 (Core Techniques and Algorithms in Game Programming)
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Collisions & Contact.
Math / Physics 101 GAM 376 Robin Burke Fall 2006.
1 Fundamentals of Robotics Linking perception to action 2. Motion of Rigid Bodies 南台科技大學電機工程系謝銘原.
motiontranslationaverage speed Rotation kinematics center of mass Center of gravity gravitational force Gravity displacement direction Vector quantity.
Kinematics Jehee Lee Seoul National University. Kinematics How to animate skeletons (articulated figures) Kinematics is the study of motion without regard.
Jumping, Climbing, and Tactical Reasoning Section 2.5 Tom Schaible CSE 497 – AI & Game Programming.
CLASS 10 SCENE GRAPHS BASIC ANIMATION CS770/870. A scene Graph A data structure to hold components of a scene Usually a Tree of a Directed Acyclic Graph.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Artificial Intelligence in Game Design Complex Steering Behaviors and Combining Behaviors.
AI in games Roger Crawfis CSE 786 Game Design. AI vs. AI for games AI for games poses a number of unique design challenges AI for games poses a number.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Behavioral Animation: Knowing the environment Flocking.
Controlling Individual Agents in High-Density Crowd Simulation
Crowds (and research in animation and games) CSE 3541 Matt Boggus.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 2 – Basic VRML.
REFERENCES: FLOCKING.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Behavioral Animation.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Animation.
Crowd Self-Organization, Streaming and Short Path Smoothing 學號: 姓名:邱欣怡 日期: 2007/1/2 Stylianou Soteris & Chrysanthou Yiorgos.
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Artificial Intelligence in Game Design Lecture 8: Complex Steering Behaviors and Combining Behaviors.
Physics Chapter 2 Notes. Chapter Mechanics  Study of the motion of objects Kinematics  Description of how objects move Dynamics  Force and why.
Crowds (and research in computer animation and games)
Computer Animation Algorithms and Techniques
Character Animation Forward and Inverse Kinematics
Behavioral animation CSE 3541 Matt Boggus.
Flocking Geometric objects Many objects
CIS 488/588 Bruce R. Maxim UM-Dearborn
Algorithmic Animation & Particle Systems
Crowds (and research in computer animation and games)
UMBC Graphics for Games
Computer Animation Algorithms and Techniques
Hiroki Sayama NECSI Summer School 2008 Week 2: Complex Systems Modeling and Networks Agent-Based Models Hiroki Sayama
Game Programming Algorithms and Techniques
GPAT – Chapter 7 Physics.
Presentation transcript:

Behavioral animation CSE 3541 Matt Boggus

Material recap and trajectory Geometric – Artist specifies translation and rotation over time Physically based – Artist specifies forces acting on objects – Motion equations dictate movement Behavioral – Artist directs autonomous agents Interpolation – Artist draws the scene at the beginning and end of a an interval of time – Intermediate positions are calculated

Behavioral Animation Control the motion of one or more objects using virtual actors Goal: realistic or believable motion so that the object appears to be autonomous Matt Lewis’ page on BA

Behavioral animation Character or object motion based on: – Knowledge of the environment – Aggregate behavior – Primitive behavior – Intelligent behavior – Crowd management

Actor properties (position only) Position (x, y) Goal (x g, y g ) V = Goal - Position Next Position = Position + V * dt

Actor properties (position and orientation) Position (x, y) Goal (x g, y g ) V target = Goal - Position Orientation (ox, oy) = transform.forward Rotate(θ) In Unity, you can use RotateTowards() Rotate(-θ) Determine which rotation (±θ) orients the actor closer to the goal using dot product

Sample code class OrientedAgent2D { // Data Vector3 position; GameObject model;// Use this for geometry and orientation // Methods Update(float deltaTime); TurnLeft(); TurnRight(); MoveForward(); MoveBackward(); };

Knowing the environment Vision and other senses – Information available now Memory – Information stored from the past

Vision General vision – What can the actor see? – What is everything in sight now? Targeted vision – Can the actor see object X? Computation vs. accuracy – How much of an object needs to be seen to be identified? – Do we need to model visual perception?

Omniscience Everything in the scene is known

Field of view

Field of view – example Orientation Vector (O) Vector from agent to vertex (V) Inside the cone when the angle between O and V is less then or equal to θ/2 Angle of cone = θ

Field of view – sample code Vector3 agentPosition, orientation, objectPosition; float visionLimit; Vector3 agentToVertex = objectPosition – agentPosition; agentToVertex.Normalize(); if(Vector3.Dot(agentToVertex,orientation) > visionLimit) // agent can see object

Occluded Vision Ray casting with collision detection Sample the environment

Target-testing vision (per object) Can the actor see X? Cast a ray How well can the actor see X? Use multiple rays

Target-testing vision (alternative) Sample the vision cone Cast multiple rays

Lab4 – predator-prey simulation Unbalanced abilities – Vision Distance Field of view – Linear speed (moving forward) – Angular or rotational speed (turning)

Spatial Occupancy

Other senses Hearing Smell Sensors & signal propagation Spatial occupancy approach Applications

Memory What is recorded about the environment Spatial occupancy Transience of objects: time-stamps Memory hierarchy: short-term, long-term

Spatial Occupancy doorway transiency wall

Aggregate Behavior: Emergent Behavior TypeElementsPhysics Env/Others Intelligence Particles Much/noneNone Flocking Some/someLimited Crowds Little/muchLittle-much Typical qualities

Emergent behavior Complex systems and patterns arising out of simple rules Aints – AI ants

Predator Prey vision anatomy

Prey-Predator (vision)

Prey-Predator (movement – speed and turning)

Motion – force based Apply a force on the predator towards the prey when in view Force = c * pos prey - pos pred

Motion – kinematic based Determine the closest prey in view then turn towards it and increase forward velocity v old v new

Prey-Predator – environment forces Using pure forces May not prevent object penetration Prey can be ‘hidden’ by environmental repulsive forces

Flocking, Swarming, Flying Boids

Local control Rules defined to stay with friends, but avoid bumping into each other Need additional rules for collision avoidance with obstacles

Local information

Other flocking issues Global control – script flock leader – global migratory urge Negotiating the motion – Separation, alignment, and cohesion may compete/contradict Collision avoidance – Once an object is in sight, start steering to avoid Splitting and rejoining (difficult) – Collision avoidance too strong – flock may never rejoin after split – Flock membership too strong – flock does not split and formation changes Modeling flight

Negotiating the motion Forces Or “Reasoning” (e.g. rule-based)

Navigating obstacles Problems with repulsive forces

Navigating using bounding sphere

Navigating Testing for being on a collision path with (bounding) sphere Given: P, V, C, r

Finding closest non-colliding point Calculate s,t

Modeling flight – common in flocking

Modeling flight Geometric flight – dynamic, incremental rigid transformation of an object moving along a tangent to a three dimensional curve

Modeling Flight – Lift Air passing above wing most travel longer than air below it. Less pressure above wing = lift

Modeling Flight – turn by rolling

Modeling Flight – summary Turning is effected by horizontal lift Increasing pitch increases drag Increasing speed increases lift