Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer Graphics William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: Course web site: Instructor home page: Readings: Handout 1: Texturing Sections 20.3 – 20.4, Eberly 2 e – see NeHe tutorials 6 (basics), 11 (flag), 15 & 17 (fonts) – More NeHe texturing tutorials: 35 (rendering), 42 (coloring) Advanced CG Topics 1 of 8: Filters for Texturing
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Online Recorded Lectures for CIS 736 Computer Graphics Project Topics for CIS 736 Advanced Topics in Computer Graphics (8) 1. Filters for Texturing – first month 2. More Mappings – second month 3. Advanced Lighting Models – second month 4. Advanced Ray-Tracing – first month 5. Advanced Ray-Tracing, concluded – second month 6. Global Illumination: Photon Maps (Radiosity) – third month 7. More on Scientific, Data, Info Visualization – third month 8. Terrain – first month Recommended Background Reading for CIS 736 Shared Lectures with CIS 636 (Computer Graphics) Regular in-class lectures (35) and labs (7) Guidelines for paper reviews – week of Mon 25 Feb 2008 Preparing term project presentations and demos for graphics – April
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Background Expected Both Courses Proficiency in C/C++ or strong proficiency in Java and ability to learn Strongly recommended: matrix theory or linear algebra (e.g., Math 551) At least 120 hours for semester (up to 150 depending on term project) Textbook: 3D Game Engine Design, Second Edition (2006), Eberly Angel’s OpenGL: A Primer recommended CIS 636 Introduction to Computer Graphics Fresh background in precalculus: Algebra 1-2, Analytic Geometry Linear algebra basics: matrices, linear bases, vector spaces Watch background lectures CIS 736 Computer Graphics Recommended: first course in graphics (background lectures as needed) OpenGL experience helps Read up on shaders and shading languages Watch advanced topics lectures; see list before choosing project topic
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Lecture Outline References: Gröller & Jeschke (2002), Isenberg (2005), Jacobs (2007) Texture Mapping Explained Definitions Design principles Texture Pipeline Using Simple Intermediate Surfaces (Cylinder, Sphere, Plane, Box) Procedural Textures Simple regular patterns (e.g., checkerboard) Terrain Clouds Perlin Noise Models Interpolation Turbulence Later: Relation to Fractals, Fractional Brownian Motion (fBm) Anisotropic Filtering
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Source Material: Gröller & Jeschke ICGA, Vienna Institute of Technology Adapted from slides © 2002 Gröller, E. & Jeschke, S. Vienna Institute of Technology
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Other Source Material: CMSC 427 Computer Graphics University of Maryland – College Park (UMD) Fall 2007 Course: Instructor: Tobias Isenberg Scientific Visualization and Computer Graphics Group Department of Mathematics and Computing Science University of Groningen Formerly Graphics Jungle Lab Department of Computer Science University of Calgary CPSC / Computer Graphics Fall 2005 Course: Instructor:
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Why Texturing? Adapted from slides © 2002 Gröller, E. & Jeschke, S. Vienna Institute of Technology
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Introduction [1]: Motivation Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen)
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Introduction [2]: Properties and their Mappings
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Concerning Textures Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Without Textures Adapted from slides © 2007 Jacobs, D. W., University of Maryland From Computer Graphics: Principles and Practice © 1991 Foley, van Dam, Feiner, Hughes
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics With Textures Adapted from slides © 2007 Jacobs, D. W., University of Maryland From Computer Graphics: Principles and Practice © 1991 Foley, van Dam, Feiner, Hughes
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Texture Image Adapted from slides © 2007 Jacobs, D. W., University of Maryland u v
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Texture Mapping How-To [1]: Goals and Texture Elements (Texels)
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Texture Mapping How-To [2]: Adapting Polygons-to-Pixels Pipeline
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Texture Mapping How-To [3]: Mapping Definition u = s(x, y, z) v = t(x, y, z)
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Texture Mapping How-To [4]: General Procedure
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Texture Mapping How-To [5]: Projective Textures, Projector Functions
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Texture Mapping How-To [6]: (Manual) Surface Parameterization
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Texture Mapping How-To [6]: Inherent (u, v) Coordinates
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Two-Step Approach [1]: Duality (Again)
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Two-Step Approach [2]: Example – Cylindrical Mapping
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Two-Step Approach [3]: Example – Spherical Mapping
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Two-Step Approach [4]: Example – Planar Mapping
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Two-Step Approach [5]: Example – Cuboid/Box Mapping
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) O Mapping [1]: Object-to-Surface
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) O Mapping [2]: Illustrations 1. Reflected Ray2. Object Normal 3. Object Center 4. Normal of Intermediate Surface
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Correspondence Functions [1]: Texture Coordinates u = s(x, y, z) v = t(x, y, z)
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Correspondence Functions [2]: Tiling, Mirroring, Clamping, Borders
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Correspondence Functions [3]: Clamping and Borders Illustrated
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Application of Texture Values: Combining Texturing and Lighting
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) The End…? Done! … well, almost
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Acknowledgements
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Surface Detail: Imitating Complexity by Texturing Smooth Objects Adapted from slides © 2002 Gröller, E. & Jeschke, S. Vienna Institute of Technology
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Texture Properties Adapted from slides © 2002 Gröller, E. & Jeschke, S. Vienna Institute of Technology Procedural: either
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Procedural Texture [1] Adapted from slides © 2007 Jacobs, D. W., University of Maryland … how to get this?
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Procedural Texture [2] Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Procedural Texture [3] Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Procedural Texture [4] Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2007 Jacobs, D. W., University of Maryland Procedural Models: Example [1]
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Procedural Models: Example [2] Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Procedural Models: Example [3] Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Procedural Models: Example [4] Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Procedural Models: Example [5] Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics What is Texture? Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Perlin Noise [1]: How to Simulate Variation Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Perlin Noise [2]: Properties Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Procedural Textures: Strategy Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics 1-D Perlin Noise Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics 2-D Perlin Noise Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Smooth Noise Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Linear Interpolation Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Cubic Interpolation Adapted from slides © 2007 Jacobs, D. W., University of Maryland … more on this later: Splines Bezier curves Bicubic surfaces
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Gradient (Perlin) Noise Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Perlin Noise: Example Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Perlin Noise Mixtures [1]: Idea Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Perlin Noise Mixtures [2]: Example Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Perlin Noise Mixtures [3]: Texture Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Procedural Turbulence [1]: Using Perlin Noise Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Procedural Turbulence [2]: Example Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Procedural Turbulence [3]: Texture Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics More Procedural Textures Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Example with Illumination Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Nonlinear Changes in Intensity Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics 3-D Textures Adapted from slides © 2007 Jacobs, D. W., University of Maryland © 2007 Feiner, S. & Nayar, S. K. Computer Vision Lab Department of Computer Science Columbia University
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics OpenGL Texturing [1]: Steps Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics OpenGL Texturing [2]: Specify 2-D Texture Object Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics OpenGL Texturing [3]: Specify How Texture Is Applied Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics OpenGL Texturing [4]: Enable Texture and Draw Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics OpenGL Texturing [5]: Create Texture Object Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics OpenGL Texturing [6]: Putting It All Together Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Texture Synthesis: Goal Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Texture Synthesis: Goal Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Texture Synthesis: Probabilistic Modeling Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Texturing: Like Copying, but Not Just Repetition Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Texturing with Blocks [1]: Technique Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Texturing with Blocks [2]: Examples Adapted from slides © 2007 Jacobs, D. W., University of Maryland
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Summary Textures Definitions Design principles Texture Pipeline Part of polygons-to-pixels Uses same spaces (coordinate systems) and more Using Simple Intermediate Surfaces (Cylinder, Sphere, Plane, Box) Procedural Textures Simple regular patterns (e.g., checkerboard) Other textures: terrain, clouds, etc. Perlin Noise Models Interpolation approach Turbulence for material properties Anisotropic Filtering References: Gröller & Jeschke (2002), Isenberg (2005), Jacobs (2007)
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Terminology Texture Coordinate Systems (Spaces) Model / Object: 3-D (x, y, z) World / Scene: 3-D (x, y, z) Camera / Eye: 3-D (u, v, n) Window / Screen: 2-D (u, v) Texture: 1-D, 2-D, or 3-D; (s, t) for 2-D Texture Pipeline Perlin Noise Interpolation Turbulence for material properties Anisotropic Filtering References: Gröller & Jeschke (2002), Isenberg (2005), Jacobs (2007)
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Next: Animation (Class), Ray Tracing (736) Vicki Shreiner: Animation and Depth Buffering Double buffering Lights: positioning Illumination: light models, attenuation Material properties Animation basics in OpenGL Vicki Schreiner: Imaging and Raster Primitives Ed Angel: Texture Mapping Dave Shreiner: Advanced Topics Display lists and vertex arrays Accumulation buffer Fog Stencil buffering Fragment programs (to be concluded in Tutorial 3)