Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Player Traversal Mechanics
In The Vast World Of
Horizon: Zero Dawn
Paul van Grinsven
Game programmer
Guerrilla
GDC 2017
Aloy
• Female
• Adventurer
• Agile
• Strong climber
• Tactical fighter
• Hunter
The World Of Horizon
• Terrain mostly procedurally
generated
• Various ecotopes
• Manmade structures,
indoor/outdoor
Overview
• Goals and constraints
• Tools, workflow and pipeline
• Responsive navigation
• Advanced traversal mechanics
• F...
Goals And Constraints
• Design:
– Fluid and responsive
• Team:
– 2 game programmers
– 3 animators
– 1 designer
– 1 produce...
Tools, Workflow And Pipeline
Vast World Of Horizon: Zero Dawn
Highly Responsive Navigation
• Fluid and responsive
• Left or right foot forward
• Easy to control
Highly Responsive Navigation
• Problem:
– Unresponsive stop to start transition
– Waiting for completion of stop
animation
Highly Responsive Navigation
• Animation events
– Time, duration and ID.
• Provided to the game after each
network update
Highly Responsive Navigation
• Allowing early exit increases responsiveness
Highly Responsive Navigation
• Setup of the start system
Highly Responsive Navigation
• Control variables
– Move (bool), Speed (float) and Heading (float)
• Movement in code is ha...
Highly Responsive Navigation
• Keep history of controller movement input direction for
last 3 frames
– No input for last 3...
Highly Responsive Navigation
Highly Responsive Navigation
• Controlling responsiveness
Highly Responsive Navigation
• Problem:
– Uncontrollable when letting
go of stick during start!
– Too much displacement
wi...
Highly Responsive Navigation
• Solution:
– Shuffles
• Quick directional motions with
small displacement forward
– Steps
• ...
Highly Responsive Navigation
– Move became false
• Time window in the animation decides when to trigger a step or a
shuffl...
Vast World Of Horizon: Zero Dawn
Complex Terrain Navigation
• No navigation mesh for player!
• Metrics
– 1.5m high jump, 50 degree max
slope, 6m/s max spee...
Complex Terrain Navigation
• Need to know ground surface
gradient
– Ignoring high frequency
differences!
• Solution:
– Smo...
Complex Terrain Navigation
• Constructing a contact plane
Complex Terrain Navigation
• Using async probing results
from previous frame
– Important: Lagging one frame!
Foot Placement
• Procedural adjustment of legs
and feet
• Animation decides when
– Event-based
• Code decides where
– Depe...
Foot Placement
• Placing feet on uneven terrain
– Raycast the collision mesh
• From knee height
– Two bone IK chain from a...
Foot Placement
• Floating foot
Foot Placement
• Solving the “floating foot
problem”
– Additional collision probing
– Not only apply vertical
adjustments
Vast World Of Horizon: Zero Dawn
Vaulting
• Handling various surface features
– Step up, step over, step off
– Different detection settings per movement co...
Vaulting
• Step 1:
– Allowed to vault?
– Schedule probes
• Triggers can disable
vaults
• Game assets can disable
vaults
Vaulting
• Step 2:
– Process results from previous frame
scheduled probe
• If: Collision point high enough? (step up/over)...
Vaulting
• Step 3:
– Shape analysis
• Raycasts with fixed offsets
determine depth and height
fluctuation
– Store obstacle ...
Vaulting
• Transition selection
– Scoring system
• Difference between obstacle contact
position and animation contact posi...
Vaulting
• Problem: How to match
animation with obstacle
interaction
• Solution: Warp it!
Animation Warping
• Bending and stretching animated motion
– To reach a specific position at a specific time
• Less animat...
Animation Warping
Animation Warping
• Requires analysis of the animation
– Need to know the total remaining displacement at any time
in the ...
Animation Warping
Animation Warping
Animation Warping
With
Animation Warping
• Enhancements: Allow any bone to reach the given
destination
– Calculate offset of the guided bone to t...
Animation Warping
• Enhancements: Only warp during specific time ranges
in the animation
– Warping looks best when feet ar...
Animation Warping
Animation Warping
• Enhancements: Specific arrival time
– Problem: Don’t always want to reach destination at end of
animat...
Animation Warping
Animation Warping
• Enhancements: Preserving velocity by adjusting
playback speed
– Problem: Adding displacement can cause...
Animation Warping
• Example: Warping
an animation twice
its own distance
– Problem: Doubles
the velocity
Animation Warping
• Solution:
– Modify playback speed to twice as slow
Vaulting
• Used for diving into water
• Used for climbing out of water
• Transition onto annotations
Vast World Of Horizon: Zero Dawn
Environmental Metadata
• Tile-based, stream-able world
– 512m by 512m tiles
• More than 100 tiles!
– 3x3 tiles always load...
Environmental Metadata
• A single tile
– Collision mesh
– Water volumes
– Stealth areas
– Roads
– Geometric annotations
Geometric Annotations
• Points and lines
• Static or dynamic
• Tagged
• Stream-able
• Provides semantics
Geometric Annotations
• Tags
– Climbable
– Balanceable
– Unstable
– Ziplineable
– Etc…
Jump System
• Introducing a new jump system
– Pre apex (animation driven)
– Post apex (procedurally)
• Improving control
–...
Jump Guidance
• Solution:
– Predict trajectory
– Apply small adjustments for
guidance
• Important:
– Maintain the illusion...
Motion Analysis
• Motion prediction and
planning requires animation
metadata:
– Duration, distance, rotation,
average spee...
Motion Analysis
• Calculate and store the metadata in a database for all
valid permutations of input variable values for t...
Motion Analysis: Construction
Motion Analysis: Construction
• Input samples:
– X: 0 or 1 and Y: 4 or 8
– Store metrics for 3
permutations of input
value...
Motion Analysis: Querying
• Metrics for (X=0.25, Y=6)?
– 0.5*0.75*SampleA +
0.5*0.25*SampleB +
0.5*SampleC
Sample X Y
Samp...
Constructing The Trajectory
• Apex position:
– Take off position + jump motion
displacement
• Initial fall velocity:
– Vel...
Jump Guidance: Forward Speed
Jump Guidance: Turn Speed
• Calculate the circle that gets
us there, in 2D
Vast World Of Horizon: Zero Dawn
Climbing
• Relying on geometry annotations
• One attach point on the annotation
Climbing
• Transition selection
– Find nearest annotation in the
direction of movement stick
– Find best transition by mat...
Climbing: Guiding Limbs
• Directing hands and feet while
climbing
– Hands: holding onto geometry
• Current or destination
...
Climbing: Guiding Limbs
• Collision probes
– Through the palm of the hand
– Two sets for the feet
• Individual control of ...
Climbing: Dynamic Objects
• Dynamic annotations
– Handling different update
frequencies
– Taking displacement and rotation...
Post Mortem
• What worked well?
– Animation queuing based on events
• Controllable responsiveness
– Geometry annotations
–...
Post Mortem
• What didn’t work that well?
– Lack of good editor/visualization tools
caused level designers to not focus
on...
Post Mortem
• What didn’t work that well?
– Very complex animation networks
Future Plans
• Research motion matching
– http://www.gdcvault.com/play/10
22985/Motion-Matching-and-
The-Road
• Investigat...
Acknowledgement
• Guerrilla
• Team Traversal
• Thijs Kruithof
Thank you!
THANK YOU!
Q&A
• Questions?
• Also feel free to mail us!
– paul.vangrinsven@guerrilla-games.com
– thijs.kruithof@guerrilla-games.com
Upcoming SlideShare
Loading in …5
×

Player Traversal Mechanics in the Vast World of Horizon Zero Dawn

13,973 views

Published on

Download the original PowerPoint presentation here: http://www.guerrilla-games.com/read/player-traversal-mechanics-in-the-vast-world-of-horizon-zero-dawn

Paul van Grinsven shows what is needed to make Aloy traverse the vast world of Horizon Zero Dawn, with its complex and organic environments. Various traversal mechanics are covered from a gameplay programmer's perspective, focusing on the interaction between code and animations. The different systems and techniques involved in the implementation of these mechanics are explained, and Van Grinsven looks at the underlying reasoning and design decisions.

Published in: Software
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Player Traversal Mechanics in the Vast World of Horizon Zero Dawn

  1. 1. Player Traversal Mechanics In The Vast World Of Horizon: Zero Dawn Paul van Grinsven Game programmer Guerrilla GDC 2017
  2. 2. Aloy • Female • Adventurer • Agile • Strong climber • Tactical fighter • Hunter
  3. 3. The World Of Horizon • Terrain mostly procedurally generated • Various ecotopes • Manmade structures, indoor/outdoor
  4. 4. Overview • Goals and constraints • Tools, workflow and pipeline • Responsive navigation • Advanced traversal mechanics • Future plans
  5. 5. Goals And Constraints • Design: – Fluid and responsive • Team: – 2 game programmers – 3 animators – 1 designer – 1 producer • Technical: – 30Hz frequency updates
  6. 6. Tools, Workflow And Pipeline
  7. 7. Vast World Of Horizon: Zero Dawn
  8. 8. Highly Responsive Navigation • Fluid and responsive • Left or right foot forward • Easy to control
  9. 9. Highly Responsive Navigation • Problem: – Unresponsive stop to start transition – Waiting for completion of stop animation
  10. 10. Highly Responsive Navigation • Animation events – Time, duration and ID. • Provided to the game after each network update
  11. 11. Highly Responsive Navigation • Allowing early exit increases responsiveness
  12. 12. Highly Responsive Navigation • Setup of the start system
  13. 13. Highly Responsive Navigation • Control variables – Move (bool), Speed (float) and Heading (float) • Movement in code is handled with velocity and turn speed – Turn speed is evaluated from a curve. (x = linear speed (m/s), y = turn speed (deg/s) – Low speed = slow turn speed!
  14. 14. Highly Responsive Navigation • Keep history of controller movement input direction for last 3 frames – No input for last 3 frames -> Stop moving – Move will always be set for at least 3 frames (0.1 seconds)! – Needed for 180 turns during move cycle!
  15. 15. Highly Responsive Navigation
  16. 16. Highly Responsive Navigation • Controlling responsiveness
  17. 17. Highly Responsive Navigation • Problem: – Uncontrollable when letting go of stick during start! – Too much displacement with locomotion in stops.
  18. 18. Highly Responsive Navigation • Solution: – Shuffles • Quick directional motions with small displacement forward – Steps • Small forward motions that switch footedness
  19. 19. Highly Responsive Navigation – Move became false • Time window in the animation decides when to trigger a step or a shuffle. – Move still true • Early blend to the cycle and eventually a stop
  20. 20. Vast World Of Horizon: Zero Dawn
  21. 21. Complex Terrain Navigation • No navigation mesh for player! • Metrics – 1.5m high jump, 50 degree max slope, 6m/s max speed • Capsule-shaped collider – Different sizes (max 70cm wide, 1.8m tall)
  22. 22. Complex Terrain Navigation • Need to know ground surface gradient – Ignoring high frequency differences! • Solution: – Smoothed slope angle calculation • Through multiple scheduled collision probes
  23. 23. Complex Terrain Navigation • Constructing a contact plane
  24. 24. Complex Terrain Navigation • Using async probing results from previous frame – Important: Lagging one frame!
  25. 25. Foot Placement • Procedural adjustment of legs and feet • Animation decides when – Event-based • Code decides where – Depending on game state and physics probe results
  26. 26. Foot Placement • Placing feet on uneven terrain – Raycast the collision mesh • From knee height – Two bone IK chain from ankle to knee to hips, with adjustment of pelvis as well – Foot rest events in all animations
  27. 27. Foot Placement • Floating foot
  28. 28. Foot Placement • Solving the “floating foot problem” – Additional collision probing – Not only apply vertical adjustments
  29. 29. Vast World Of Horizon: Zero Dawn
  30. 30. Vaulting • Handling various surface features – Step up, step over, step off – Different detection settings per movement context
  31. 31. Vaulting • Step 1: – Allowed to vault? – Schedule probes • Triggers can disable vaults • Game assets can disable vaults
  32. 32. Vaulting • Step 2: – Process results from previous frame scheduled probe • If: Collision point high enough? (step up/over) – Do raycasts for shape analysis • Else: Horizontal displacement relative to starting point of swept sphere? (step off) – Find valid landing position
  33. 33. Vaulting • Step 3: – Shape analysis • Raycasts with fixed offsets determine depth and height fluctuation – Store obstacle metrics
  34. 34. Vaulting • Transition selection – Scoring system • Difference between obstacle contact position and animation contact position • Add bonus to climbable transitions
  35. 35. Vaulting • Problem: How to match animation with obstacle interaction • Solution: Warp it!
  36. 36. Animation Warping • Bending and stretching animated motion – To reach a specific position at a specific time • Less animation variations needed • Destination position can be adjusted during playback
  37. 37. Animation Warping
  38. 38. Animation Warping • Requires analysis of the animation – Need to know the total remaining displacement at any time in the animation
  39. 39. Animation Warping
  40. 40. Animation Warping
  41. 41. Animation Warping With
  42. 42. Animation Warping • Enhancements: Allow any bone to reach the given destination – Calculate offset of the guided bone to trajectory bone each frame and subtract this offset from the destination – Important: Trajectory is defined by motion of guided bone!
  43. 43. Animation Warping • Enhancements: Only warp during specific time ranges in the animation – Warping looks best when feet are not touching ground!
  44. 44. Animation Warping
  45. 45. Animation Warping • Enhancements: Specific arrival time – Problem: Don’t always want to reach destination at end of animation – Solution: Support user defined arrival time • Indicated by event in animation • Allowing for post arrival motion
  46. 46. Animation Warping
  47. 47. Animation Warping • Enhancements: Preserving velocity by adjusting playback speed – Problem: Adding displacement can cause unnatural speed ups – Solution: Adjustment of playback speed allows you to preserve original animation velocity
  48. 48. Animation Warping • Example: Warping an animation twice its own distance – Problem: Doubles the velocity
  49. 49. Animation Warping • Solution: – Modify playback speed to twice as slow
  50. 50. Vaulting • Used for diving into water • Used for climbing out of water • Transition onto annotations
  51. 51. Vast World Of Horizon: Zero Dawn
  52. 52. Environmental Metadata • Tile-based, stream-able world – 512m by 512m tiles • More than 100 tiles! – 3x3 tiles always loaded
  53. 53. Environmental Metadata • A single tile – Collision mesh – Water volumes – Stealth areas – Roads – Geometric annotations
  54. 54. Geometric Annotations • Points and lines • Static or dynamic • Tagged • Stream-able • Provides semantics
  55. 55. Geometric Annotations • Tags – Climbable – Balanceable – Unstable – Ziplineable – Etc…
  56. 56. Jump System • Introducing a new jump system – Pre apex (animation driven) – Post apex (procedurally) • Improving control – In-air steering – In-air braking
  57. 57. Jump Guidance • Solution: – Predict trajectory – Apply small adjustments for guidance • Important: – Maintain the illusion of control!
  58. 58. Motion Analysis • Motion prediction and planning requires animation metadata: – Duration, distance, rotation, average speed, etc… • Solution: – Motion tables
  59. 59. Motion Analysis • Calculate and store the metadata in a database for all valid permutations of input variable values for the animation state • When querying metadata from the database blend several results together, based on the given values for the input variables
  60. 60. Motion Analysis: Construction
  61. 61. Motion Analysis: Construction • Input samples: – X: 0 or 1 and Y: 4 or 8 – Store metrics for 3 permutations of input values X Y 0 4 1 4 - 8
  62. 62. Motion Analysis: Querying • Metrics for (X=0.25, Y=6)? – 0.5*0.75*SampleA + 0.5*0.25*SampleB + 0.5*SampleC Sample X Y Sample A 0 4 Sample B 1 4 Sample C - 8
  63. 63. Constructing The Trajectory • Apex position: – Take off position + jump motion displacement • Initial fall velocity: – Velocity from the last frame of the jump motion
  64. 64. Jump Guidance: Forward Speed
  65. 65. Jump Guidance: Turn Speed • Calculate the circle that gets us there, in 2D
  66. 66. Vast World Of Horizon: Zero Dawn
  67. 67. Climbing • Relying on geometry annotations • One attach point on the annotation
  68. 68. Climbing • Transition selection – Find nearest annotation in the direction of movement stick – Find best transition by matching conditions, ranges and check for blocking collision. – Trigger transition and apply warping
  69. 69. Climbing: Guiding Limbs • Directing hands and feet while climbing – Hands: holding onto geometry • Current or destination – Feet: against geometry if possible, otherwise dangling
  70. 70. Climbing: Guiding Limbs • Collision probes – Through the palm of the hand – Two sets for the feet • Individual control of all four limbs • Limb rest events in all animations • Locks the limb as well – sticks it to the geometry!
  71. 71. Climbing: Dynamic Objects • Dynamic annotations – Handling different update frequencies – Taking displacement and rotation into account • Dynamic IK calculation
  72. 72. Post Mortem • What worked well? – Animation queuing based on events • Controllable responsiveness – Geometry annotations – Tweakable jump guidance • Snappiness vs realism
  73. 73. Post Mortem • What didn’t work that well? – Lack of good editor/visualization tools caused level designers to not focus on traversal • Tools were still in development • Hard for level designers to build traversal paths – Vault system – No navigation mesh for player
  74. 74. Post Mortem • What didn’t work that well? – Very complex animation networks
  75. 75. Future Plans • Research motion matching – http://www.gdcvault.com/play/10 22985/Motion-Matching-and- The-Road • Investigate player navigation through use of navigation mesh • Full body IK
  76. 76. Acknowledgement • Guerrilla • Team Traversal • Thijs Kruithof
  77. 77. Thank you! THANK YOU!
  78. 78. Q&A • Questions? • Also feel free to mail us! – paul.vangrinsven@guerrilla-games.com – thijs.kruithof@guerrilla-games.com

×