Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736:...

80
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: Texturing CIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer Graphics 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/CIS736 Instructor home page: http://www.cis.ksu.edu/~bhsu Readings: Handout 1: Texturing Sections 20.3 – 20.4 , Eberly 2 e – see http://snurl.com/1ye72 NeHe tutorials 6 (basics), 11 (flag), 15 & 17 (fonts) – http://nehe.gamedev.net More NeHe texturing tutorials: 35 (rendering), 42 (coloring) Advanced CG Topics 1 of 8: Filters for Texturing

Transcript of Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736:...

Page 1: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

CIS 736Computer Graphics

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/CIS736

Instructor home page: http://www.cis.ksu.edu/~bhsu

Readings:

Handout 1: Texturing

Sections 20.3 – 20.4, Eberly 2e – see http://snurl.com/1ye72

NeHe tutorials 6 (basics), 11 (flag), 15 & 17 (fonts) – http://nehe.gamedev.net

More NeHe texturing tutorials: 35 (rendering), 42 (coloring)

Advanced CG Topics 1 of 8:Filters for Texturing

Page 2: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 3: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 4: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 5: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Source Material: Gröller & JeschkeICGA, Vienna Institute of

Technology

Source Material: Gröller & JeschkeICGA, Vienna Institute of

Technology

Adapted from slides

© 2002 Gröller, E. & Jeschke, S. Vienna Institute of Technology

Page 6: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Other Source Material: Other Source Material:

CMSC 427 Computer Graphics

University of Maryland – College Park (UMD)

Fall 2007

Course: http://snurl.com/20csv

Instructor: http://www.cs.umd.edu/~djacobs

Tobias IsenbergScientific 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 599.64/601.64 Computer Graphics

Fall 2005

Course: http://snurl.com/20cu0

Instructor: http://www.cs.rug.nl/~isenberg

Page 7: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Why Texturing?Why Texturing?

Adapted from slides

© 2002 Gröller, E. & Jeschke, S. Vienna Institute of Technology

Page 8: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Introduction [1]:Motivation

Introduction [1]:Motivation

Adapted from slides

© 2005 Isenberg, T., University of Calgary (now at U. Groningen)

Page 9: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Introduction [2]:Properties and their Mappings

Page 10: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Concerning TexturesConcerning Textures

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 11: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Without TexturesWithout Textures

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

From Computer Graphics: Principles and Practice

© 1991 Foley, van Dam, Feiner, Hughes

Page 12: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

With TexturesWith Textures

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

From Computer Graphics: Principles and Practice

© 1991 Foley, van Dam, Feiner, Hughes

Page 13: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Texture ImageTexture Image

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

u

v

Page 14: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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)

Texture Mapping How-To [1]:Goals and Texture Elements

(Texels)

Page 15: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Texture Mapping How-To [2]:Adapting Polygons-to-Pixels

Pipeline

Page 16: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Texture Mapping How-To [3]: Mapping Definition

u = s(x, y, z)

v = t(x, y, z)

Page 17: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Texture Mapping How-To [4]:General Procedure

Page 18: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Texture Mapping How-To [5]: Projective Textures, Projector

Functions

Page 19: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Texture Mapping How-To [6]: (Manual) Surface Parameterization

Page 20: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Texture Mapping How-To [6]: Inherent (u, v) Coordinates

Page 21: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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)

Two-Step Approach [1]:Duality (Again)

Page 22: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Two-Step Approach [2]:Example – Cylindrical Mapping

Page 23: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Two-Step Approach [3]:Example – Spherical Mapping

Page 24: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Two-Step Approach [4]:Example – Planar Mapping

Page 25: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Two-Step Approach [5]:Example – Cuboid/Box Mapping

Page 26: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

O Mapping [1]:Object-to-Surface

Page 27: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

O Mapping [2]:Illustrations

1. Reflected Ray 2. Object Normal

3. Object Center 4. Normal of Intermediate Surface

Page 28: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Correspondence Functions [1]:Texture Coordinates

u = s(x, y, z)

v = t(x, y, z)

Page 29: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Correspondence Functions [2]:Tiling, Mirroring, Clamping,

Borders

Page 30: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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 IllustratedCorrespondence Functions [3]:

Clamping and Borders Illustrated

Page 31: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Application of Texture Values:Combining Texturing and Lighting

Page 32: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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…?The End…?

Done! … well, almost

Page 33: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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)

AcknowledgementsAcknowledgements

Page 34: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Surface Detail: Imitating Complexity by Texturing Smooth

Objects

Surface Detail: Imitating Complexity by Texturing Smooth

Objects

Adapted from slides

© 2002 Gröller, E. & Jeschke, S. Vienna Institute of Technology

Page 35: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Texture PropertiesTexture Properties

Adapted from slides

© 2002 Gröller, E. & Jeschke, S. Vienna Institute of Technology

Procedural: either

Procedural: either

Page 36: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Procedural Texture [1]Procedural Texture [1]

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland… how to get this?

Page 37: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Procedural Texture [2]Procedural Texture [2]

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 38: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Procedural Texture [3]Procedural Texture [3]

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 39: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Procedural Texture [4]Procedural Texture [4]

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 40: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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]

Procedural Models:Example [1]

Page 41: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Procedural Models:Example [2]

Procedural Models:Example [2]

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 42: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Procedural Models:Example [3]

Procedural Models:Example [3]

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 43: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Procedural Models:Example [4]

Procedural Models:Example [4]

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 44: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Procedural Models:Example [5]

Procedural Models:Example [5]

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 45: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

What is Texture?What is Texture?

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 46: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Perlin Noise [1]:How to Simulate Variation

Perlin Noise [1]:How to Simulate Variation

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 47: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Perlin Noise [2]:Properties

Perlin Noise [2]:Properties

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 48: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Procedural Textures:Strategy

Procedural Textures:Strategy

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 49: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

1-D Perlin Noise1-D Perlin Noise

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 50: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

2-D Perlin Noise2-D Perlin Noise

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 51: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Smooth NoiseSmooth Noise

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 52: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Linear InterpolationLinear Interpolation

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 53: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Cubic InterpolationCubic Interpolation

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

… more on this later:

Splines

Bezier curves

Bicubic surfaces

Page 54: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Gradient (Perlin) NoiseGradient (Perlin) Noise

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 55: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas State University

Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics

Perlin Noise:Example

Perlin Noise:Example

Adapted from slides

© 2007 Jacobs, D. W., University of Maryland

Page 56: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 57: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 58: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 59: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 60: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 61: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 62: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 63: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 64: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 65: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

http://snurl.com/20swn

Page 66: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 67: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 68: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 69: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 70: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 71: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 72: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 73: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 74: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 75: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 76: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 77: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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

Page 78: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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)

Page 79: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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)

Page 80: Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.

Computing & Information SciencesKansas 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)