Lectures – CS679 Computer Games Tech – Fall 2012 https://pages.graphics.cs.wisc.edu/679-12/ Course Web for CS679 Games Technologies Tue, 04 Dec 2012 04:28:23 +0000 en-US hourly 1 https://wordpress.org/?v=5.7.11 Lecture 20: (11/29) More Graphics https://pages.graphics.cs.wisc.edu/679-12/2012/12/01/lecture-20-1129-more-graphics/ Sat, 01 Dec 2012 15:55:57 +0000 http://pages.graphics.cs.wisc.edu/679-12/?p=313

We kept going through the notes on graphics stuff useful in games. (see 11/27)

We went through parallax mapping, relief mapping, environment mapping, and shadow mapping. (it was mapping day!)

Print Friendly, PDF & Email
]]>
Lecture 19: (11/27) Graphics https://pages.graphics.cs.wisc.edu/679-12/2012/11/24/lecture-19-1127-graphics/ Sat, 24 Nov 2012 16:46:58 +0000 http://pages.graphics.cs.wisc.edu/679-12/?p=305

(note: these notes were covered over 2+ days. day  1 we got through bump mapping, day 2 was all kinds of advanced mapping, leaving shadow volumes for day 3)

High Level Review: (see Lecture 7):

What are the goals of graphics for games?

  1. Fast (keep up the frame rate)
  2. Dynamic (respond to what’s going on)
  3. High Quality – works for the game
    1. works with the style (realism, cartoon, stylized, …)
    2. avoids visual artifacts
    3. provides enough cues
  4. Control / Authorability – we can get what we (or the art directory wants)
    1. without undue experimentation/work

Rendering Review

How does physics light a scene

Key concepts:

  • surface interactions and micro-geometry, subserface
  • local vs. non-local vs. global
  • direct vs. global
  • reflection vs. glossiness

Texture Mapping and Image-Based Stuff

Motivating Image-based methods

  • pre-rendered
  • sprites (depth ordering, alpha, …)
  • shape-changing sprites
  • texture maps
  • billboards / skyboxes / special cases
  • more general imposters
  • layers

Review

  • motivations
  • texture coordinate generation
  • filtering

Animation by fiddling with texture coordinates

Other texturing tricks

  • volumetric textures
  • world-space textures
  • slide projector textures
    • tool for lighting and shadows (later)

Other Maps

  • Surface properties
    • color
    • material properties (shinyness, glossiness)
    • local geometry (displacement map, normal/bump map, occlusion map)

Texturing Surfaces

Problem: still a flat surface

View Dependent Textures (very simple thing)

Displacement Maps (move geometry) – really messy to do

Bump Map / Normal Maps (move normals)

Parallax Mapping (constantly evolving)

  • depending on view direction, look somewhere else
  • walk along direction of ray (based on height)

Parrallax Occlusion Mapping (see gamedev.net)

walk along ray until you hit something

Relief Mapping (Manuel’s page) (paper)

  • use image warps to pre-compute the ray casts
  • where does the point go on the face of its bounding box
  • extend this to shadowing

Light Maps (of various forms)

  • pre-compute lighting on the surface (somehow)
  • keep it around as a texture
  • texture combining

Environment Maps

Basic version

  • small object / big world assumption
  • capture lighting box (envionment map)
    • box vs. sphere vs. cylinder
  • pure specular (reflections)
  • filtering issues

Environment Map Lighting?

  • Hack version (old car racing games)
    • earth is brown
    • sky is blue
    • lighting colored by direction

Environment maps to capture light

  • Captures all lights (direct and indirect)
    • from a distance, permanent in the scene
  • Issues
    • dynamic range (direct light much brighter than non)
    • so far only for specular
  • Idea 1 – sampling beyond the specular ray
    • issue – self-occlusions (ignore for now)
    • rays for glossy
    • rays for diffuse (lots)
  • Idea 2 – small samples (but area)
    • equivalence of samples and blur
    • pre-filtering (to make equivalence of lots of samples)
    • problem: how to pre-filter an environment map
      • MIP-MAP per cube wall? (what about corners?)
      • Spherical Harmonics
  • Why?
    • arbitrary complex lighting environments (not limited to number of lights)
    • specular reflections
    • glossiness
    • dynamic lighting? (re-render the environment map)

Shadows

Some basics

  • umbra / penumbra / lit area
  • hard vs. soft shadows
  • self shadowing

Hacky shadows can be useful! (ball over plane example)

Reasons why shadows are useful

Casting Shadows

Hierarchy of Hacks

  • Drop shadows (splotches) on floor
    • paint dark circles
    • paint light areas (spot-light)
    • how does this interact with existing colors
    • prospective hacks (for arbitrary point lights)

Shadow Maps (NOT light maps)

  • draw scene from the light’s point of view
  • use as colors (everything is shadowed, even things casting shadows)
  • use as items (so you can tell what is/isn’t shadowed)
  • use as depth
  • Gotchas
    • other than spotlights (cube environment maps?)
    • depth bias
    • item buffering doesn’t really work (very small polygons, moving)
    • get first and second objects (two depths)
    • aliasing (need high resolution to get sharp edges)

Shadow Volumes

  • basic idea (extrude each triangle)
  • point-in-frustum checks to see if in shadow
  • relatively efficient ways to use z-buffer and stencil buffers to perform checks
    • where you see the polygons, turn off lighting
    • 3 passes: draw z+dim, draw shadow volumes (stencil), draw bright (where not stenciled)
    • several ways to do mask pass
    • simple = (1) draw scene (dark) (2) draw back, things occluded get stenciled as on (since they are behind volume) (3) draw front (places where occluded is in front of voume) (4) un-shadow what’s not marked
  • Gotchas
    • need to combine/simplify geometry
    • expensive to do lots of fills 3 times

Towards more global illumination

Ambient Occlusion

    • soft shadows for self-shadowing
    • adds darkness where you get less light
    • independent of the direct lighting

Basic Ideas

Bent Normals

Implementation

  • ray sampling
  • multiple shadow drawing
  • multiple direction rendering
  • screen space methods
    • hack – estimate how much forward facing occlusion
    • naïve version does lots of texture reads
    • clever random sampling tricks to minimize reads (16?)

Why is AO so cool

  • easy and cheap
    • pre-computed for objects
    • SSAO for game scenes
  • gets major depth effects
    • dark in pockets
    • creases cause changes
    • low-frequency soft shadowing effects
Print Friendly, PDF & Email
]]>
Lecture 18: (11/20) HCI https://pages.graphics.cs.wisc.edu/679-12/2012/11/18/lecture-18-1120-hci/ Mon, 19 Nov 2012 02:47:27 +0000 http://pages.graphics.cs.wisc.edu/679-12/?p=300

Reading Assignment 8

Why HCI (see 2011 notes)

Usability vs. Games

Nobody learned to play the violin because it was easy (or play chess, or baseball)

How does usability matter?

Frustration vs. Challenge

Design Principles

Don Norman boils it all down to 2:

  • Visability
  • Conceptual Models

Is needing an instruction manual a cause or a cure?

Other key concepts:

  • Affordances
  • Natural Mappings
  • Constraints
  • Indicators of actions
  • Feedback
  • Hidden state (and making it visible)

Elevator button example.

Engineering Tradeoffs

What do you trade usability for?

  • Efficiency
  • Fun
  • Aesthetics
  • Cost
  • Space/Size

Evaluation and Execution

Basic steps:

  1. form goal
  2. execute
  3. evaluate

Detailed steps (from Norman)

  1. Form Goal
  2. Form Plan
  3. Specify Action
  4. Execute Action
  5. Perceive what happened
  6. Interpret
  7. Evaluate

Important: usability issues in ALL of the above stages.

  • Gulf of Execution
  • Gulf of Evaluation

Notes from student example

  • Me: elevator (old w/o numbers to new)
  • Shree – Water tap (when things go wrong)
  • Scott – Multimeter (why still need to re-plug probes?)
  • Drew – Thermostat
  • Zhouyuan – washing machine (coin op)
  • Mik – Vacuum cleaner (feedback, affordance, constraint, …)
  • Joey – PC
    • generic vs. special purpose
    • internal state (debuggability)
  • Eric – Pandora
  • Zach – Dropbox
  • Sam – Chrome
Print Friendly, PDF & Email
]]>
Lecture 17: (11/15) Sound (Guest Lecture) https://pages.graphics.cs.wisc.edu/679-12/2012/11/15/lecture-17-1115-sound-guest-lecture/ Thu, 15 Nov 2012 20:14:29 +0000 http://pages.graphics.cs.wisc.edu/679-12/?p=294

Prof. Joe Koykkar will talk about sound design. He suggests these links for good resources:

Print Friendly, PDF & Email
]]>
Lecture 16: (11/12) Some Tech Tricks https://pages.graphics.cs.wisc.edu/679-12/2012/11/12/lecture-16-1112-some-tech-tricks/ Tue, 13 Nov 2012 04:03:03 +0000 http://pages.graphics.cs.wisc.edu/679-12/?p=292

  1. Distance Transform Algorithm – to think about GPUs, parallelism
  2. Distance Transform Applications – to think about AI
  3. Noise – a useful topic, but cute tricks

Distance Transform Algorithm

Review Danielson EDT (linear time)

  • linear but serial (and linear in # of pixels, not edge size)

equivalence to vornoi diagrams

Introduce propagation algorithm

  1. fast implementations with priority queues
  2. parallel implementation (flooding)
    • look at neighbors (local computation)
    • edge length passes (as opposed to #pixels)
    • makes sense if you have a massively parallel machine
  3. jump flooding
    • doubling (1,2,4) – log N fill
    • halving (8,4,3,1) – log N fill (if you start with log N)
    • jump flood (x+i, y+i) I in (log N … 1)
    • not exact (gets some edge cases wrong)
    • provably very close – extra pass or two gets very close
    • log N passes (each one linear in pixels amount of work)
    • http://www.comp.nus.edu.sg/~tants/jfa.html

What might you use this for?

  • gradients – tell you how to get away (avoid)
  • collisions
    • grow obstacles, shrink objects (point querries)
  • navigation
  • find low cost paths (draw lines and adapt)
  • influence maps

Perlin Noise

Print Friendly, PDF & Email
]]>
Lecture 15: (11/8) Process https://pages.graphics.cs.wisc.edu/679-12/2012/11/12/lecture-15-118-process/ Tue, 13 Nov 2012 03:41:56 +0000 http://pages.graphics.cs.wisc.edu/679-12/?p=290

Guest Lecture by David

Print Friendly, PDF & Email
]]>
Lecture 13: (10/30) Random Tech Thoughts https://pages.graphics.cs.wisc.edu/679-12/2012/10/30/lecture-13-1030-random-tech-thoughts/ Tue, 30 Oct 2012 15:38:36 +0000 http://pages.graphics.cs.wisc.edu/679-12/?p=271

Administrivia:

  • Project 2: Kudos, Post-Mortems
  • Project 3: Prep for Thursday

Small topics – that may or may not be useful.

Goals for Programming http://research.cs.wisc.edu/graphics/Courses/679-s2007/Main/GameProgramming

Engine Architecture (memory management, entity systems, …)

Perlin Noise (as a way at lots of concepts)

Print Friendly, PDF & Email
]]>
Lecture 12: (10/23) Project 2&3 Discussion https://pages.graphics.cs.wisc.edu/679-12/2012/10/23/lecture-12-1023-project-23-discussion/ Tue, 23 Oct 2012 14:34:36 +0000 http://pages.graphics.cs.wisc.edu/679-12/?p=260

Last week review.

Handin mechanics – class mechanics (feedback from playtests) – postmortems

Reflection exercise – 2 concepts from game design discussion and how they are reflected in your game. 1 that you are getting right, 1 that you aren’t (may try to fix).

project 3

some thoughts on working together

not a “realistic” team

  • flat hierarchy

real problems

  • differences in time commitment (this happens in real world)
  • differences in skill levels
  • “you go to war with the army you have”
  • tight, inconvenient deadlines – external factors

some tricks for working together

  • skills inventory – what team do you have?
  • realism of what people can do (or not)
  • lone rangers and slackers

some tricks for picking “platform”

  • not requiring browser based – but strongly recommend it
  • some thoughts on choices
    • does everyone have access?
    • does everyone have expertise?
    • will it work well in 1366?
    • learning time for 3D game engines (big risk/reward)
Print Friendly, PDF & Email
]]>
Class today! (10/18 Lecture) https://pages.graphics.cs.wisc.edu/679-12/2012/10/18/lecture-11class-today/ Thu, 18 Oct 2012 13:54:25 +0000 http://pages.graphics.cs.wisc.edu/679-12/?p=217

CS679,

Today in class we are going to spend some time using our new game design vocabulary to analyze two different games, Braid and Defcon.

To prepare for class please:
1. Download and install the free demos for both games
-Defcon is available from http://www.introversion.co.uk/defcon/ for mac/pc
-Braid is available by installing steam at http://store.steampowered.com/app/26800/
Unfortunately, you will need to establish a steam account to download the demo. I tried some other ways but this seems to be the best, even if not optimal approach that is legal.
2. Remember to Bring your laptop!
We will be playing each game for about 20 each and using our design vocabulary to analyze and critique the design.
If you happen to feel compelled to play games before coming in, feel free, but 20 minutes each should give us enough time to talk intelligently about them.
Looking forward to class!
Print Friendly, PDF & Email
]]>
Lecture 10 & 10b: (10/9&11) Game Design 102 https://pages.graphics.cs.wisc.edu/679-12/2012/10/08/lecture-10-game-design-102/ Tue, 09 Oct 2012 02:36:53 +0000 http://pages.graphics.cs.wisc.edu/679-12/?p=209

David will start w/MDA

My really old notes:

  • 2007 What is Fun (Falhstein’s theory, Types of Fun, Crawford, Flow, Goals&Choices)
  • 2007 Game Design– Formalizing, Aesthetics, Issues List
    • 1 – Compelling Goals – make the player WANT to do something
    • 2 – Clear Goals – make sure they know what to do
    • 3 – Clear Rules – make sure they know how to do it
    • 4 – Choices – make sure they can actually influence what happens
      • Meaningful
    • 5 – Challenge – key thing here is balance (tuning)
    • 6 – Feedback – make sure they know that they’ve done it

I’ve lost my notes – key concepts all in the 2007 Game Design list

  • Goals
  • Rules
  • Meaningful Choices (informed choice)
  • Balance / Challenge / Progression
  • Feedback
Print Friendly, PDF & Email
]]>