08-texture

08-texture - Lecture 9 Texture Mapping Reading Hearn...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 9 Texture Mapping
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Reading • Hearn & Baker (2/E). 10.17-18 • Hearn & Baker (3/E). 14.8-14.9 • Angel, pages 373-386 Recommended: • A. Grassner. Introduction to Ray Tracing. Chapter on Texture Mapping. • Paul S. Heckbert. Survey of texture mapping. Computer Graphics and Applications6(11): 56-67, November 1986 http://www.cs.cmu.edu/afs/cs/user/ph/www/texsurv.ps.gz
Background image of page 2
Lecture outline: 1. Texture Mapping Concept 2. Texture Mapping 3. Texture Filtering: Mip Maps and Summed Area Table 4. More Texturing Methods 5. Texture Mapping Issues in OGL
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Texture Mapping • 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, 1974
Background image of page 4
What Texture Mapping helps? • After lighting computation and rasterization, we have – a per-pixel color value (called fragment color ): RGBA – a per-pixel depth value: Z • Given a texture, what to do with it? – First, we need to know which part of texture corresponds to the pixel. We need a mapping. – Second, we need to know the average texture color contributing to the pixel. We need texture filtering.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Non-Parametric Texture Mapping With non parametric texture mapping: – Texture size and orientation are fixed – Unrelated to size and orientation of polygon – Gives a cookie-cutter effect
Background image of page 6
Parametric Texture Mapping With parametric texture mapping, texture size and orientation are tied to the polygon: – Separate texture space and screen space – Texture the polygon as before but in texture space – Deform (render) the textured polygon into screen space
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Texture Space: uv • A texture lives in its own image coordinates paramaterized by ( u,v ) s.t. u [0,1] and v [0,1] Note: • If the given image’s resolution is width x height , each texel is of size ( 1/width , 1/height ) in the uv space and the texel value (e.g. RGB) should locate exactly at the center of the texel width and height are usually powers of 2 for ease of computation e.g. a 4x4 texture texel (tex ture el ement)
Background image of page 8
Implementing Texture Mapping • We can wrap the texture around many different surfaces: u v v u u u v v
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Texture Coordinate: Inverse Mapping • Consider an object point P visible to a pixel p (given by the ray tracer). • Texture mapping takes a texture map as input. • To determine which texel in the texture map is mapped to P, a mapping from P to the texture map is needed. • On hitting P, the ray tracer will invoke an inverse mapping function, which is primitive dependent (just like ray-object intersection) to get the needed color. • Once the color of P is known, you can apply Phong shading to determine the exact shade of p. See texture-details.pdf (in lecture.html) for examples
Background image of page 10
Texture Resampling • What do we do when the texture sample lands between texel center?
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/19/2009 for the course COMP 341 taught by Professor Qu,huamin during the Spring '09 term at HKUST.

Page1 / 50

08-texture - Lecture 9 Texture Mapping Reading Hearn...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online