DOC PREVIEW
UVA CS 445 - Texture Mapping

This preview shows page 1-2-3-21-22-23-42-43-44 out of 44 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Texture MappingTextures3D Rendering Pipeline (for direct illumination)Surface TexturesSlide 5ParameterizationOption: Varieties of projectionsOption: unfold the surfaceOption: make an atlasOption: it’s the artist’s problemOverviewSlide 12Slide 13Slide 14Naïve Texture MappingNaïve Texturing ArtifactsInterpolating ParametersSlide 18Slide 19Perspective-Correct InterpolationSlide 21Texture FilteringTexture Map AliasingSlide 24Mip MapsMIP-map ExampleSummed-area tablesSummed-Area TablesSlide 29Modulation texturesTexture Mapping VariationsBump MappingMore Bump MappingDisplacement MappingIllumination MapsEnvironment MapsSolid texturesProcedural TextureProcedural Texture GallerySlide 40Slide 41Slide 42Slide 43Slide 44Greg HumphreysCS445: Intro GraphicsUniversity of Virginia, Fall 2003Texture MappingGreg HumphreysUniversity of VirginiaCS 445, Fall 2003SurfaceImageTextureTextures•Describe color variation in interior of 3D polygonWhen scan converting a polygon, vary pixel colors according to values fetched from a textureAngel Figure 9.3“Texels”“Pixels”3D Rendering Pipeline (for direct illumination)3D PrimitivesModelingTransformationModelingTransformationProjectionTransformationProjectionTransformationClippingClippingLightingLightingImageViewportTransformationViewportTransformationScanConversionScanConversion2D Image Coordinates3D Modeling Coordinates3D World Coordinates3D Camera Coordinates2D Screen Coordinates2D Screen CoordinatesViewingTransformationViewingTransformation3D World Coordinates2D Image CoordinatesTexture mappingSurface Textures•Add visual detail to surfaces of 3D objectsPolygonal modelWith surface textureSurface Textures•Add visual detail to surfaces of 3D objects[Daren Horley]Parameterizationgeometrygeometry++==imageimagetexture maptexture map•Q: How do we decide where on the geometryeach color from the image should go?Option: Varieties of projections[Paul Bourke][Paul Bourke]Option: unfold the surface[Piponi2000]Option: make an atlas[Sander2001]charts atlas surfaceOption: it’s the artist’s problemOverview•Texture mapping methodsParameterizationMappingFiltering•Texture mapping applicationsModulation texturesIllumination mappingBump mappingEnvironment mappingImage-based renderingVolume texturesNon-photorealistic renderingTexture Mapping•Steps:Define textureSpecify mapping from texture to surfaceLookup texture values during scan conversion(0,0)(1,0)(0,1)uvxyModelingCoordinateSystemImageCoordinateSystemstTextureCoordinateSystemTexture Mapping•When scan convert, map from …image coordinate system (x,y) tomodeling coordinate system (u,v) totexture image (t,s)(0,0)(1,0)(1,1)(0,1)uvxyModelingCoordinateSystemImageCoordinateSystemstTextureCoordinateSystemTexture MappingAllison Klein, Princeton•Texture mapping is a 2D projective transformationtexture coordinate system: (t,s) toimage coordinate system (x,y)Naïve Texture Mapping•A first cut at a texture-mapping rasterizer:For each pixel:»Interpolate u & v down edges and across spans»Look up nearest texel in texture map»Color pixel according to texel color (possibly modulated by lighting calculations)McMillan’s demo of this is at http://graphics.lcs.mit.edu/classes/6.837/F98/Lecture21/Slide05.htmlWhat artifacts do you see in this demo?Naïve Texturing Artifacts•Warping at edges of triangles•A more obvious example: http://graphics.lcs.mit.edu/classes/6.837/F98/Lecture21/Slide06.html•Consider the geometry of interpolating parameters more carefullyInterpolating Parameters•The problem turns out to be fundamental to interpolating parameters in screen-spaceUniform steps in screen space  uniform steps in world spaceTexture MappingLinear interpolationof texture coordinatesCorrect interpolationwith perspective divideHill Figure 8.42Interpolating Parameters•Perspective foreshortening is not getting applied to our interpolated parametersParameters should be compressed with distanceLinearly interpolating them in screen-space doesn’t do this •Is this a problem with Gouraud shading?•A: It can be, but we usually don’t notice (why?)http://graphics.lcs.mit.edu/classes/6.837/F98/Lecture21/Slide17.htmlPerspective-Correct Interpolation•Skipping a bit of math to make a long story short…Rather than interpolating u and v directly, interpolate u/z and v/z »These do interpolate correctly in screen space»Also need to interpolate z and multiply per-pixelProblem: we don’t know z anymoreSolution: we do know w  1/zSo…interpolate uw and vw and w, and compute u = uw/w and v = vw/w for each pixel»This unfortunately involves a divide per pixel (Just 1?)http://graphics.lcs.mit.edu/classes/6.837/F98/Lecture21/Slide14.htmlOverview•Texture mapping methodsParameterizationMappingFiltering•Texture mapping applicationsModulation texturesIllumination mappingBump mappingEnvironment mappingImage-based renderingNon-photorealistic renderingTexture FilteringAngel Figure 9.4•Must sample texture to determine color at each pixel in imageTexture Map Aliasing•Naive texture mapping aliases badly •Look familiar?int uval = (int) (u * denom + 0.5f);int vval = (int) (v * denom + 0.5f);int pix = texture.getPixel(uval, vval);•Actually, each pixel maps to a region in texture|PIX| < |TEX| »Easy: interpolate (bilinear) between texel values |PIX| > |TEX|»Hard: average the contribution from multiple texels|PIX| ~ |TEX|»Still need interpolation!Texture FilteringAngel Figure 9.14•Size of filter depends on projective warpCan prefilter images »Mip maps»Summed area tablesMagnification MinificationMip Maps•Keep textures prefiltered at multiple resolutionsFor each pixel, linearly interpolate between two closest levels (e.g., trilinear filtering) Fast, easy for hardware•Why “Mip” maps?MIP-map Example•No filtering:•MIP-map texturing:AAAAAAAGHMY EYES ARE BURNINGWhere are my glasses?Summed-area tables•At each texel keep sum of all values down & rightTo compute sum of all values within a rectangle,simply subtract two entriesBetter ability to capture very oblique projectionsBut, cannot store values in a single byteS1S2Summed-Area Tables•Mipmaps assume that each pixel projects to a square in the texture (which is a lie)•SAT can integrate texels covered by the pixel more exactly (but still quickly)•Example:MIP-map texturing Summed-area table


View Full Document

UVA CS 445 - Texture Mapping

Documents in this Course
Lighting

Lighting

49 pages

Color

Color

20 pages

Clipping

Clipping

10 pages

Shadows

Shadows

95 pages

Color

Color

37 pages

Radiosity

Radiosity

49 pages

Clipping

Clipping

59 pages

Assign 3

Assign 3

28 pages

Splines

Splines

17 pages

Color

Color

17 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?