Mathematics in Computer Games - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Mathematics in Computer Games

Description:

Through use of mechanics, it is possible to allow objects in a game to collide ... Jason Mitchell, Moby Francke and Dhabih Eng, 'Illustrative Rendering in Team ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 20
Provided by: oldhamsi
Category:

less

Transcript and Presenter's Notes

Title: Mathematics in Computer Games


1
Mathematics in Computer Games
  • Nicolas Redfern

2
Maths in Games
  • There are many uses for maths in games
  • Object interaction/collisions
  • Gravity and other forces
  • Breakable objects
  • Realistic vehicle movement
  • Realistic positional sound
  • Particle systems
  • Lighting

3
Object Interaction/Collisions
  • Through use of mechanics, it is possible to allow
    objects in a game to collide realistically with
    each other.
  • Collisions are calculated using the following
    formula v2-v1-e(u2-u1)
  • u2 and u1 are the velocities before collision,
    and v2 and v1 are the velocities after collision.
  • e is the coefficient of restitution. In a game
    this would be set by the developers.

4
(No Transcript)
5
Gravity
  • Gravity is simulated in games to ensure that
    objects fall realistically.
  • On earth, the acceleration due to gravity is 9.8
    m/s2.

6
(No Transcript)
7
Calculating the Height of the Tower
  • The items all took 2 seconds to fall (t)
  • Acceleration (a) (due to gravity) is 9.8 m/s2
  • The initial velocity was 0 m/s2 (u)
  • Distance travelled is worked out using sut½at2
  • s09.8 (2)2/2
  • s19.6 m

s? u0 v a9.8 t2
8
Momentum in Portal
  • Portal is an action/puzzle game, that makes use
    of momentum in its puzzles.

9
(No Transcript)
10
Lighting
  • Lighting is of immense importance to games. A
    game can be much more immersive, if the lighting
    is realistic.
  • Often, dynamic lights are used, for moving light
    sources.



colour luminance(colour)colour
11
(No Transcript)
12
Illustrative Lighting in Team Fortress 2
  • Team Fortress 2 uses a cartoon-like look to
    achieve a unique visual style and comedic effect.
  • It uses complex equations to produce lighting
    effects.

13
Character Lighting Equation
  • This is the equation that determines the lighting
    for characters in Team Fortress 2
  • Spatially-varying directional ambient
  • Modified Lambertian terms
  • Unclamped Lambertian term
  • Scale, bias and exponent
  • Warping function
  • Albedo

14
(No Transcript)
15
Realistic positional sound
  • Many games use positional sound this is where
    sound varies depending upon where it is coming
    from.
  • Another way in which sound is made more realistic
    is varying it upon the surrounding, environment.
  • The Doppler effect can also be simulated in game
    as an object moves towards you, the sound becomes
    lower in pitch, and continues to do so as it
    moves away.
  • In Day Of Defeat Source, another effect is
    applied sounds far from the player lack higher
    frequencies and thus sound more like they
    naturally would, for example, abrupt pops for
    gunshots.

16
(No Transcript)
17
Breakable objects
  • Having objects that can be broken up, adds
    another level of realism to a game.
  • Usually, only certain objects can be broken, such
    as crates and fragile items.

18
(No Transcript)
19
Bibliography
  • Jason Mitchell, Moby Francke and Dhabih Eng,
    "Illustrative Rendering in Team Fortress 2,"
    International Symposium on Non-Photorealistic
    Animation and Rendering, 2007
  • Games
  • Half-Life 2, Day Of Defeat Source, Portal and
    Team Fortress 2 (Valve)
  • Garrys Mod (Garry Newman)
  • Crysis (Crytek)
Write a Comment
User Comments (0)
About PowerShow.com