Presentation is loading. Please wait.

Presentation is loading. Please wait.

Similar presentations


Presentation on theme: ""— Presentation transcript:

165 COMPUTER GRAPHICS CHAPTER 20 CS 482 – Fall 2017 TEXTURE MAPPING
TEXTURES BUMP MAPPING ENVIRONMENT MAPPING PROCEDURAL TEXTURING

166 CHAPTER 20: TEXTURE MAPPING
TEXTURES BASICS Mapping a pattern onto the object’s surfaces can greatly enhance the scene’s appeal and/or realism. CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 166

167 CHAPTER 20: TEXTURE MAPPING
TEXTURES UV COORDINATES One approach to texture mapping directly maps the 2D texture coordinates, called UV SPACE, into the 3D world space coordinates. Planar Mapping Cylindrical Mapping Spherical Mapping CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 167

168 CHAPTER 20: TEXTURE MAPPING
TEXTURES TILING When the surface being textured is much larger than the image being mapped, it is possible to tile the image repeatedly over the surface. Care must be taken to develop images that do not produce discernible seams or patterns when tiled. The symmetric patterns of the reversed images are more noticeable in the tiled image on the left while the seams of the repeated images are more noticeable in the one on the right. CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 168

169 BUMP MAPPING ADJUSTING NORMAL VECTORS
To add more realism to a texture-mapped image, an additional action, known as a bump mapping, can be applied to the object’s surface. Applying the texture to this surface, while computationally expensive, produces a sense of depth far superior to simple texture mapping. Bump mapping (left) alters the surface’s normal vector, while displacement mapping (right) alters the surface itself. CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 169

170 Low-res with normals generated from high-res
BUMP MAPPING INTACT SILHOUETTE Bump mapping basically applies a pattern of perturbations to the normal vectors on the surface of the object being rendered. When an illumination model (e.g., Phong shading) is applied with these altered normal vectors, the appearance of a rich, detailed texture results. Low Resolution (6,272 polygons) high Resolution (6,422,528 polygons) Low-res with normals generated from high-res (6,272 polygons) CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 170

171 CHAPTER 20: TEXTURE MAPPING
BUMP MAPPING DISPLACEMENT MAPPING Displacement mapping actually alters the object’s underlying grid to implement the 3D surface details, eliminating the silhouette inconsistencies, but greatly increasing the processing cost. CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 171

172 CHAPTER 20: TEXTURE MAPPING
BUMP MAPPING SUBTLE DISTINCTION The image on the left is bump mapped, while the image on the right is displacement mapped. CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 172

173 CHAPTER 20: TEXTURE MAPPING
ENVIRONMENT MAPPING SPHERICAL MAPPING To produce an effect that appears like 3D reflection, environment mapping projects the surrounding environment onto a 2D image and then texture maps that result onto the “reflective” object. With spherical mapping, The entire environment is mapped to a radius-one disk (the front to the inner core of the disk and the rear to the outer ring). Cross-section of environment, with front on the right and rear on the left Bad news: The entire perimeter of the sphere map is mapped to a “singularity” on the far side of the object. CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 173

174 CHAPTER 20: TEXTURE MAPPING
ENVIRONMENT MAPPING LATITUDE MAPPING With latitude mapping, The sphere is treated like a globe and mapped from 3d to 2d via longitudes and latitudes. Bad news: There is still a seam where the left and right edges of the texture map meet when mapped to the object. CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 174

175 CHAPTER 20: TEXTURE MAPPING
ENVIRONMENT MAPPING CUBE MAPPING In Cube Mapping, Six textures are created from each positive and negative Cartesian direction surrounding the object. Bad news: Particular facets of the object might require up to three renderings (e.g., front, right, and bottom) to ensure that all faces hit by the reflection rays are displayed. CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 175

176 PROCEDURAL TEXTURING PERLIN NOISE
Certain textures in nature (clouds, marble, streams, etc.) tend to follow a pseudorandom pattern that may be simulated by means of noise functions. A set of pseudorandom values are generated at set intervals. A continuous curve is generated by smoothly interpolating between these values. Several curves like this are generated, each with certain restrictions on the amplitude (the difference between the minimum and maximum values generated) and the wavelength (the interval gap). Summing these curves yields the final noise function. CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 176

177 CHAPTER 20: TEXTURE MAPPING
PROCEDURAL TEXTURING NOISE TEXTURES Extending the generating of a noise function to two dimensions yields interesting and useful textures. + + + + + = CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 177

178 CHAPTER 20: TEXTURE MAPPING
PROCEDURAL TEXTURING TEXTURE SYNTHESIS To synthesize a larger image that follows the same pattern as a given smaller image, start with a noisy image of the desired size. Replace each pixel in the new image by looking at its already colored neighbors, finding a pixel in the original image with the closest pattern of neighbors, and coloring the new pixel with that old pixel’s color. CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 178

179 PROCEDURAL TEXTURING ADDITIONAL TEXTURE SYNTHESIS EXAMPLES
CS 482 – Fall 2017 CHAPTER 20: TEXTURE MAPPING PAGE 179


Download ppt ""

Similar presentations


Ads by Google