CS 3388: Texture Mapping. [Hill § 8.5]. Enemy Territory: Quake Wars . Per-vertex colour not enough. In real objects, large changes to shape less frequent than large changes in colour. colour change: red vs white. shape change: almost flat!.
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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Enemy Territory: Quake Wars
colour change: red vs white
shape change: almost flat!
Do we build this wall out of 1,000 vertices
of different colours?
Or ... only 4 vertices + “brick texture”!
thousands of vertices
dozens of vertices
texture coordinates (per-vertex)
= texture mapped
very few vertices
very complex colour!
sample the texture at (u,v)
t0 = (0,0)
t0 = (0,0)
interpolate (u,v) based on 2Dscreen coords
interpolate (u,v)based on 3D eye coords
halfway mark in ...
screen coords 3D coords
Texture pixel = “texel”
Q: what should colour of this pixel be?
... and what about this pixel?
avg = 1
A: integrated colour (average colour)
over corresponding area in texture
But how do we integrate texture for each pixel??
(slow? complex? or is there a fast hacky trick?)
get avg of 64 samples here
by taking just 1 sample here!
sampling of fake colour-coded mipmaps
(yellow=128£128 white = 1£1)
sampling of actual texture mipmaps
// where mag_mode = GL_NEAREST or GL_LINEAR
// where min_mode= GL_NEAREST or GL_LINEAR or GL_LINEAR_MIPMAP_LINEAR
2004 George Bush campaign ad
// where wrap_mode = GL_CLAMP_TO_EDGE or GL_REPEAT
repeated four times