Upload
joseph-douglas
View
220
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Virtual Reality development is taking the world by storm. Follow all 16 Lecture Notes to learn how to build your own VR experiences. -By Ruth Aylett, Prof.Comp Sci. @ Heriot Watt University
Citation preview
Agents and Avatars 2
Ruth Aylett
Overview
! Crowds ! Speech and Expressive behaviour
– Embodied conversational characters
! Creating autonomy – Scripting – Architectures
Crowds and flocking
! Interactions among members of a group – Local neighborhood
! Reynolds Boids – Originally birds or
fish – Complex behaviour
determined by simple rules
Separation: Boid Avoidance
Motor Control
! Steering Force ! Integrate to determine acceleration
– Thrust – determines speed
– Lateral Steering Force – determines direction
Boid Object Representation
! Point Mass Vehicle – Mass – Position – Velocity – Orientation
• Constrained to align with velocity
– Force and Speed Limits
! (No moment of inertia)
Same maths as point objects
acceleration = steering_force / mass – Given f = ma
velocity = velocity + acceleration – Over a unit time period – Generically v = v x at
position = position + velocity – Over a unit time period – Generically s = s + vt
Seeking and Fleeing ! Aim towards target
Desired_velocity = Kp (position – target) Steering = desired_velocity – velocity
Seeking and Fleeing Applet (Reynolds)
Pursuing and Avoiding
! Target is another moving object ! Predict target’s future position ! Scale prediction time, T, based on distance to object, Dc T=Dc
Pursuing and avoiding applet (Reynolds)
More Behaviors
! Evasion – Like flee, but predict pursuer’s movement
! Arrival – Like seek, but stop at target – Applet (Reynolds)
! Obstacle Avoidance – Repulsive force – Aim to boundary – Adjust velocity to be perpendicular to surface normal
Do People Flock?
Social psychologist’s report that people tend to travel as singles or in groups of size 2 to 5.
“Controlling Steering Behavior for Small Groups of Pedestrians in Virtual Urban Environments”
Terry Hostetler, Phd dissertation, 2002
Characteristics of Small Groups
! Proximity ! Coupled Behavior ! Common Purpose ! Relationship Between
Members
Moving Formations
! Pairs: Side by side ! Triples: Triangular shape
Stationary Formations
Moving pair approaches stationary triple Stationary quintuple
formed
! Two Parameters - because in 2D – Acceleration
• Increase/reduce walking speed • Combination of step length and step rate
– Turn • Adjust orientation • Heading direction for forward walking
Locomotion Model for Walking
Avoiding an Obstacle -- Trajectory
Small look-ahead distance Large look-ahead distance
ped 1
ped 2
walkway axis walkway axis
ped 1
ped 2
Interaction Between Pairs -- 3
Adding goals
! People are usually going somewhere – Easy case: same goal
• Walking to a sports stadium • Political demonstrations
– Harder case: multiple goals • Campus traffic • Most public spaces: streets, shops, stations
Talking Heads
! Human faces – Thus high expectations:
• Blinking, random head movement • Facial muscles • Lip sync
! Rarely intelligent – Entirely scripted in most cases – No integration of speech production with
intelligent architecture and NL generation
Moving the face - 1
! Simple approach – Define overlay frames with different facial
expressions • For example, six mouth shapes
– Use signal from TTS engine to pick a mouth shape
– This works OK with cartoon-like characters
Moving the face - 2
! Visemes – Mouth and lip position
for each phoneme – Correspond to a
submesh in the geometry
Using visemes
! Find viseme for each phoneme – Synchronise graphical change with sound
Catalan weather forecaster
! Complete talking character – Weather forecasts have predictable content – Still have to match content and behaviour
• <demo via browser: sam_mosca_ok.wmv>
Autonomy
! An independent sense-reflect-act cycle: implies – An agent-based action-selection mechanism – Self-animation in real-time: cannot be pre-rendered – Local sensing – Virtual robotics
! Not a natural graphics view – Global manipulation of polygons – Hierarchical scene-graph
Scripting
! Typical of NPCs in computer games ! What representational content is
needed? – Can just invoke named animations – What parameters?
• Depends on animation approach
Scripting with Finite State Automata
Tennis game FSM sequence"
Limitations of scripting
! Becomes predictable – Either independent of local sensing – Or single FSM transition stimulus
! Limited ability to use internal state – Interaction memory – Affective state
! Lacks sequencing flexibility – Sequence is hardwired
Low-level architecture for a fish…
Functional Architecture
High-level architecture
VE or visualisation?
! Embed all behaviour into scenegraph? – Advantage: efficiency – Disadvantage: tied to scenegraph software
! Or visualise simulated world? – Loosely coupled: how to link? – Message-passing between world simulation
and scenegraph
Using game engines
! Offer some support for NPCs – More facilities than a scenegraph – Attaching animations to graphical bodies – Imports from popular 3D packages like Character
Studio
! Disadvantages – Proprietary; oriented to scripting – Hard (in some cases impossible) to implement sensing
• Fixed paths quite often
– Often focused on shooting