1 / 24

Lighting Effects in Computer Games

Lighting Effects in Computer Games. Stefan Felkel. Talk Outline. Importance of lighting Light Sources Lighting Model Material and OpenGL Shading Multipass Rendering Multitexturing Mapping Techniques Radiosity Examples and Screenshots. Importance of Lighting. Point Light.

nolcha
Download Presentation

Lighting Effects in Computer Games

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lighting Effects in Computer Games Stefan Felkel

  2. Talk Outline • Importance of lighting • Light Sources • Lighting Model • Material and OpenGL • Shading • Multipass Rendering • Multitexturing • Mapping Techniques • Radiosity • Examples and Screenshots Stefan Felkel

  3. Importance of Lighting Stefan Felkel

  4. Point Light • Spot Light Light Sources • Directional Light • Parameters: color, intensity • OpenGL: up to 8 light sources Stefan Felkel

  5. Material • Parameters: • Ambient (color) • Diffuse (color) • Specular (color) • Shininess (specular exponent) • Emissive (color) • Color determined by these params + params of light source + lighting model Stefan Felkel

  6. Lighting Model (1) • Good approximation to reality • Illumination calculated with LM • OpenGL LM • Ambient Lighting • Diffuse Lighting • Specular Lighting • Total lighting intensity: Stefan Felkel

  7. Lighting Model • Ambient Lighting Stefan Felkel

  8. Lighting Model • Diffuse Lighting • View & light-vector: no lighting >= 90° Stefan Felkel

  9. Lighting Model • Specular Lighting Stefan Felkel

  10. Shading • Flat Shading • Gouraud Shading • Phong Shading Stefan Felkel

  11. Cube Environment Mapping 6 Textures  1 Cubemap Stefan Felkel

  12. Multipass Rendering • Lighting calculations done in separate passes • Each successive pass modifies the result of the pass before • Quake III: up to 10 passes • Base textures • Lightmaps • Fog • ... Stefan Felkel

  13. Multitexturing • In a single pass, multiple textures are accessed • Multiple stage model: output of each stage becomes input for next • Input for 1st stage is fragment color Stefan Felkel

  14. Light Mapping (1) • Light maps: low resolution & precalculated • Introduced by Quake + = Lightmap + Texture = Combined Texture Stefan Felkel

  15. Light Mapping (2) Multiple light maps packed into single texture Stefan Felkel

  16. Gloss Mapping • Gloss map: • monochrome texture • stores specular intensity values  + = Gloss maptexture Diffuselighting Specularlighting Final combined result Stefan Felkel

  17. Radiosity • Based on thermal heat transfer • Viewpoint independent • Radiosity = radiance exiting from a patch • Deals with area light sources • Radiosity is used for light map calculation Stefan Felkel

  18. Radiosity Stefan Felkel

  19. Meshing the Environment • Patch = surface, area, texel (light maps) • Every patch gets energy from surrounding patches Stefan Felkel

  20. Examples • Wolfenstein 3D (1992) • Doom (1993) • GLQuake (1996) Stefan Felkel

  21. Wolfenstein 3D (1992) Screenshot from Wolfenstein (“full-bright”) Stefan Felkel

  22. Doom I (1993) Screenshot from Doom I (Depth Cueing) Stefan Felkel

  23. GLQuake (1996) Screenshot from Quake II (Radiosity for light map calculation) Stefan Felkel

  24. End Thanks for your attention!

More Related