DOC PREVIEW
UVA CS 445 - Texture Maps

This preview shows page 1-2-3-18-19-36-37-38 out of 38 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS 445 / 645 Introduction to Computer GraphicsTexture MappingTexture MapsSlide 4Slide 5Example Texture MapSlide 7Slide 8Texture CoordinatesTexturesExample use of TextureStep 2 – create Texture ObjectsStep 3 – Specify which texture object is about to be definedStep 4 – Begin defining textureStep 5 – Assign image dataglTexImage2D – Arg 1glTexImage2D – Arg 2glTexImage2D – Arg 3glTexImage2D – Args 4-6glTexImage2D – Args 7 & 8glTexImage2D – Arg 9Step 6 – Apply textureglTexEnv()gluScaleImage()glCopyTexImage2D()glTexSubImage2D()Bump MappingSlide 28Displacement MappingMipmapsMIPMAPSSlide 32gluBuild2DMipmapsAdvanced MipmapsFilteringNext AssignmentFinal ExamTestsCS 445 / 645Introduction to Computer GraphicsLecture 17Lecture 17Texture MapsTexture MapsLecture 17Lecture 17Texture MapsTexture MapsTexture MappingLimited ability to generate complex surfaces with Limited ability to generate complex surfaces with geometrygeometryImages can convey the illusion of geometryImages can convey the illusion of geometryImages painted onto Images painted onto polygons is called texture polygons is called texture mappingmappingLimited ability to generate complex surfaces with Limited ability to generate complex surfaces with geometrygeometryImages can convey the illusion of geometryImages can convey the illusion of geometryImages painted onto Images painted onto polygons is called texture polygons is called texture mappingmappingTexture MapsChapter 9 of Open GL Programming Guide (Red Chapter 9 of Open GL Programming Guide (Red Book)Book)Images applied to polygons to enhance the visual Images applied to polygons to enhance the visual effect of a sceneeffect of a scene•Rectangular arrays of dataRectangular arrays of data–Color, luminance, Color, luminance, alphaalpha–Components of array called Components of array called texelstexelsWe’ve also had volumetricWe’ve also had volumetric voxels voxelsChapter 9 of Open GL Programming Guide (Red Chapter 9 of Open GL Programming Guide (Red Book)Book)Images applied to polygons to enhance the visual Images applied to polygons to enhance the visual effect of a sceneeffect of a scene•Rectangular arrays of dataRectangular arrays of data–Color, luminance, Color, luminance, alphaalpha–Components of array called Components of array called texelstexelsWe’ve also had volumetricWe’ve also had volumetric voxels voxelsTexture MappingTexture map is an image, two-dimensional array of color Texture map is an image, two-dimensional array of color values (values (texelstexels))Texels are specified by texture’s (u,v) spaceTexels are specified by texture’s (u,v) spaceAt each screen pixel, texel can be used to substitute a At each screen pixel, texel can be used to substitute a polygon’s surface property (color)polygon’s surface property (color)We must map (u,v) space to polygon’s (s, t) spaceWe must map (u,v) space to polygon’s (s, t) spaceTexture map is an image, two-dimensional array of color Texture map is an image, two-dimensional array of color values (values (texelstexels))Texels are specified by texture’s (u,v) spaceTexels are specified by texture’s (u,v) spaceAt each screen pixel, texel can be used to substitute a At each screen pixel, texel can be used to substitute a polygon’s surface property (color)polygon’s surface property (color)We must map (u,v) space to polygon’s (s, t) spaceWe must map (u,v) space to polygon’s (s, t) spaceUVSTTexture Mapping(u,v) to (s,t) mapping can be explicitly set at vertices (u,v) to (s,t) mapping can be explicitly set at vertices by storing by storing texture coordinatestexture coordinates with each vertex with each vertexHow do we compute (u,v) to (s,t) mapping for points How do we compute (u,v) to (s,t) mapping for points in betweenin between•Watch for aliasingWatch for aliasing•Watch for many to one mappingsWatch for many to one mappings•Watch for perspective foreshortening effects and linear Watch for perspective foreshortening effects and linear interpolationinterpolation(u,v) to (s,t) mapping can be explicitly set at vertices (u,v) to (s,t) mapping can be explicitly set at vertices by storing by storing texture coordinatestexture coordinates with each vertex with each vertexHow do we compute (u,v) to (s,t) mapping for points How do we compute (u,v) to (s,t) mapping for points in betweenin between•Watch for aliasingWatch for aliasing•Watch for many to one mappingsWatch for many to one mappings•Watch for perspective foreshortening effects and linear Watch for perspective foreshortening effects and linear interpolationinterpolationExample Texture MapApplied to tilted polygonExample Texture MapglVertex3d (s, s, s)glTexCoord2d(1,1);glVertex3d (-s, -s, -s)glTexCoord2d(1,1);Example Texture MapglVertex3d (s, s, s)glTexCoord2d(5, 5);glVertex3d (s, s, s)glTexCoord2d(1, 1);Texture CoordinatesEvery polygon has object coordinates and texture Every polygon has object coordinates and texture coordinatescoordinates•Object coordinates describe where polygon vertices are on Object coordinates describe where polygon vertices are on the screenthe screen•Texture coordinates describe texel coordinates of each Texture coordinates describe texel coordinates of each vertex (usually 0 -> 1)vertex (usually 0 -> 1)•Texture coordinates are interpolated along vertex-vertex Texture coordinates are interpolated along vertex-vertex edgesedgesglTexCoord{1234}{sifd}(TYPE coords)glTexCoord{1234}{sifd}(TYPE coords)Every polygon has object coordinates and texture Every polygon has object coordinates and texture coordinatescoordinates•Object coordinates describe where polygon vertices are on Object coordinates describe where polygon vertices are on the screenthe screen•Texture coordinates describe texel coordinates of each Texture coordinates describe texel coordinates of each vertex (usually 0 -> 1)vertex (usually 0 -> 1)•Texture coordinates are interpolated along vertex-vertex Texture coordinates are interpolated along vertex-vertex edgesedgesglTexCoord{1234}{sifd}(TYPE coords)glTexCoord{1234}{sifd}(TYPE coords)TexturesTexture ObjectTexture Object•An OpenGL data type that keeps textures resident in memory and An OpenGL data type that keeps textures resident in memory and provides identifiers to easily access themprovides identifiers to easily access them•Provides efficiency gains over having to repeatedly load and reload a Provides efficiency gains over having to repeatedly


View Full Document

UVA CS 445 - Texture Maps

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