三維繪圖程式設計 3D Graphics Programming Design 第七章基礎材質張貼技術嘉大資工系盧天麒

Size: px
Start display at page:

Download "三維繪圖程式設計 3D Graphics Programming Design 第七章基礎材質張貼技術嘉大資工系盧天麒"

Transcription

1 三維繪圖程式設計 3D Graphics Programming Design 第七章基礎材質張貼技術嘉大資工系盧天麒 1

2 In this chapter, you will learn The basics of texture mapping Texture coordinates Texture objects and texture binding Texture specification with 2D Texture filtering Mipmaps and automatic mipmap generation Texture parameters, wrap modes, and level of detail Textured terrain 2

3 Introduction You can create photo-realistic worlds with texture mapping The object being viewed on the screen are real 3

4 An Overview of Texture Mapping Texture mapping allows you Attach images to polygons to provide more realistic graphics The first step in bringing the realism Texture maps Are composed of rectangular arrays of data Each element of these arrays is called a texel 4

5 An Overview of Texture Mapping Texture maps can be mapped to nonrectangular objects Spheres, cylinders, and other 3D object models 5

6 An Overview of Texture Mapping One-dimensional textures have a width and a height equal to only 1 pixel The two-dimensional texture has both a width and a height Three-dimensional textures have a width, height, and depth Called volume textures 6

7 7

8 Texture Coordinates The lower-left corner of a texture is given the coordinates (0, 0) The upper-right corner of a texture is given the coordinates (1, 1) Texture coordinates for 2D textures are given the notation (s, t) s and t are equal to a value from 0 to 1 8

9 Texture Coordinates 1D, 3D, and 4D texture coordinates are given the notation (s), (s, t, r), and (s, t, r, q), respectively 9

10 10

11 Texture Coordinates Texture coordinates are specified with the gltexcoord( ) function As an example, you would set a 2D texture coordinate to (0.2, 0.4) gltexcoord2f(0.2, 0.4); 11

12 Texture Coordinates The following code sets the 2D texture coordinate for a polygon: glbegin(gl_polygon); gltexcoord2f(0.0f, 0.0f); glvertex3f(-0.5f, 0.5f, 0.5f); // lower left gltexcoord2f(1.0f, 0.0f); glvertex3f(0.5f, 0.5f, 0.5f); // lower right gltexcoord2f(1.0f, 1.0f); glvertex3f(-0.5f, 0.5f, -0.5f); // upper right gltexcoord2f(0.0f, 1.0f); glvertex3f(-0.5f, 0.5f, -0.5f); // upper left glend(); 12

13 Using the Texture Map Once you have your texture image loaded into memory Specify it as a texture map with OpenGL Generate what is called a texture object Store information about the texture Including the image data and how it is to be applied 13

14 Using the Texture Map Texturing is enabled and disabled through the use of the glenable( ) and gldisable( ) functions The constants GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, or GL_TEXTURE_CUBE_MAP 14

15 Texture Objects Texture objects are internal data structures that hold texture data and parameters Each texture object has state associated with it that is unique to that texture Using unique identifiers for texture objects 15

16 Texture Objects OpenGL provides the glgentextures( ) function void glgentextures(glsizei n, GLuint *textures); This function returns n previously unused objects identifiers in the textures array unsigned int textureobjects[3]; glgentextures(3, textureobjects); 16

17 Texture Binding The first time you bind a texture object, it acquires a new set of states with initial values You can then modify to suit your needs The glbindtexture( ) function performs the binding operation 17

18 Texture Binding void glbindtexture(glenum target, GLuint texture); target must be the desired target of the bound textures: GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, or GL_TEXTURE_CUBE_MAP texture is simply the identifier for the texture object you want to bind 18

19 Texture Binding For example glbindtexture(gl_texture_2d, textureobject[0]); While a texture object is bound to a target, OpenGL texturing operations on that target affect the texture object 19

20 Texture Binding Examine this code glbindtexture(gl_texture_2d, textureobjects[0]); // all texture operations using GL_TEXTURE_2D now affect textureobjects[0] glbindtexture(gl_texture_3d, textureobjects[1]); // all texture operations using GL_TEXTURE_2D still affect textureobjects[0] // all texture operations using GL_TEXTURE_3D now affect textureobjects[1] glbindtexture(gl_texture_2d, textureobjects[2]); // all texture operations using GL_TEXTURE_3D still affect textureobjects[1] // all texture operations using GL_TEXTURE_2D now affect textureobjects[2] 20

21 Deleting Texture Objects Prevent resource leaks you need to delete them Texture objects are deleted by calling the gldeletetextures( ) function void gldeletetextures(glsizei n, GLuint *textures); The textures parameter contains n texture object identifiers to be deleted 21

22 Resident Textures All video cards have a limited amount of memory Determine whether a texture object is currently a part of the working set of texture objects 22

23 Resident Textures Function Glboolean glaretexturesresident(glsizei n, GLuint *textures, GLboolean *residences); This function returns GL_TRUE if all of the texture objects identified in textures are resident in the working set If at least one of the textures identified in textures is not resident in the working set, the function returns GL_FALSE 23

24 Specifying Textures OpenGL provides three main functions for specifying a texture: glteximage1d( ), glteximage2d( ), glteximage3d( ) 24

25 Specifies 2D Texture Image void glteximage2d( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ); 25

26 Specifies 2D Texture Image Specifies a 2D texture image ary/en-us/opengl/glfunc03_16jo.asp target: Must be GL_TEXTURE_2D level: level-of-detail level. It must be 0 if you don t want to use mip-map. internalformat: GL_RGBA and many others Width / height: image width / height 26

27 Specifies 2D Texture Image internalformat The number of color components in the texture Must be 1, 2, 3, or 4, or one of the following symbolic constants: GL_ALPHA, GL_ALPHA4, GL_ALPHA8, GL_ALPHA12, GL_ALPHA16, GL_LUMINANCE, GL_LUMINANCE4, GL_LUMINANCE8, GL_LUMINANCE12, GL_LUMINANCE16, GL_LUMINANCE_ALPHA, GL_LUMINANCE4_ALPHA4, GL_LUMINANCE6_ALPHA2, GL_LUMINANCE8_ALPHA8, GL_LUMINANCE12_ALPHA4, GL_LUMINANCE12_ALPHA12, GL_LUMINANCE16_ALPHA16, GL_INTENSITY, GL_INTENSITY4, GL_INTENSITY8, GL_INTENSITY12, GL_INTENSITY16, GL_R3_G3_B2, GL_RGB, GL_RGB4, GL_RGB5, GL_RGB8, GL_RGB10, GL_RGB12, GL_RGB16, GL_RGBA, GL_RGBA2, GL_RGBA4, GL_RGB5_A1, GL_RGBA8, GL_RGB10_A2, GL_RGBA12, or GL_RGBA16. 27

28 Specifies 2D Texture Image Border: 0 or 1 0 : no border, image width & height must be power of 2. 1 : use border, image width & height must be power of 2 plus 2. 28

29 Specifies 2D Texture Image format: format of the image data GL_RGB, GL_RGBA, and many others type: data type of the image data pixel: A pointer to the image data in memory. (Hint: the BMP file you have loaded ) 29

30 Specifies 2D Texture Image Texture pixel format 30

31 Specifies 2D Texture Image Texture data type 31

32 Specifies 2D Texture Image The data type GL_UNSIGNED_BYTE_3_3_2 with the format being GL_RGB Red component is in bits 5-7 Green component is in bits 2-4 Blue component is in bits 0-1 GL_UNSIGNED_BYTE_3_3_2 type Red Green Blue

33 Specifies 2D Texture Image As an example, you have loaded an RGBA image into the variable texturedata that has a width and height of texturewidth and textureheight glteximage2d(gl_texture_2d, 0, GL_RGBA, texturewidth, textureheight, 0, GL_RGBA, GL_UNSIGNED_BYTE, texturedata); After this function is called, the texture is load and ready to use 33

34 Texture Filtering Texture mapping a polygon is the act of mapping from texture image space to frame buffer image space Texture filtering Tell OpenGL how it should map the texels to pixels when calculating the final image 34

35 Texture Filtering In texture filtering Magnification When a screen pixel represents a small portion of a texel Minification When a pixel contains a number of texels 35

36 Texture Filtering You can tell OpenGL how to handle both of these filtering cases with the gltexparameter( ) function 36

37 Texture Filtering void gltexparameter{if}(glenum target, Glenum pname, T param); void gltexparameter{if}v(glenum target, Glenum pname, T params); The value target parameter refers to the texture target and can be equal to GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, or GL_TEXTURE_CUBR_MAP The pname GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER 37

38 Texture Filtering When specifying the GL_TEXTURE_MAG_FILTER, the param may be equal to either GL_NEAREST or GL_LINEAR GL_NEAREST Tell OpenGL to use the texel nearest to the center of the pixel being rendered GL_LINEAR Tell OpenGL to use the weighted average of the four texels closest to the center of the pixel being rendered 38

39 Texture Filtering When specifying GL_TEXTURE_MIN_FILTER 39

40 Texture Filtering By default, the magnification filter is set to GL_LINEAR The minification is set to GL_NEAREST_MIPMAP_LINEAR 40

41 Basic Texture Example A basic example that applies a texture to two polygons This example moves two polygons along the z-axis to show the minification and magnification function texture filter settings Affect the visual quality of a texture map 41

42 Basic Texture Example 42

43 Basic Texture Example The polygon on the left uses GL_LINEAR for both minification and magnification Resulting in a smooth transition The polygon on the right uses GL_LINEAR for minification and GL_NEAREST for magnification The texture s visual quality changes slightly when it passes through the threshold for OpenGL to switch from minification to magnification 43

44 Basic Texture Example In the init( ) method, 6 steps: We first enable 2D texturing Load the texture image data using the CTargaImage class We then get an unused texture object through glgentextures( ) Bind the texture object Specify the minification and magnification for the texture object as GL_LINEAR Specify the texture with glteximage2d( ) We repeat the process for the second texture object 44

45 bool CGfxOpenGL::Init() { glclearcolor(0.0, 0.0, 0.0, 0.0); // enable 2D texturing glenable(gl_texture_2d); m_textureone = new CTargaImage; // load texture image data if (!m_textureone->load("rock.tga")) return false; // retrieve "unused" texture object glgentextures(1, &m_textureobjectone); // bind the texture object glbindtexture(gl_texture_2d, m_textureobjectone); // minimum required to set the min and mag texture filters gltexparameteri(gl_texture_2d, GL_TEXTURE_MAG_FILTER, GL_LINEAR); gltexparameteri(gl_texture_2d, GL_TEXTURE_MIN_FILTER, GL_LINEAR); // now that the texture object is bound, specify a texture for it glteximage2d(gl_texture_2d, 0, GL_RGB, m_textureone->getwidth(), m_textureone->getheight(), 0, GL_RGB, GL_UNSIGNED_BYTE, m_textureone->getimage()); // create the second texture object glgentextures(1, &m_textureobjecttwo); glbindtexture(gl_texture_2d, m_textureobjecttwo); gltexparameteri(gl_texture_2d, GL_TEXTURE_MAG_FILTER, GL_NEAREST); gltexparameteri(gl_texture_2d, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glteximage2d(gl_texture_2d, 0, GL_RGB, m_textureone->getwidth(), m_textureone->getheight(), 0, GL_RGB, GL_UNSIGNED_BYTE, m_textureone->getimage()); // initialize movement variables m_zpos = -5.0f; m_zmovenegative = true; return true; } 45

46 Basic Texture Example In DrawPlane( ), we are specifying the texture coordinates and drawing the vertices of the texture polygon void CGfxOpenGL::DrawPlane() { glbegin(gl_triangle_strip); gltexcoord2f(2.0, 0.0); glvertex3f(2.0, -2.0, -2.0); gltexcoord2f(0.0, 0.0); glvertex3f(-2.0, -2.0, -2.0); gltexcoord2f(2.0, 2.0); glvertex3f(2.0, -2.0, 2.0); gltexcoord2f(0.0, 2.0); glvertex3f(-2.0, -2.0, 2.0); glend(); } 46

47 Build Mip-Maps (1/4) Refer to a texture that is composed of many different levels Each level has dimensions that are half of the previous one The GLU library provides the glubuild2dmipmaps( ) and glubuild1dmipmaps( ) functions to build mipmaps 47

48 Build Mip-Maps (2/4) int glubuild2dmipmaps( GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data ); url=/library/en-us/opengl/glufnc01_406r.asp 48

49 Build Mip-Maps (3/4) target : Must be GL_TEXTURE_2D components :The number of color components in the texture. Must be 1, 2, 3, or 4 width, height :width / height of image. format : GL_RGB, GL_RGBA and many others type :The data type for data data :A pointer to the image data in memory glubuild2dmipmaps(gl_texture_2d, GL_RGB, 64, 64, GL_RGB, GL_UNSIGNED_BYTE, teximage0); 49

50 Build Mip-Maps (4/4) without mip-map with mip-map 50

51 Texture Parameter gltexparameter{if}(glenum target, GLenum pname, GLfloat param ) Set texture parameters url=/library/en-us/opengl/glfunc03_9upe.asp target: GL_TEXTURE_1D, GL_TEXTURE_2D pname / param: see next page 51

52 Texture Parameter 52

53 Texture Parameter Wrap Clamp both S, T Repeat both S, T Repeat T but Clamp S 53

54 Texture Parameter MAG filter When the pixel being textured maps to an area less than or equal to one texture element MIN filter When the pixel being textured maps to an area greater than one texture element 54

55 Texture Parameter GL_NEAREST GL_LINEAR pixel texel Get average color... GL_NEAREST_MIPMAP_XXXXXX Find the most closely match mipmap GL_LINEAR_MIPMAP_XXXXXXX Find the most 2 closely match mipmap and get average 55

56 Textured Terrain A heightfield terrain is a virtual representation of a landscape Its data points are a 2D set of evenly spaced height values 56

57 Building the Mesh You will be determining the height values by loading a 32X32 grayscale Targa image into memory We will be using a grayscale image, the color values and efficiently the height values will range from 0 to

58 Building the Mesh After loading the height values into an array in memory You will have a set of data points that represent the height of the terrain 58

59 Building the Mesh You need to determine the distance between each height vertex Called map scale You will use the map scale to programmatically increase or decrease the actual width and height of the terrain in world units 59

60 Building the Mesh Skybox Is a large cube whose inside faces are textured with images representing the distant horizon Provide a good, simple way to enhance the environment of an outdoor graphics scene 60

61 Building the Mesh The position of the camera is used as the origin of the skybox We added mouse input control for the camera You can rotate and set the height of the camera with the mouse DrawTerrain( ) function 61

62 62

63 63

64 Summary You learned the basics of the texture mapping You have learned about Texture mapping allows you to attach images to polygons to create realistic objects The first time you bind a texture The texture object acquires a new state with initial values You can then modify to suit your needs After that, binding the effectively selects the texture 64

65 References Dave Astle and Kevin Hawkins, Beginning OpenGL Game Programming, 1st Edition, Course Technology PTR,

Graphics. Texture Mapping 고려대학교컴퓨터그래픽스연구실.

Graphics. Texture Mapping 고려대학교컴퓨터그래픽스연구실. Graphics Texture Mapping 고려대학교컴퓨터그래픽스연구실 3D Rendering Pipeline 3D Primitives 3D Modeling Coordinates Model Transformation 3D World Coordinates Lighting 3D World Coordinates Viewing Transformation 3D Viewing

More information

三維繪圖程式設計 3D Graphics Programming Design 第六章 Bitmap 影像及圖檔格式設定嘉大資工系盧天麒

三維繪圖程式設計 3D Graphics Programming Design 第六章 Bitmap 影像及圖檔格式設定嘉大資工系盧天麒 三維繪圖程式設計 3D Graphics Programming Design 第六章 Bitmap 影像及圖檔格式設定嘉大資工系盧天麒 1 In this chapter, you will learn How to use OpenGL bitmaps OpenGL pixel functions How to load and save the Targa image format 2 The

More information

Textures. Texture Mapping. Bitmap Textures. Basic Texture Techniques

Textures. Texture Mapping. Bitmap Textures. Basic Texture Techniques Texture Mapping Textures The realism of an image is greatly enhanced by adding surface textures to the various faces of a mesh object. In part a) images have been pasted onto each face of a box. Part b)

More information

CT5510: Computer Graphics. Texture Mapping

CT5510: Computer Graphics. Texture Mapping CT5510: Computer Graphics Texture Mapping BOCHANG MOON Texture Mapping Simulate spatially varying surface properties Phong illumination model is coupled with a material (e.g., color) Add small polygons

More information

Lecture 22 Sections 8.8, 8.9, Wed, Oct 28, 2009

Lecture 22 Sections 8.8, 8.9, Wed, Oct 28, 2009 s The s Lecture 22 Sections 8.8, 8.9, 8.10 Hampden-Sydney College Wed, Oct 28, 2009 Outline s The 1 2 3 4 5 The 6 7 8 Outline s The 1 2 3 4 5 The 6 7 8 Creating Images s The To create a texture image internally,

More information

Lighting and Texturing

Lighting and Texturing Lighting and Texturing Michael Tao Michael Tao Lighting and Texturing 1 / 1 Fixed Function OpenGL Lighting Need to enable lighting Need to configure lights Need to configure triangle material properties

More information

Lecture 19: OpenGL Texture Mapping. CITS3003 Graphics & Animation

Lecture 19: OpenGL Texture Mapping. CITS3003 Graphics & Animation Lecture 19: OpenGL Texture Mapping CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Introduce the OpenGL texture functions and options

More information

OpenGL Texture Mapping. Objectives Introduce the OpenGL texture functions and options

OpenGL Texture Mapping. Objectives Introduce the OpenGL texture functions and options OpenGL Texture Mapping Objectives Introduce the OpenGL texture functions and options 1 Basic Strategy Three steps to applying a texture 1. 2. 3. specify the texture read or generate image assign to texture

More information

Grafica Computazionale

Grafica Computazionale Grafica Computazionale lezione36 Informatica e Automazione, "Roma Tre" June 3, 2010 Grafica Computazionale: Lezione 33 Textures Introduction Steps in Texture Mapping A Sample Program Texturing algorithms

More information

CS212. OpenGL Texture Mapping and Related

CS212. OpenGL Texture Mapping and Related CS212 OpenGL Texture Mapping and Related Basic Strategy Three steps to applying a texture 1. specify the texture read or generate image assign to texture enable texturing 2. assign texture coordinates

More information

Objectives. Texture Mapping and NURBS Week 7. The Limits of Geometric Modeling. Modeling an Orange. Three Types of Mapping. Modeling an Orange (2)

Objectives. Texture Mapping and NURBS Week 7. The Limits of Geometric Modeling. Modeling an Orange. Three Types of Mapping. Modeling an Orange (2) CS 480/680 INTERACTIVE COMPUTER GRAPHICS Texture Mapping and NURBS Week 7 David Breen Department of Computer Science Drexel University Objectives Introduce Mapping Methods Texture Mapping Environmental

More information

CS 432 Interactive Computer Graphics

CS 432 Interactive Computer Graphics CS 432 Interactive Computer Graphics Lecture 7 Part 2 Texture Mapping in OpenGL Matt Burlick - Drexel University - CS 432 1 Topics Texture Mapping in OpenGL Matt Burlick - Drexel University - CS 432 2

More information

Chapter 9 Texture Mapping An Overview and an Example Steps in Texture Mapping A Sample Program Specifying the Texture Texture Proxy Replacing All or

Chapter 9 Texture Mapping An Overview and an Example Steps in Texture Mapping A Sample Program Specifying the Texture Texture Proxy Replacing All or Chapter 9 Texture Mapping An Overview and an Example Steps in Texture Mapping A Sample Program Specifying the Texture Texture Proxy Replacing All or Part of a Texture Image One Dimensional Textures Using

More information

Discussion 3. PPM loading Texture rendering in OpenGL

Discussion 3. PPM loading Texture rendering in OpenGL Discussion 3 PPM loading Texture rendering in OpenGL PPM Loading - Portable PixMap format 1. 2. Code for loadppm(): http://ivl.calit2.net/wiki/images/0/09/loadppm.txt ppm file format: Header: 1. P6: byte

More information

Overview. Goals. MipMapping. P5 MipMap Texturing. What are MipMaps. MipMapping in OpenGL. Generating MipMaps Filtering.

Overview. Goals. MipMapping. P5 MipMap Texturing. What are MipMaps. MipMapping in OpenGL. Generating MipMaps Filtering. Overview What are MipMaps MipMapping in OpenGL P5 MipMap Texturing Generating MipMaps Filtering Alexandra Junghans junghana@student.ethz.ch Advanced Filters You can explain why it is a good idea to use

More information

三維繪圖程式設計 3D Graphics Programming Design 第三章三維繪圖狀態設定和幾何元件繪製嘉大資工系盧天麒

三維繪圖程式設計 3D Graphics Programming Design 第三章三維繪圖狀態設定和幾何元件繪製嘉大資工系盧天麒 三維繪圖程式設計 3D Graphics Programming Design 第三章三維繪圖狀態設定和幾何元件繪製嘉大資工系盧天麒 1 In this chapter, you will learn How to access values in the OpenGL state machine The types of primitives available in OpenGL How to

More information

ก ก ก.

ก ก ก. 418382 ก ก ก ก 5 pramook@gmail.com TEXTURE MAPPING Textures Texture Object An OpenGL data type that keeps textures resident in memory and provides identifiers

More information

Texture Mapping. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Texture Mapping. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Texture Mapping CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce Mapping Methods - Texture Mapping - Environment Mapping - Bump Mapping Consider

More information

Lecture 07: Buffers and Textures

Lecture 07: Buffers and Textures Lecture 07: Buffers and Textures CSE 40166 Computer Graphics Peter Bui University of Notre Dame, IN, USA October 26, 2010 OpenGL Pipeline Today s Focus Pixel Buffers: read and write image data to and from

More information

Texture Mapping. Mike Bailey.

Texture Mapping. Mike Bailey. Texture Mapping 1 Mike Bailey mjb@cs.oregonstate.edu This work is licensed under a Creative Commons Attribution-NonCommercial- NoDerivatives 4.0 International License TextureMapping.pptx The Basic Idea

More information

Buffers. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Buffers. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015 Buffers 1 Objectives Introduce additional WebGL buffers Reading and writing buffers Buffers and Images 2 Buffer Define a buffer by its spatial resolution (n x m) and its depth (or precision) k, the number

More information

Texture Mapping CSCI 4229/5229 Computer Graphics Fall 2016

Texture Mapping CSCI 4229/5229 Computer Graphics Fall 2016 Texture Mapping CSCI 4229/5229 Computer Graphics Fall 2016 What are texture maps? Bitmap images used to assign fine texture to displayed surfaces Used to make surfaces appear more realistic Must move with

More information

CMSC 425: Lecture 12 Texture Mapping Thursday, Mar 14, 2013

CMSC 425: Lecture 12 Texture Mapping Thursday, Mar 14, 2013 CMSC 425: Lecture 12 Texture Mapping Thursday, Mar 14, 2013 Surface Detail: We have discussed the use of lighting as a method of producing more realistic images. This is fine for smooth surfaces of uniform

More information

9.Texture Mapping. Chapter 9. Chapter Objectives

9.Texture Mapping. Chapter 9. Chapter Objectives Chapter 9 9.Texture Mapping Chapter Objectives After reading this chapter, you ll be able to do the following: Understand what texture mapping can add to your scene Specify texture images in compressed

More information

CISC 3620 Lecture 7 Lighting and shading. Topics: Exam results Buffers Texture mapping intro Texture mapping basics WebGL texture mapping

CISC 3620 Lecture 7 Lighting and shading. Topics: Exam results Buffers Texture mapping intro Texture mapping basics WebGL texture mapping CISC 3620 Lecture 7 Lighting and shading Topics: Exam results Buffers Texture mapping intro Texture mapping basics WebGL texture mapping Exam results Grade distribution 12 Min: 26 10 Mean: 74 8 Median:

More information

Steiner- Wallner- Podaras

Steiner- Wallner- Podaras Texturing 2 3 Some words on textures Texturing = mapping 2D image to a model (*You will hear more on other texturing- methods in the course.) Not a trivial task! 4 Texturing how it works 5 UV coordinates

More information

CS452/552; EE465/505. Texture Mapping in WebGL

CS452/552; EE465/505. Texture Mapping in WebGL CS452/552; EE465/505 Texture Mapping in WebGL 2-26 15 Outline! Texture Mapping in WebGL Read: Angel, Chapter 7, 7.3-7.5 LearningWebGL lesson 5: http://learningwebgl.com/blog/?p=507 Lab3 due: Monday, 3/2

More information

GRAFIKA KOMPUTER. ~ M. Ali Fauzi

GRAFIKA KOMPUTER. ~ M. Ali Fauzi GRAFIKA KOMPUTER ~ M. Ali Fauzi Texture Mapping WHY TEXTURE? Imagine a Chess Floor Or a Brick Wall How to Draw? If you want to draw a chess floor, each tile must be drawn as a separate quad. A large flat

More information

Texture Mapping. Computer Graphics, 2015 Lecture 9. Johan Nysjö Centre for Image analysis Uppsala University

Texture Mapping. Computer Graphics, 2015 Lecture 9. Johan Nysjö Centre for Image analysis Uppsala University Texture Mapping Computer Graphics, 2015 Lecture 9 Johan Nysjö Centre for Image analysis Uppsala University What we have rendered so far: Looks OK, but how do we add more details (and colors)? Texture mapping

More information

Cap. 3 Textures. Mestrado em Engenharia Informática (6931) 1º ano, 1º semestre

Cap. 3 Textures. Mestrado em Engenharia Informática (6931) 1º ano, 1º semestre Cap. 3 Textures Mestrado em Engenharia Informática (6931) 1º ano, 1º semestre Overview Objectives Notion of texture Motivation Texture mapping, texture patterns, and texels Mapping textures to polygons,

More information

OpenGL. 1 OpenGL OpenGL 1.2 3D. (euske) 1. Client-Server Model OpenGL

OpenGL. 1 OpenGL OpenGL 1.2 3D. (euske) 1. Client-Server Model OpenGL OpenGL (euske) 1 OpenGL - 1.1 OpenGL 1. Client-Server Model 2. 3. 1.2 3D OpenGL (Depth-Buffer Algorithm Z-Buffer Algorithm) (polygon ) ( rendering) Client-Server Model X Window System ( GL ) GL (Indy O

More information

CSE 167: Introduction to Computer Graphics Lecture #7: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

CSE 167: Introduction to Computer Graphics Lecture #7: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018 CSE 167: Introduction to Computer Graphics Lecture #7: Textures Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018 Announcements Project 2 due this Friday at 2pm Grading in

More information

Applying Textures. Lecture 27. Robb T. Koether. Hampden-Sydney College. Fri, Nov 3, 2017

Applying Textures. Lecture 27. Robb T. Koether. Hampden-Sydney College. Fri, Nov 3, 2017 Applying Textures Lecture 27 Robb T. Koether Hampden-Sydney College Fri, Nov 3, 2017 Robb T. Koether (Hampden-Sydney College) Applying Textures Fri, Nov 3, 2017 1 / 24 Outline 1 Applying Textures 2 Photographs

More information

Mipmaps. Lecture 23 Subsection Fri, Oct 30, Hampden-Sydney College. Mipmaps. Robb T. Koether. Discrete Sampling.

Mipmaps. Lecture 23 Subsection Fri, Oct 30, Hampden-Sydney College. Mipmaps. Robb T. Koether. Discrete Sampling. Lecture 23 Subsection 8.8.2 Hampden-Sydney College Fri, Oct 30, 2009 Outline 1 2 3 4 5 dumay.info Outline 1 2 3 4 5 dumay.info Suppose we are drawing a 2-dimensional black-and-white checkerboard pattern.

More information

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 CSE 167: Introduction to Computer Graphics Lecture #8: Textures Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 Announcements Project 2 is due this Friday at 2pm Next Tuesday

More information

Computergraphics Exercise 15/ Shading & Texturing

Computergraphics Exercise 15/ Shading & Texturing Computergraphics Exercise 15/16 3. Shading & Texturing Jakob Wagner for internal use only Shaders Vertex Specification define vertex format & data in model space Vertex Processing transform to clip space

More information

Texturas. Objectives. ! Introduce Mapping Methods. ! Consider two basic strategies. Computação Gráfica

Texturas. Objectives. ! Introduce Mapping Methods. ! Consider two basic strategies. Computação Gráfica Texturas Computação Gráfica Objectives! Introduce Mapping Methods! Texture Mapping! Environmental Mapping! Bump Mapping! Light Mapping! Consider two basic strategies! Manual coordinate specification! Two-stage

More information

Texture Mapping. Texture Mapping. Map textures to surfaces. Trompe L Oeil ( Deceive the Eye ) The texture. Texture map

Texture Mapping. Texture Mapping. Map textures to surfaces. Trompe L Oeil ( Deceive the Eye ) The texture. Texture map CSCI 42 Computer Graphic Lecture 2 Texture Mapping A way of adding urface detail Texture Mapping Jernej Barbic Univerity of Southern California Texture Mapping + Shading Filtering and Mipmap Non-color

More information

OpenGL Über Buffers Extension

OpenGL Über Buffers Extension 1 of 70 OpenGL Über Buffers Extension Revision 0.29 Author Rob Mace Copyright 2002, 2003 ATI Technologies Inc. All rights reserved. This document is being distributed for the sole purpose of soliciting

More information

Fog example. Fog is atmospheric effect. Better realism, helps determine distances

Fog example. Fog is atmospheric effect. Better realism, helps determine distances Fog example Fog is atmospheric effect Better realism, helps determine distances Fog Fog was part of OpenGL fixed function pipeline Programming fixed function fog Parameters: Choose fog color, fog model

More information

INF3320 Computer Graphics and Discrete Geometry

INF3320 Computer Graphics and Discrete Geometry INF3320 Computer Graphics and Discrete Geometry Texturing Christopher Dyken Martin Reimers 06.10.2010 Page 1 Texturing Linear interpolation Real Time Rendering: Chapter 5: Visual Appearance Chapter 6:

More information

Lecture 5 3D graphics part 3

Lecture 5 3D graphics part 3 Lecture 5 3D graphics part 3 Shading; applying lighting Surface detail: Mappings Texture mapping Light mapping Bump mapping Surface detail Shading: takes away the surface detail of the polygons Texture

More information

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY 1(61) Information Coding / Computer Graphics, ISY, LiTH TSBK 07 Computer Graphics Ingemar Ragnemalm, ISY 1(61) Lecture 6 Texture mapping Skyboxes Environment mapping Bump mapping 2(61)2(61) Texture mapping

More information

Chapter 6 Texture Mapping

Chapter 6 Texture Mapping Chapter 6 Texture Mapping Understand what texture mapping can add to your scene Specifying the texture map and how its coordinates relate to those of the objects in your scene Control how a texture image

More information

Computer Graphics Texture Mapping

Computer Graphics Texture Mapping ! Computer Graphics 2013! 13. Texture Mapping Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2013-10-28 About the final examination - Next Friday (Nov. 8th) Night, - 7:30PM - 9:00PM (one and

More information

Texture and other Mappings

Texture and other Mappings Texture and other Mappings Texture Mapping Bump Mapping Displacement Mapping Environment Mapping Example: Checkerboard Particularly severe problems in regular textures 1 The Beginnings of a Solution: Mipmapping

More information

Computer Graphics. Three-Dimensional Graphics VI. Guoying Zhao 1 / 73

Computer Graphics. Three-Dimensional Graphics VI. Guoying Zhao 1 / 73 Computer Graphics Three-Dimensional Graphics VI Guoying Zhao 1 / 73 Texture mapping Guoying Zhao 2 / 73 Objectives Introduce Mapping Methods Texture Mapping Environment Mapping Bump Mapping Consider basic

More information

Shading/Texturing. Dr. Scott Schaefer

Shading/Texturing. Dr. Scott Schaefer Shading/Texturing Dr. Scott Schaefer Problem / Problem / Problem 4/ Problem / Problem / Shading Algorithms Flat Shading Gouraud Shading Phong Shading / Flat Shading Apply same color across entire polygon

More information

Texturing. Slides done bytomas Akenine-Möller and Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

Texturing. Slides done bytomas Akenine-Möller and Ulf Assarsson Department of Computer Engineering Chalmers University of Technology Texturing Slides done bytomas Akenine-Möller and Ulf Assarsson Department of Computer Engineering Chalmers University of Technology 1 Texturing: Glue n-dimensional images onto geometrical objects l Purpose:

More information

Magnification and Minification

Magnification and Minification Magnification and Minification Lecture 30 Robb T. Koether Hampden-Sydney College Fri, Nov 6, 2015 Robb T. Koether (Hampden-Sydney College) Magnification and Minification Fri, Nov 6, 2015 1 / 17 Outline

More information

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016 CSE 167: Introduction to Computer Graphics Lecture #8: Textures Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016 Announcements Project 2 due this Friday Midterm next Tuesday

More information

Introduction to OpenGL

Introduction to OpenGL Introduction to OpenGL Banafsheh Azari http://www.uni-weimar.de/cms/medien/cg.html What You ll See Today What is OpenGL? Related Libraries OpenGL Command Syntax B. Azari http://www.uni-weimar.de/cms/medien/cg.html

More information

OpenGL & Visualization

OpenGL & Visualization OpenGL & Visualization Martin Ilčík Institute of Computer Graphics and Algorithms Vienna University of Technology Motivation What is OpenGL How to use OpenGL Slices with OpenGL GPU raycasting Martin Ilčík

More information

INF3320 Computer Graphics and Discrete Geometry

INF3320 Computer Graphics and Discrete Geometry INF3320 Computer Graphics and Discrete Geometry Texturing Christopher Dyken Martin Reimers 06.10.2010 Page 1 Texturing Linear interpolation Real Time Rendering: Chapter 5: Visual Appearance Chapter 6:

More information

IntMu.Lab5. Download all the files available from

IntMu.Lab5. Download all the files available from IntMu.Lab5 0. Download all the files available from http://www.dee.isep.ipp.pt/~jml/intmu/lab5: wget http://www.dee.isep.ipp.pt/~jml/intmu/lab5/makefile make getall Analyze the program windmill.c. Compile

More information

CS335 Graphics and Multimedia. Slides adopted from OpenGL Tutorial

CS335 Graphics and Multimedia. Slides adopted from OpenGL Tutorial CS335 Graphics and Multimedia Slides adopted from OpenGL Tutorial Texture Poly. Per Vertex Mapping CPU DL Texture Raster Frag FB Pixel Apply a 1D, 2D, or 3D image to geometric primitives Uses of Texturing

More information

+ = Texturing: Glue n-dimensional images onto geometrical objects. Texturing. Texture magnification. Texture coordinates. Bilinear interpolation

+ = Texturing: Glue n-dimensional images onto geometrical objects. Texturing. Texture magnification. Texture coordinates. Bilinear interpolation Texturing Slides done bytomas Akenine-Möller and Ulf Assarsson Chalmers University of Technology Texturing: Glue n-dimensional images onto geometrical objects Purpose: more realism, and this is a cheap

More information

Texture. No Textures

Texture. No Textures Texture Pattern of Intensity and color. Can be generalized to 3D texture. How do we get them? Take pictures. Write a program (procedural textures). Synthesize from examples How do we apply them? (Texture

More information

QUESTION 1 [10] 2 COS340-A October/November 2009

QUESTION 1 [10] 2 COS340-A October/November 2009 2 COS340-A QUESTION 1 [10] a) OpenGL uses z-buffering for hidden surface removal. Explain how the z-buffer algorithm works and give one advantage of using this method. (5) Answer: OpenGL uses a hidden-surface

More information

Lecture 5. Scan Conversion Textures hw2

Lecture 5. Scan Conversion Textures hw2 Lecture 5 Scan Conversion Textures hw2 Announcements Homework deadlines Mini Project Proposals due June 26th E.T. 06 Vector Graphics Algebraic equations describe shapes. Can render type and large areas

More information

Shading. Flat shading Gouraud shading Phong shading

Shading. Flat shading Gouraud shading Phong shading Shading Flat shading Gouraud shading Phong shading Flat Shading and Perception Lateral inhibition: exaggerates perceived intensity Mach bands: perceived stripes along edges Icosahedron with Sphere Normals

More information

CS4621/5621 Fall Basics of OpenGL/GLSL Textures Basics

CS4621/5621 Fall Basics of OpenGL/GLSL Textures Basics CS4621/5621 Fall 2015 Basics of OpenGL/GLSL Textures Basics Professor: Kavita Bala Instructor: Nicolas Savva with slides from Balazs Kovacs, Eston Schweickart, Daniel Schroeder, Jiang Huang and Pramook

More information

Assignment #5: Scalar Field Visualization 3D: Direct Volume Rendering

Assignment #5: Scalar Field Visualization 3D: Direct Volume Rendering Assignment #5: Scalar Field Visualization 3D: Direct Volume Rendering Goals: Due October 4 th, before midnight This is the continuation of Assignment 4. The goal is to implement a simple DVR -- 2D texture-based

More information

OpenGL. Jimmy Johansson Norrköping Visualization and Interaction Studio Linköping University

OpenGL. Jimmy Johansson Norrköping Visualization and Interaction Studio Linköping University OpenGL Jimmy Johansson Norrköping Visualization and Interaction Studio Linköping University Background Software interface to graphics hardware 250+ commands Objects (models) are built from geometric primitives

More information

CS179: GPU Programming

CS179: GPU Programming CS179: GPU Programming Lecture 4: Textures Original Slides by Luke Durant, Russel McClellan, Tamas Szalay Today Recap Textures What are textures? Traditional uses Alternative uses Recap Our data so far:

More information

CSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science

CSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science CSC 307 1.0 Graphics Programming Department of Statistics and Computer Science Graphics Programming Texture Mapping 2 Texture Poly. Per Vertex Mapping CPU DL Pixel Texture Raster Frag FB Apply a 1D, 2D,

More information

New Concepts. Loading geometry from file Camera animation Advanced lighting and materials Texture mapping Display lists

New Concepts. Loading geometry from file Camera animation Advanced lighting and materials Texture mapping Display lists Terrain Rendering New Concepts Loading geometry from file Camera animation Advanced lighting and materials Texture mapping Display lists Loading geometry from file Motivations: Built-in geometry is limited

More information

Overview. By end of the week:

Overview. By end of the week: Overview By end of the week: - Know the basics of git - Make sure we can all compile and run a C++/ OpenGL program - Understand the OpenGL rendering pipeline - Understand how matrices are used for geometric

More information

Computer Graphics. Bing-Yu Chen National Taiwan University

Computer Graphics. Bing-Yu Chen National Taiwan University Computer Graphics Bing-Yu Chen National Taiwan University Introduction to OpenGL General OpenGL Introduction An Example OpenGL Program Drawing with OpenGL Transformations Animation and Depth Buffering

More information

11494 Interactive and GPU Computing Lab. 6-06/05/2015. Textures

11494 Interactive and GPU Computing Lab. 6-06/05/2015. Textures 11494 Interactive and GPU Computing Lab. 6-06/05/2015 Supervisor: Abel Gomes Textures Scribe: Orlando Pereira The goal of this assignment is to understand how to use textures inside the OpenGL environment.

More information

Computer Graphics Texture Mapping

Computer Graphics Texture Mapping Computer Graphics 2012 13. Texture Mapping Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2012-10-31 有关实验 - 备用 ftp 地址 - 10.214.0.111 - 帐号 :cg2012 - 密码 :2012 - 请按照规定上传到指定目录, 便于管理和检查 - 今日实验签到

More information

Introduction to Computer Graphics with WebGL

Introduction to Computer Graphics with WebGL Introduction to Computer Graphics with WebGL Ed Angel The Mandelbrot Set Fractals Fractal (fractional geometry) objects generate some of the most complex and beautiful graphics - The mathematics describing

More information

-=Catmull's Texturing=1974. Part I of Texturing

-=Catmull's Texturing=1974. Part I of Texturing -=Catmull's Texturing=1974 but with shaders Part I of Texturing Anton Gerdelan Textures Edwin Catmull's PhD thesis Computer display of curved surfaces, 1974 U.Utah Also invented the z-buffer / depth buffer

More information

Texturing. Slides done by Tomas Akenine-Möller and Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

Texturing. Slides done by Tomas Akenine-Möller and Ulf Assarsson Department of Computer Engineering Chalmers University of Technology Texturing Slides done by Tomas Akenine-Möller and Ulf Assarsson Department of Computer Engineering Chalmers University of Technology 1 Texturing: Glue n-dimensional images onto geometrical objects l Purpose:

More information

FAKULTI TEKNOLOGI MAKLUMAT DAN KOMUNIKASI BITM INTERACTIVE COMPUTER GRAPHICS LAB SESSION 4. C++ - OpenGL

FAKULTI TEKNOLOGI MAKLUMAT DAN KOMUNIKASI BITM INTERACTIVE COMPUTER GRAPHICS LAB SESSION 4. C++ - OpenGL FAKULTI TEKNOLOGI MAKLUMAT DAN KOMUNIKASI BITM 3213 - INTERACTIVE COMPUTER GRAPHICS LAB SESSION 4 C++ - OpenGL Part 1- C++ - Texture Mapping 1. Download texture file and put it into your current folder

More information

Methodology for Lecture

Methodology for Lecture Basic Geometry Setup Methodology for Lecture Make mytest1 more ambitious Sequence of steps Demo Review of Last Demo Changed floor to all white, added global for teapot and teapotloc, moved geometry to

More information

Mipmaps. Lecture 35. Robb T. Koether. Hampden-Sydney College. Wed, Nov 18, 2015

Mipmaps. Lecture 35. Robb T. Koether. Hampden-Sydney College. Wed, Nov 18, 2015 Mipmaps Lecture 35 Robb T. Koether Hampden-Sydney College Wed, Nov 18, 2015 Robb T. Koether (Hampden-Sydney College) Mipmaps Wed, Nov 18, 2015 1 / 31 Outline 1 Discrete Sampling 2 Mipmaps 3 Generating

More information

Imaging and Raster Primitives

Imaging and Raster Primitives Realtime 3D Computer Graphics & Virtual Reality Bitmaps and Textures Imaging and Raster Primitives Vicki Shreiner Imaging and Raster Primitives Describe OpenGL s raster primitives: bitmaps and image rectangles

More information

Image I/O and OpenGL Textures

Image I/O and OpenGL Textures Image I/O and OpenGL Textures Creating Images Using dynamic memory allocation we can create an array for an RGB image. The easiest way to do this is as follows Create an array based on the Width, Height

More information

Texture Mapping and Special Effects

Texture Mapping and Special Effects Texture Mapping and Special Effects February 23 rd 26 th 2007 MAE 410-574, Virtual Reality Applications and Research Instructor: Govindarajan Srimathveeravalli HW#5 Due March 2 nd Implement the complete

More information

SUMMARY. CS380: Introduction to Computer Graphics Texture Mapping Chapter 15. Min H. Kim KAIST School of Computing 18/05/03.

SUMMARY. CS380: Introduction to Computer Graphics Texture Mapping Chapter 15. Min H. Kim KAIST School of Computing 18/05/03. CS380: Introduction to Computer Graphics Texture Mapping Chapter 15 Min H. Kim KAIST School of Computing Materials SUMMARY 2 1 Light blob from PVC plastic Recall: Given any vector w (not necessarily of

More information

Announcements. Written Assignment 2 is out see the web page. Computer Graphics

Announcements. Written Assignment 2 is out see the web page. Computer Graphics Announcements Written Assignment 2 is out see the web page 1 Texture and other Mappings Shadows Texture Mapping Bump Mapping Displacement Mapping Environment Mapping Watt Chapter 8 COMPUTER GRAPHICS 15-462

More information

Texture Mapping 1/34

Texture Mapping 1/34 Texture Mapping 1/34 Texture Mapping Offsets the modeling assumption that the BRDF doesn t change in u and v coordinates along the object s surface Store a reflectance as an image called a texture Map

More information

Lecture 2 2D transformations Introduction to OpenGL

Lecture 2 2D transformations Introduction to OpenGL Lecture 2 2D transformations Introduction to OpenGL OpenGL where it fits what it contains how you work with it OpenGL parts: GL = Graphics Library (core lib) GLU = GL Utilities (always present) GLX, AGL,

More information

Assignment #3: Scalar Field Visualization 3D: Cutting Plane, Wireframe Iso-surfacing, and Direct Volume Rendering

Assignment #3: Scalar Field Visualization 3D: Cutting Plane, Wireframe Iso-surfacing, and Direct Volume Rendering Assignment #3: Scalar Field Visualization 3D: Cutting Plane, Wireframe Iso-surfacing, and Direct Volume Rendering Goals: Due October 9 th, before midnight With the results from your assignement#2, the

More information

To Do. Review of Last Demo. Methodology for Lecture. Geometry Basic Setup. Outline. Foundations of Computer Graphics (Fall 2012)

To Do. Review of Last Demo. Methodology for Lecture. Geometry Basic Setup. Outline. Foundations of Computer Graphics (Fall 2012) Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 8: OpenGL 2 http://inst.eecs.berkeley.edu/~cs184 To Do Continue working on HW 2. Can be difficult Class lectures, programs primary source Can

More information

Texture Mapping and Sampling

Texture Mapping and Sampling Texture Mapping and Sampling CPSC 314 Wolfgang Heidrich The Rendering Pipeline Geometry Processing Geometry Database Model/View Transform. Lighting Perspective Transform. Clipping Scan Conversion Depth

More information

Texture Mapping 1/34

Texture Mapping 1/34 Texture Mapping 1/34 Texture Mapping Offsets the modeling assumption that the BRDF doesn t change in u and v coordinates along the object s surface Store a reflectance as an image called a texture Map

More information

Today. Texture mapping in OpenGL. Texture mapping. Basic shaders for texturing. Today. Computergrafik

Today. Texture mapping in OpenGL. Texture mapping. Basic shaders for texturing. Today. Computergrafik Computergrafik Today Basic shader for texture mapping Texture coordinate assignment Antialiasing Fancy textures Matthias Zwicker Universität Bern Herbst 2009 Texture mapping Glue textures (images) onto

More information

GLSL Overview: Creating a Program

GLSL Overview: Creating a Program 1. Create the OpenGL application GLSL Overview: Creating a Program Primarily concerned with drawing Preferred approach uses buffer objects All drawing done in terms of vertex arrays Programming style differs

More information

Assignment #6 2D Vector Field Visualization Arrow Plot and LIC

Assignment #6 2D Vector Field Visualization Arrow Plot and LIC Assignment #6 2D Vector Field Visualization Arrow Plot and LIC Due Oct.15th before midnight Goal: In this assignment, you will be asked to implement two visualization techniques for 2D steady (time independent)

More information

Texture mapping. Computer Graphics CSE 167 Lecture 9

Texture mapping. Computer Graphics CSE 167 Lecture 9 Texture mapping Computer Graphics CSE 167 Lecture 9 CSE 167: Computer Graphics Texture Mapping Overview Interpolation Wrapping Texture coordinates Anti aliasing Mipmaps Other mappings Including bump mapping

More information

CS452/552; EE465/505. Image Processing Frame Buffer Objects

CS452/552; EE465/505. Image Processing Frame Buffer Objects CS452/552; EE465/505 Image Processing Frame Buffer Objects 3-12 15 Outline! Image Processing: Examples! Render to Texture Read: Angel, Chapter 7, 7.10-7.13 Lab3 new due date: Friday, Mar. 13 th Project#1

More information

Computer graphics Labs: OpenGL (1/3) Geometric transformations and projections

Computer graphics Labs: OpenGL (1/3) Geometric transformations and projections University of Liège Department of Aerospace and Mechanical engineering Computer graphics Labs: OpenGL (1/3) Geometric transformations and projections Exercise 1: Geometric transformations (Folder transf

More information

OpenCL / OpenGL Texture Interoperability: An Image Blurring Case Study

OpenCL / OpenGL Texture Interoperability: An Image Blurring Case Study 1 OpenCL / OpenGL Texture Interoperability: An Image Blurring Case Study Mike Bailey mjb@cs.oregonstate.edu opencl.opengl.rendertexture.pptx OpenCL / OpenGL Texture Interoperability: The Basic Idea 2 Application

More information

Texture Mapping. Texture (images) lecture 16. Texture mapping Aliasing (and anti-aliasing) Adding texture improves realism.

Texture Mapping. Texture (images) lecture 16. Texture mapping Aliasing (and anti-aliasing) Adding texture improves realism. lecture 16 Texture mapping Aliasing (and anti-aliasing) Texture (images) Texture Mapping Q: Why do we need texture mapping? A: Because objects look fake and boring without it. Adding texture improves realism.

More information

lecture 16 Texture mapping Aliasing (and anti-aliasing)

lecture 16 Texture mapping Aliasing (and anti-aliasing) lecture 16 Texture mapping Aliasing (and anti-aliasing) Texture (images) Texture Mapping Q: Why do we need texture mapping? A: Because objects look fake and boring without it. Adding texture improves realism.

More information

General Purpose computation on GPUs. Liangjun Zhang 2/23/2005

General Purpose computation on GPUs. Liangjun Zhang 2/23/2005 General Purpose computation on GPUs Liangjun Zhang 2/23/2005 Outline Interpretation of GPGPU GPU Programmable interfaces GPU programming sample: Hello, GPGPU More complex programming GPU essentials, opportunity

More information

Discrete Techniques. 11 th Week, Define a buffer by its spatial resolution (n m) and its depth (or precision) k, the number of

Discrete Techniques. 11 th Week, Define a buffer by its spatial resolution (n m) and its depth (or precision) k, the number of Discrete Techniques 11 th Week, 2010 Buffer Define a buffer by its spatial resolution (n m) and its depth (or precision) k, the number of bits/pixel Pixel OpenGL Frame Buffer OpenGL Buffers Color buffers

More information

Texturing Theory. Overview. All it takes is for the rendered image to look right. -Jim Blinn 11/10/2018

Texturing Theory. Overview. All it takes is for the rendered image to look right. -Jim Blinn 11/10/2018 References: Real-Time Rendering 3 rd Edition Chapter 6 Texturing Theory All it takes is for the rendered image to look right. -Jim Blinn Overview Introduction The Texturing Pipeline Example The Projector

More information