1 / 32

CIS 636/736 Computer Graphics Lecture 10 of 42

CIS 636/736 Computer Graphics Lecture 10 of 42. Surface Detail 4: Mappings. William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://snipurl.com/1y5gc Course web site: http://www.kddresearch.org/Courses/CIS636

cahil
Télécharger la présentation

CIS 636/736 Computer Graphics Lecture 10 of 42

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CIS 636/736 Computer GraphicsLecture 10 of 42 Surface Detail 4: Mappings William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://snipurl.com/1y5gc Course web site: http://www.kddresearch.org/Courses/CIS636 Instructor home page: http://www.cis.ksu.edu/~bhsu Readings: Sections 20.5 – 20.13, Eberly 2e – see http://snurl.com/1ye72 Next class (Lab 2): Textures in OpenGL: A Primer (Angel, 3e ) CIS 636/736: (Introduction to) Computer Graphics

  2. Review: Texture Mapping parametric coordinates texture coordinates window coordinates world coordinates CIS 636/736: (Introduction to) Computer Graphics

  3. Review:Common Texture Coordinate Mappings • Orthogonal • Cylindrical • Spherical • Perspective Projection • Texture Chart © 2006, Durand & Cutler, MIT CSAIL (6.837) CIS 636/736: (Introduction to) Computer Graphics

  4. Projective Texture Example • Modeling from photographs • Using input photos as textures Figure from Debevec, Taylor & Malik http://www.debevec.org/Research CIS 636/736: (Introduction to) Computer Graphics

  5. Phong's Illumination Model Constant Diffuse Color Diffuse Texture Color Texture used as Label Texture used as Diffuse Color Texture Mapping & Illumination • Texture mapping can be used to alter some or all of the constants in the illumination equation: • pixel color, diffuse color, alter the normal, …. CIS 636/736: (Introduction to) Computer Graphics

  6. Texture Chart • Pack triangles intoa single image CIS 636/736: (Introduction to) Computer Graphics

  7. Questions? CIS 636/736: (Introduction to) Computer Graphics

  8. Today • 2D Texture Mapping • Procedural Solid Textures • Other Mapping Techniques • Texture Aliasing CIS 636/736: (Introduction to) Computer Graphics

  9. Procedural Textures f (x,y,z) → color Image by Turner Whitted CIS 636/736: (Introduction to) Computer Graphics

  10. Procedural Textures • Advantages: • easy to implement in ray tracer • more compact than texture maps (especially for solid textures) • infinite resolution • Disadvantages • non-intuitive • difficult to match existing texture CIS 636/736: (Introduction to) Computer Graphics

  11. Questions? Justin Legakis Ken Perlin Justin Legakis CIS 636/736: (Introduction to) Computer Graphics

  12. Today • 2D Texture Mapping • Procedural Solid Textures • Other Mapping Techniques: • Bump Mapping • Displacement Mapping • Environment Mapping (for Reflections) • Light Maps (for Illumination) • Texture Aliasing CIS 636/736: (Introduction to) Computer Graphics

  13. What's Missing? • What's the difference between a real brick wall and a photograph of the wall texture-mapped onto a plane? • What happens if we change the lighting or the camera position? CIS 636/736: (Introduction to) Computer Graphics

  14. Remember Gouraud Shading? • Instead of shading with the normal of the triangle, shade the vertices with the average normal and interpolate the color across each face Illusion of a smooth surface with smoothly varying normals CIS 636/736: (Introduction to) Computer Graphics

  15. Phong Normal Interpolation (Not Phong Shading) • Interpolate the average vertex normals across the face and compute per-pixel shading Must be renormalized CIS 636/736: (Introduction to) Computer Graphics

  16. Bump Mapping • Use textures to alter the surface normal • Does not change the actual shape of the surface • Just shaded as if it were a different shape Swirly Bump Map Sphere w/Diffuse Texture & Bump Map Sphere w/Diffuse Texture CIS 636/736: (Introduction to) Computer Graphics

  17. Bump Mapping • Treat the texture as a single-valued height function • Compute the normal from the partial derivatives in the texture CIS 636/736: (Introduction to) Computer Graphics

  18. Another Bump Map Example Bump Map Cylinder w/Diffuse Texture Map Cylinder w/Texture Map & Bump Map CIS 636/736: (Introduction to) Computer Graphics

  19. What's Missing? • There are no bumps on the silhouette of a bump-mapped object • Bump maps don’t allow self-occlusion or self-shadowing CIS 636/736: (Introduction to) Computer Graphics

  20. Displacement Mapping • Use the texture map to actually move the surface point • The geometry must be displaced before visibility is determined CIS 636/736: (Introduction to) Computer Graphics

  21. Displacement Mapping Image from: Geometry Caching for Ray-Tracing Displacement Maps by Matt Pharr and Pat Hanrahan. note the detailed shadows cast by the stones CIS 636/736: (Introduction to) Computer Graphics

  22. Displacement Mapping Ken Musgrave CIS 636/736: (Introduction to) Computer Graphics

  23. Today • 2D Texture Mapping • Procedural Solid Textures • Other Mapping Techniques: • Projective Shadows and Shadow Maps • Bump Mapping • Displacement Mapping • Environment Mapping (for Reflections) • Light Maps (for Illumination) • Texture Aliasing CIS 636/736: (Introduction to) Computer Graphics

  24. Environment Maps • We can simulate reflections by using the direction of the reflected ray to index a spherical texture map at "infinity". • Assumes that all reflected rays begin from the same point. CIS 636/736: (Introduction to) Computer Graphics

  25. What's the Best Chart? CIS 636/736: (Introduction to) Computer Graphics

  26. Environment Mapping Example Terminator II CIS 636/736: (Introduction to) Computer Graphics

  27. Texture Maps for Illumination • Also called "Light Maps" Quake CIS 636/736: (Introduction to) Computer Graphics

  28. Questions? Image by Henrik Wann Jensen Environment map by Paul Debevec CIS 636/736: (Introduction to) Computer Graphics

  29. Today • 2D Texture Mapping • Procedural Solid Textures • Other Mapping Techniques: • Texture Aliasing CIS 636/736: (Introduction to) Computer Graphics

  30. Textures can Alias • Aliasing is the under-sampling of a signal, and it's especially noticeable during animation nearest neighbor mipmaps & linear interpolation CIS 636/736: (Introduction to) Computer Graphics

  31. Textures can Alias • Small details may "pop" in and out of view nearest neighbor mipmaps & linear interpolation CIS 636/736: (Introduction to) Computer Graphics

  32. Next Time: Lab 2: Shading and Texturing in OpenGL CIS 636/736: (Introduction to) Computer Graphics

More Related