Lighting Effects in Computer Games Act II Ivan Viola Institute of Computer Graphics & Algorithms Vienna University of Technology Vienna / Austria Introduction Ivan Viola speed & quality trade-off real-time rendering (>10 fps) software based techniques hardware acceleration Quake state of the art in HW acceleration techniques 2 / 13 Quake most important FPS game lighting of the world lighting of creatures, weapons, particles and sprites Ivan Viola 3 / 13 Quake - World Lighting Model (I) Gouraud shading angle variance (for n-gons; n>3) bad for big polygons (such as walls) Ivan Viola 4 / 13 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 Ivan Viola 5 / 13 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 Ivan Viola 6 / 13 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 Ivan Viola 7 / 13 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! Ivan Viola 8 / 13 Projective Textures projector simulation spotlight simulation shadow maps Ivan Viola 9 / 13 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 Ivan Viola 10 / 13 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 Ivan Viola 11 / 13 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) Ivan Viola 12 / 13 Thank you Ivan Viola viola@cg.tuwien.ac.at
© Copyright 2024 Paperzz