Unformatted text preview:

Texture MappingReadingWhat adds visual realism?Texture mappingNon-parametric texture mappingParametric texture mappingImplementing texture mappingMapping to texture image coordsTexture resamplingSolid texturesSolid textures (cont'd)Displacement mappingBump mappingBump mapping exampleDisplacement vs. bump mappingDisplacement vs. bump mapping (cont'd)Environment mappingCombining texture mapsCan define material by programHow do we anti-alias textures?Cost of filtering can be reducedNext time: Hierarchical modelingUniversity of Texas at Austin CS384G - Computer Graphics Fall 2008 Don FussellTexture MappingUniversity of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 2ReadingRequiredWatt, intro to Chapter 8 and intros to 8.1, 8.4, 8.6, 8.8.RecommendedPaul S. Heckbert. Survey of texture mapping. IEEE Computer Graphics and Applications 6(11): 56--67, November 1986.OptionalWatt, the rest of Chapter 8Woo, Neider, & Davis, Chapter 9James F. Blinn and Martin E. Newell. Texture and reflection in computer generated images. Communications of the ACM 19(10): 542--547, October 1976.University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 3What adds visual realism?Geometry onlyPhong shadingPhong shading +Texture mapsUniversity of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 4Texture mappingTexture mapping (Woo et al., fig. 9-1)Texture mapping allows you to take a simple polygon and give it the appearance of something much more complex.Due to Ed Catmull, PhD thesis, 1974Refined by Blinn & Newell, 1976Texture mapping ensures that “all the right things” happen as a textured polygon is transformed and rendered.University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 5Non-parametric texture mappingWith “non-parametric texture mapping”:Texture size and orientation are fixedThey are unrelated to size and orientation of polygonGives cookie-cutter effectUniversity of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 6With “parametric texture mapping,” texture size and orientation are tied to the polygon.Idea:Separate “texture space” and “screen space”Texture the polygon as before, but in texture spaceDeform (render) the textured polygon into screen spaceA texture can modulate just about any parameter – diffuse color, specular color, specular exponent, …Parametric texture mappingUniversity of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 7Implementing texture mappingA texture lives in it own abstract image coordinates parameterized by (u,v) in the range ([0..1], [0..1]): It can be wrapped around many different surfaces:Computing (u,v) texture coordinates in a ray tracer is fairly straightforward. Note: if the surface moves/deforms, the texture goes with it.University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 8Mapping to texture image coordsThe texture is usually stored as an image. Thus, we need to convert from abstract texture coordinate:(u,v) in the range ([0..1], [0..1])to texture image coordinates:(utex,vtex) in the range ([0.. wtex], [0.. htex])Q: What do you do when the texture sample you need lands between texture pixels?University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 9Texture resamplingWe need to resample the texture:A common choice is bilinear interpolation:€ T(a,b) = T[i + Δx, j + Δy]= (1− Δx)(1− Δy)T[i, j] + Δx(1− Δy)T[i +1, j]+(1− Δx)ΔyT[i, j +1] + ΔxΔyT[i +1, j +1]University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 10Solid texturesQ: What kinds of artifacts might you see from using a marble veneer instead of real marble?One solution is to use solid textures:Use model-space coordinates to index into a 3D textureLike “carving” the object from the materialOne difficulty of solid texturing is coming up with the textures.University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 11Solid textures (cont'd)Here's an example for a vase cut from a solid marble texture:Solid marble texture by Ken Perlin, (Foley, IV-21)University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 12Displacement mappingTextures can be used for more than just color.In displacement mapping, a texture is used to perturb the surface geometry itself:These displacements “animate” with the surfaceQ: Do you have to do hidden surface calculations on Q?~University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 13In bump mapping, a texture is used to perturb the normal:Use the original, simpler geometry, Q(u), for hidden surfacesUse the normal from the displacement map for shading:N = normal[Q(u)] Q: What artifacts in the images would reveal that bump mapping is a fake?Bump mapping~~University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 14Bump mapping exampleTexture #1(diffuse color)Texture #2(bump map)Rendered ImageUniversity of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 15Displacement vs. bump mappingInput textureRendered as displacement map over a rectangular surfaceUniversity of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 16Displacement vs. bump mapping (cont'd) Original rendering Rendering with bump map wrapped around a cylinderBump map and rendering by Wyvern AldingerUniversity of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 17Environment mappingIn environment mapping (also known as reflection mapping), a texture is used to model an object's environment:Rays are bounced off objects into environmentColor of the environment used to determine color of the illuminationReally, a simplified form of ray tracingEnvironment mapping works well when there is just a single object – or in conjunction with ray tracingUnder simplifying assumptions, environment mapping can be implemented in hardware.With a ray tracer, the concept is easily extended to handle refraction as well as reflection.University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 18Combining texture mapsUsing texture maps in combination gives even better effects.DiffusecolorEnvironment map(not necessaryin ray


View Full Document

UT CS 384G - Texture Mapping

Documents in this Course
Shading

Shading

27 pages

Shading

Shading

27 pages

Load more
Download Texture Mapping
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Texture Mapping and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Texture Mapping 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?