130 likes | 260 Views
Lighting Effects in Computer Games Act II. Institute of Computer Graphics & Algorithms Vienna University of Technology Vienna / Austria. Ivan Viola. Introduction. speed & quality trade-off real-time rendering (>10 fps) software based techniques hardware acceleration Quake
E N D
Lighting Effects in Computer GamesAct II Institute of Computer Graphics & Algorithms Vienna University of Technology Vienna / Austria Ivan Viola
Introduction • speed & quality trade-off • real-time rendering (>10 fps) • software based techniques • hardware acceleration • Quake • state of the art in HW acceleration techniques
Quake • most important FPS game • lighting of the world • lighting of creatures, weapons, particles and sprites
Quake - World Lighting Model (I) • Gouraud shading • angle variance (for n-gons; n>3) • bad for big polygons (such as walls)
Quake - World Lighting Model (II) • Lightmaps • lighting is precalculated (using eg. radiosity) • stored in a 2D texture • easy to scale, translate to create various effects
Quake - Lighting of Polygonal Objects • Gouraud shading • polygons are triangles • small enough • Subdivision rasterizer • division until the polygon is smaller than pixel and then draw
Quake - Following Versions • Verite Quake • HW acceleration using Verite chip • GLQuake • downloadable upgrade that uses OpenGL HW acceleration • Quake II • OpenGL HW acceleration out-of-the-box
State of the Art in FPS Games • Quake III Arena • curved surfaces • volumetric fog • shading languages • Doom III • unique style of lighting using HW acceleration • HW acceleration necessary!
Projective Textures • projector simulation • spotlight simulation • shadow maps
Environment Maps • cubic parameterization • implemented in most nowadays graphics chips • spherical parameterization • mapping is problematic • parabolic parameterization • solves problem of spherical parameterization • partly implemented in MESA
BRDF-Based Lighting • BRDF is a 4D function • 4D lookup table is needed • approximation of 4D lookup table through decomposition into two 2D lookup tables • efficient usage of the texture memory
Anisotropic Lighting • examples of anisotropic surfaces • satin cloth, CD surface, brushed metal • setup and enable 2D texture that encodes lighting model as a function of <L·N> and <V·R> • setup texture matrix for the dot product • pass per-vertex tangent vector of surface or fiber as texture coordinate using glTexCoord3f(Tx,Ty,Tz)
Thank you Ivan Viola viola@cg.tuwien.ac.at