Advanced Texturing Methods Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, December 8, 2003.

Slides:



Advertisements
Similar presentations
16.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 16 – Some Special Rendering Effects.
Advertisements

Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 6, 2014 TEXTURE MAPPING TEXTURES BUMP MAPPING ENVIRONMENT MAPPING PROCEDURAL TEXTURING.
Computer Graphics - Class 10
CS 376 Introduction to Computer Graphics 04 / 09 / 2007 Instructor: Michael Eckmann.
Texture Mapping from Watt, Ch. 8 Jonathan Han. Topics Discussed Texture Map to Models Bump Maps, Light Maps Environment (Reflection) Mapping 3D Textures.
Texture Mapping April 9, The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number.
TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz
Environmental Mapping CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Texture Mapping Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
CS 4731: Computer Graphics Lecture 17: Texturing Emmanuel Agu.
CS559: Computer Graphics Lecture 27: Texture Mapping Li Zhang Spring 2008 Many slides from Ravi Ramamoorthi, Columbia Univ, Greg Humphreys, UVA and Rosalee.
Guilford County Sci Vis V204.01
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
Course Overview, Introduction to CG Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, September 5, 2003.
10/21/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Terrain Dynamic LOD.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Noise Based Texture Noise Based Texture CMPS260 Presentation Guoping Xu Mar. 05, 2003.
Texture Mapping. 2 The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number is insufficient.
1 Texture. 2 Overview Introduction Painted textures Bump mapping Environment mapping Three-dimensional textures Functional textures Antialiasing textures.
Polygon Shading. Assigning color to a shape to make graphical scenes look realistic, or artistic, or whatever effect we’re attempting to achieve But first.
Modelling and Simulation Types of Texture Mapping.
Polygon Lists & 3-D File Formats Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, February 18, 2002.
Linear Interpolation, Brief Introduction to OpenGL Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, September.
CS 481 Preview, Some Lighting Details Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Wednesday, November 19, 2003.
ECSE 4750: Computer Graphics Rensselaer Polytechnic Institute Nov 5, 2012 Texture and Texture Mapping.
Fundamentals of Data Analysis Lecture 9 Management of data sets and improving the precision of measurement.
CS 376 Introduction to Computer Graphics 04 / 11 / 2007 Instructor: Michael Eckmann.
Texture Mapping. Scope Buffers Buffers Various of graphics image Various of graphics image Texture mapping Texture mapping.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
Bézier Algorithms & Properties Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, March 3, 2004.
Homogeneous Form, Introduction to 3-D Graphics Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, October 20,
Shadows via Projection Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Wednesday, November 5, 2003.
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
Image Synthesis Rabie A. Ramadan, PhD 1. 2 About my self Rabie A. Ramadan My website and publications
More on Advanced Interfaces, Image Basics Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, November 21, 2003.
Introduction to Procedural Methods, Particles Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, March.
Computing & Information Sciences Kansas State University Lecture 10 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
Intro. to Advanced Lighting, Basic Ray Tracing Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, April.
More on Environment Mapping Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Wednesday, December 10, 2003.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Lighting Review & Example Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, November 17, 2003.
Week 10:Rendering 1. In the last lecture we saw how to model objects and represent them as wireframe models. Wire frame models depict the outer hull of.
October 9, 2002Serguei A. Mokhov, 1 COMP471 – Computer Graphics OpenGL: Texture Mapping.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Bézier Curves & Surfaces Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, March 1, 2004.
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
Computing & Information Sciences Kansas State University Lecture 12 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
11/24/ :45 Graphics II Shadow Maps Reflections Session 5.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Details of Texture Mapping Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, December 1, 2003.
More on Ray Tracing Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, April 14, 2004.
第三课. Overview of this Section Concept of Texture Mapping ( 纹理映射 ) 2D Texture 3D Texture Environment Mapping Bump Mapping Others OpenGL Implementation.
Texture Coordinates CS418 Computer Graphics John C. Hart.
Module 05 –Bump mapping Module 05 – Bump mapping Module 05 Advanced mapping techniques: Bump mapping.
Some Notes on 3-D Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, October 24, 2003.
CS 376 Introduction to Computer Graphics 04 / 13 / 2007 Instructor: Michael Eckmann.
Introduction to 3-D Viewing Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, October 27, 2003.

- Introduction - Graphics Pipeline
Computer Graphics Texture Mapping
Week 7 - Monday CS361.
Graphics, Fall 2017 Lecture 24: Texture Mapping
Class 26 more textures environmental textures Color ramps
Chapter IX Bump Mapping
Class 27 more textures environmental textures Color ramps
Presentation transcript:

Advanced Texturing Methods Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, December 8, 2003

8 Dec 2003CS 3812 Review: Quick & Dirty Texture Generation An easy way to generate a small texture is to begin with a string array, then turn map characters into colors somehow. For an example, see qdtexture.cpp, on the web page.

8 Dec 2003CS 3813 Review: Procedural Texture [1/6] Often, the trickiest part of texture mapping is generating the texture image. Possible sources: External images. From photographs, various graphics programs. Reading the frame buffer. Use glReadPixels. Program-generated texture. This is what we look at now. Texture generated “from scratch” by a program is called procedural texture. We look at a technique for procedural-texture generation pioneered by Ken Perlin of New York University.

8 Dec 2003CS 3814 Review: Procedural Texture [2/6] Perlin’s idea is to begin with a special “noise” function. Properties: Easy to generate. Random-ish looking. All variation is at about the same scale. All variation has about the same amplitude. Highest, lowest, and average values are about the same for all parts of the image.

8 Dec 2003CS 3815 Review: Procedural Texture [3/6] One type of noise we would like to be able to use is 1/f- noise. All frequencies present, with amplitudes proportional to the inverse of the frequency. So “the height of a hill is proportional to its width”. 1/f-noise is the way the real world looks. But it’s a pain to generate. Perlin suggests simulating 1/f-noise: Sum many copies of his noise function, each at twice the frequency and half the amplitude of the previous.

8 Dec 2003CS 3816 Review: Procedural Texture [4/6] Another idea of Perlin: “noise with cusps”. Sum as before, but take the absolute value of each noise function before summing them all. Good for cloudy- looking things.

8 Dec 2003CS 3817 Review: Procedural Texture [5/6] Perlin’s technique is aimed at 3-D textures. Here we can make objects appear to be cut out of a 3- D block of material. Essentially, let the texture coordinates be the same as the vertex coordinates. Unfortunately, OpenGL 1.1 (which most of us seem to have) does not support 3-D texturing in a system-independent manner. However, we can use Perlin’s techniques to generate 2-D texture simply by taking a slice of a 3-D noise function.

8 Dec 2003CS 3818 Review: Procedural Texture [6/6] I have created a package (“Pnoise”) to create a minor variation on Perlin’s noise function. Major differences: His is entirely deterministic. I use an externally seeded pseudo-random number generator. I produce noise functions that “wrap”. The images on the previous slides were generated by my code, not Perlin’s. Specifically: pnoise3d( … ), fnoise3d( … ), filterfnoise3d( …, pnoise_abs). See proctexture.cpp for sample code.

8 Dec 2003CS 3819 More on Procedural Texture: Producing Colors [1/2] One piece remains in order to produce interesting procedural textures: Convert a noise function into an image. We need to be able to map noise values (in [–1,1]) to colors (RGB).

8 Dec 2003CS More on Procedural Texture: Producing Colors [2/2] One versatile method: Choose colors for specified values in [–1,1]. Then determine the color associated with a value by lirping between the two nearest specified values. EXAMPLE TIME. –1.0– –1.0–

8 Dec 2003CS More on Procedural Texture: Other Methods Other methods for generating procedural texture are possible (and are not really that difficult to come up with). For example: A particle doing a random walk and leaving behind trails of color. This technique was used to generate some of the 3-D textures used in BLUIsculpt. Think of something else …

8 Dec 2003CS Bump Mapping Demo Bump Mapping Like texturing, except look up normals instead of colors. Use the bump-map normal to perturb the usual surface normal. Result: bumpy-looking surface. With a smooth silhouette. Bump mapping requires per-fragment lighting. And therefore it is not well suited to the OpenGL pipeline. But bump mapping is not hard to add to a ray tracer. What do you suppose is a good way to generate a bump map?

8 Dec 2003CS Environment Mapping: Introduction In environment mapping, we simulate mirror-like reflection using texturing. Generate texture coordinates based on the direction that light, originating from the viewer, would reflect off the surface. Need: Viewing location (always (0,0,0) in OpenGL). Vertex coordinates. Surface normal.

8 Dec 2003CS Environment Mapping: Sphere Map A simple environment-mapping technique is to use a sphere map. Take the reflected light direction, add 1 to z, normalize. Use the resulting x, y as texture coordinates. The texture is a fish-eye-lens picture of the environment. E.g., see plate 21 in the red book.

8 Dec 2003CS Environment Mapping: Chrome Mapping Chrome mapping is a type of environment mapping in which we do not attempt to produce a realistic picture of the environment. Just make mirror-like reflections of something. Then objects look metallic, regardless of the incorrect reflections. Note: Some people would not call chrome mapping a type of environment mapping. I would. In particular, it is legal on assignment #11.

8 Dec 2003CS Environment Mapping: OpenGL OpenGL includes automatic texture-coordinate generation. One of the options does a sphere map. In initialization (or whereever): glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); To enable: glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); Disabling is as usual. Normals must be specified. glTexCoord * is not necessary. How to generate the texture, though … ?