Shading/Texturing. Dr. Scott Schaefer
|
|
- Cameron Carroll
- 6 years ago
- Views:
Transcription
1 Shading/Texturing Dr. Scott Schaefer
2 Problem /
3 Problem /
4 Problem 4/
5 Problem /
6 Problem /
7 Shading Algorithms Flat Shading Gouraud Shading Phong Shading /
8 Flat Shading Apply same color across entire polygon Calculate color once per polygon Typically use center of polygon Fast, but not very desirable for smooth shapes 8/
9 Flat Shading Image taken from 9/
10 Gouraud (Per-Vertex) Shading Assume normals at vertices of polygon If all normals the same, then the result is the same as flat shading Determine color at each vertex Interpolate colors from vertices across polygon /
11 Gouraud (Per-Vertex) Shading Assume normals at vertices of polygon If all normals the same, then the result is the same as flat shading Determine color at each vertex Interpolate colors from vertices across v polygon k N v vv v v k v k k N V k n k n k N N k k /
12 Flat Shading Image taken from /
13 Gouraud Shading Image taken from /
14 Phong (Per-Pixel) Shading Assume normals at vertices of polygon Interpolate normals from vertices across polygon Determine color at each pixel in polygon Captures highlights better 4/
15 Gouraud Shading Image taken from /
16 Phong Shading Image taken from /
17 Phong Shading Problems Not perfect and highly dependent on normals /
18 Interpolating Over Polygons Given values at vertices of polygon, how do we interpolate data over interior? 8/
19 Interpolating Over Polygons Given values at vertices of polygon, how do we interpolate data over interior? - values could be either normal or color v v v 9/
20 Interpolating Over Polygons Given values at vertices of polygon, how do we interpolate data over interior? - values could be either normal or color v v v /
21 / Interpolating Over Polygons maxy currentx xincr Edge currentf fincr maxy: currentx: xincr: currentf: fincr: ), max( y i y i otherwise x y y y x i i i i i, ), min(, i i i i y y x x otherwise f y y y f i i i i i, ), min(, i i i i y y f f
22 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB AC 4 B: [ ] C:[ ] A:[ ] 4 /
23 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB 4 AC 4 B: [ ] C:[ ] A:[ ] 4 /
24 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB 4 AC df B: [ ] A:[ ] 4 4 C:[ ] 4/
25 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB 4 AC df F B: [ ] A:[ ] x C:[ ] /
26 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB 4 AC df F 4 B: [ ] A:[ ] x C:[ ] /
27 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB 4 AC df F B: [ ] A:[ ] x C:[ ] /
28 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB AC 4 4 B: [ ] C:[ ] A:[ ] 4 8/
29 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB AC 4 CB 4 4 B: [ ] C:[ ] A:[ ] 4 9/
30 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB AC 4 CB 4 4 B: [ ] C:[ ] A:[ ] 4 /
31 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB 4 4 B: [ ] C:[ ] A:[ ] 4 /
32 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB 4 df F B: [ ] A:[ ] x C:[ ] /
33 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB 4 df F 4 B: [ ] A:[ ] x 9 8 C:[ ] /
34 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB 4 df F B: [ ] A:[ ] x C:[ ] 4/
35 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB 4 df F 4 A:[ ] x B: [ ] 9 8 C:[ ] /
36 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB 4 df F B: [ ] A:[ ] x C:[ ] /
37 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB 4 df F 4 A:[ ] x B: [ ] 9 8 C:[ ] /
38 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB 4 df F B: [ ] A:[ ] x C:[ ] 8/
39 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB 4 B: [ ] C:[ ] A:[ ] 4 9/
40 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB df F B: [ ] A:[ ] x C:[ ] 4/
41 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB df F 4 B: [ ] A:[ ] x 9 8 C:[ ] 4/
42 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB df F B: [ ] A:[ ] x C:[ ] 4/
43 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB df F 4 A:[ ] x 9 9 B: [ ] 9 8 C:[ ] 4/
44 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB df F B: [ ] A:[ ] x C:[ ] 44/
45 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB 4 4 CB 4 B: [ ] C:[ ] A:[ ] 4 4/
46 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB 4 4 CB df F B: [ ] A:[ ] x 4 C:[ ] 4/
47 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB 4 4 CB df F 4 B: [ ] A:[ ] x C:[ ] 4/
48 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB 4 4 CB df F B: [ ] A:[ ] x C:[ ] 48/
49 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB 4 B: [ ] C:[ ] A:[ ] 4 49/
50 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List AB CB 4 B: [ ] C:[ ] A:[ ] 4 /
51 Interpolating Over Polygons maxy currentx xincr currentf fincr Active Edge Table 4 CB AB AC Active Edge List 4 B: [ ] C:[ ] A:[ ] 4 /
52 Interpolating Normals Exactly the same as colors Must renormalize Does not produce even spacing n n /
53 Interpolating Normals Exactly the same as colors Must renormalize Does not produce even spacing n n /
54 Interpolating Normals Exactly the same as colors Must renormalize Does not produce even spacing n n 4/
55 SLERP (Spherical Linear Interpolation) n n /
56 SLERP (Spherical Linear Interpolation) n(t) n t ( t) n /
57 SLERP (Spherical Linear Interpolation) n n n( t) n(t) n t ( t) n /
58 SLERP (Spherical Linear Interpolation) n n n( t) n( t) n n n(t) n t ( t) n 8/
59 SLERP (Spherical Linear Interpolation) n n n( t) n( t) n n n n t n n n ( ) ( ) ) ( ) n n t n n n ( n(t) n t ( t) n 9/
60 SLERP (Spherical Linear Interpolation) n n n( t) n( t) n n n n( t) ( n n ) n n( t) ( n n ) n(t) n t ( t) n /
61 SLERP (Spherical Linear Interpolation) n n n( t) n( t) n n n n( t) n n n n( t) n n n(t) n t ( t) n /
62 SLERP (Spherical Linear Interpolation) n n n( t) n( t) n n n n( t) sin( t) n n sin( ) n n( t) sin( ( t)) n n sin( ) n(t) n t ( t) n /
63 SLERP (Spherical Linear Interpolation) n n n( t) n( t) n n sin( t) sin( sin( ( t)) sin( n(t) ) ) n t ( t) n /
64 SLERP (Spherical Linear Interpolation) sin( ( t)) n sin( t) n n( t) sin( ) n(t) n t ( t) n 4/
65 SLERP (Spherical Linear Interpolation) sin( ( t)) n sin( t) n n( t) sin( ) n( ) n n( ) n n(t) n t ( t) n /
66 SLERP (Spherical Linear Interpolation) sin( ( t)) n sin( t) n n( t) sin( ) n n /
67 Interpolating Over Polygons Linear interpolation algorithm not actually correct when using perspective Need to use a rational interpolant to correct for distortion /
68 Texture Mapping Geometry and lighting alone do not provide sufficient visible detail Paste D image onto D surface Surface appears much more complex than reality 8/
69 Texture Mapping 9/
70 Texture Mapping /
71 Texture Mapping /
72 Texture Mapping /
73 Texture Mapping Assume texture parameterized by u, v v u /
74 Texture Mapping Any u, v coordinate maps to a point on the image v u 4/
75 Texture Mapping Associate texture coordinates with each vertex on the surface v u /
76 Texture Mapping During polygon drawing, lookup color from texture using interpolated texture coordinates v u /
77 Sampling Textures /
78 Sampling Textures u,v 8/
79 Sampling Textures Nearest neighbor Blocky results u,v 9/
80 Nearest Sampling Example 8/
81 Sampling Textures Nearest neighbor Blocky results Linear blending Smooth appearance u,v 8/
82 Sampling Textures Nearest neighbor Blocky results Linear blending Smooth appearance u,v 8/
83 Sampling Textures Nearest neighbor Blocky results Linear blending Smooth appearance ( ) u,v ( )( ) ( ) 8/
84 Nearest Sampling Example 84/
85 Linear Sampling Example 8/
86 Sampling Textures Nearest neighbor Blocky results Linear blending Smooth appearance u,v Can be much more complicated 8/
87 Other Uses of Texture Mapping Environment Mapping Bump/Normal Mapping Displacement Mapping. Any attribute of the surface position, normal, color, etc can be placed in a texture 8/
88 Environment Mapping Cheap attempt at modeling reflections Makes surfaces look metallic Use six textures to model faces of a cube Assume cube faces infinitely far away The reflected eye vector is used to find which of the textures to use and what texture coordinate 88/
89 Environment Mapping 89/
90 Environment Mapping 9/
91 Environment Mapping Reflected ray: r ( nv) n v viewer v n r reflective surface environment texture image Texture is transferred in the direction of the reflected ray r from the environment map onto the object 9/
92 How to represent the map viewer 9/
93 How to represent the map viewer 9/
94 How to represent the map viewer 94/
95 How to represent the map viewer Store colors of every possible direction in texture maps 9/
96 How to represent the map viewer c c c c c v Store colors of every possible direction in texture maps 9/
97 How to represent the map viewer c c c c c v Store colors of every possible direction in texture maps Look up texture maps based on reflected vector 9/
98 Environment Mapping 98/
99 Environment Mapping 99/
100 Bump/Normal Mapping Replace colors R,G,B with coordinates X,Y,Z Interpret pixels as normal vectors Makes the shading look more complicated than geometry really is After bump mapping /
101 Bump/Normal Mapping Example /
102 Bump/Normal Mapping Example /
103 Bump/Normal Mapping Example /
104 Displacement Mapping Offset geometry in direction of normal Encode offset inside texture Used to actually change the geometry and provide more detail (especially silhouette) Difficult/expensive to perform with current hardware 4/
105 Bump/Normal Mapping Example /
106 Displacement Mapping Example /
107 Displacement Mapping Example /
108 More Examples GPU Tessellation 8/
109 More Examples GPU Tessellation 9/
110 More Examples /
111 Problems with Texture Mapping /
112 Problems with Texture Mapping Textures composed of separate pieces called charts Boundaries don t match Sampling issues Not very noticeable for color Huge problem for displacement mapping /
113 Problems with Texture Mapping /
114 Problems with Texture Mapping 4/
115 Problems with Texture Mapping Display Texture /
116 Problems with Texture Mapping Display Texture /
117 Problems with Texture Mapping Display Texture /
118 Mipmapping Set of down-sampled textures Pick one based on size of sampling region Improves quality of sampling Magnifies sampling problems 8/
119 OpenGL and Shading glshademodel(gl_smooth) glshademodel(gl_flat) 4 B: [ ] C:[ ] A:[ ] 4 9/
120 OpenGL and Texturing // load an image somehow unsigned int texid, imagew, imageh; unsigned char *image=loadimage( puppy.jpg, &imagew, &imageh); glgentextures(, &texid); glbindtexture(gl_texture_d, texid); gltexparameteri(gl_texture_d, GL_TEXTURE_MAG_FILTER, GL_NEAREST); gltexparameteri(gl_texture_d, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glteximaged(gl_texture_d,, GL_RGB, imagew, imageh,, GL_RGB, GL_UNSIGNED_BYTE, image); /
121 OpenGL and Texturing glbindtexture(gl_texture_d, texid); glbegin(gl_triangles); gltexcoordf(u,v); glvertexf(x,y,z); glend(); /
122 /
123 Problems with Texture Mapping /
Surface Rendering. Surface Rendering
Surface Rendering Surface Rendering Introduce Mapping Methods - Texture Mapping - Environmental Mapping - Bump Mapping Go over strategies for - Forward vs backward mapping 2 1 The Limits of Geometric Modeling
More informationShading. 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 informationCT5510: 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 informationTexture 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 informationDiscussion 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 informationMotivation. towards more realism. + Texture Mapping Texture Mapping
Texture Mapping Wireframe Model + Lighting & Shading Motivation + Texture Mapping http://www.3drender.com/jbirn/productions.html towards more realism 2 Idea Add surface detail without raising geometric
More informationLecture 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 informationTexture 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 information3D Rasterization II COS 426
3D Rasterization II COS 426 3D Rendering Pipeline (for direct illumination) 3D Primitives Modeling Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation
More informationCSE 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 informationCSE 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 informationCap. 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 informationHow do we draw a picture?
1 How do we draw a picture? Define geometry. Now what? We can draw the edges of the faces. Wireframe. We can only draw the edges of faces that are visible. We can fill in the faces. Giving each object
More informationTexture 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 informationCSE528 Computer Graphics: Theory, Algorithms, and Applications
CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 11794--4400 Tel: (631)632-8450; Fax: (631)632-8334
More informationBuffers. 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 informationTexturing. 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 informationTexturas. 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 informationGraphics. 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 informationCSE 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 informationCISC 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 informationLecture 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+ = 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- Rasterization. Geometry. Scan Conversion. Rasterization
Computer Graphics - The graphics pipeline - Geometry Modelview Geometry Processing Lighting Perspective Clipping Scan Conversion Texturing Fragment Tests Blending Framebuffer Fragment Processing - So far,
More informationAnnouncements. 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 informationTexture 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 informationIllumination and Shading
Illumination and Shading Illumination (Lighting)! Model the interaction of light with surface points to determine their final color and brightness! The illumination can be computed either at vertices or
More informationLecture 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 informationCMSC 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 informationTexture 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 informationOpenGL 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 informationLecture 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 informationCS 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 informationScan Conversion of Polygons. Dr. Scott Schaefer
Scan Conversion of Polygons Dr. Scott Schaefer Drawing Rectangles Which pixels should be filled? /8 Drawing Rectangles Is this correct? /8 Drawing Rectangles What if two rectangles overlap? 4/8 Drawing
More informationINF3320 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 informationGRAFIKA 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 informationCS452/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 informationTexture 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 informationShading. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller/Fuhrmann
Shading Introduction to Computer Graphics Torsten Möller Machiraju/Zhang/Möller/Fuhrmann Reading Chapter 5.5 - Angel Chapter 6.3 - Hughes, van Dam, et al Machiraju/Zhang/Möller/Fuhrmann 2 Shading Illumination
More informationSUMMARY. 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 informationTSBK 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 informationComputergraphics 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三維繪圖程式設計 3D Graphics Programming Design 第七章基礎材質張貼技術嘉大資工系盧天麒
三維繪圖程式設計 3D Graphics Programming Design 第七章基礎材質張貼技術嘉大資工系盧天麒 1 In this chapter, you will learn The basics of texture mapping Texture coordinates Texture objects and texture binding Texture specification
More informationCS 354R: Computer Game Technology
CS 354R: Computer Game Technology Texture and Environment Maps Fall 2018 Texture Mapping Problem: colors, normals, etc. are only specified at vertices How do we add detail between vertices without incurring
More informationTexture 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 informationComputer 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 informationTexture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture
Texture CS 475 / CS 675 Computer Graphics Add surface detail Paste a photograph over a surface to provide detail. Texture can change surface colour or modulate surface colour. Lecture 11 : Texture http://en.wikipedia.org/wiki/uv_mapping
More informationCS 130 Exam I. Fall 2015
S 3 Exam I Fall 25 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying
More informationCS 475 / CS 675 Computer Graphics. Lecture 11 : Texture
CS 475 / CS 675 Computer Graphics Lecture 11 : Texture Texture Add surface detail Paste a photograph over a surface to provide detail. Texture can change surface colour or modulate surface colour. http://en.wikipedia.org/wiki/uv_mapping
More informationPipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11
Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION
More informationGraphics for VEs. Ruth Aylett
Graphics for VEs Ruth Aylett Overview VE Software Graphics for VEs The graphics pipeline Projections Lighting Shading VR software Two main types of software used: off-line authoring or modelling packages
More informationComplex Shading Algorithms
Complex Shading Algorithms CPSC 414 Overview So far Rendering Pipeline including recent developments Today Shading algorithms based on the Rendering Pipeline Arbitrary reflection models (BRDFs) Bump mapping
More informationObjectives. Introduce Phong model Introduce modified Phong model Consider computation of required vectors Discuss polygonal shading.
Shading II 1 Objectives Introduce Phong model Introduce modified Phong model Consider computation of required vectors Discuss polygonal shading Flat Smooth Gouraud 2 Phong Lighting Model A simple model
More informationComputergrafik. Matthias Zwicker Universität Bern Herbst 2016
Computergrafik Matthias Zwicker Universität Bern Herbst 2016 2 Today Basic shader for texture mapping Texture coordinate assignment Antialiasing Fancy textures 3 Texture mapping Glue textures (images)
More informationMagnification 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 informationIllumination and Shading
Illumination and Shading Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL computes illumination at vertices illumination Shading
More informationGraphics and Interaction Surface rendering and shading
433-324 Graphics and Interaction Surface rendering and shading Department of Computer Science and Software Engineering The Lecture outline Introduction Surface rendering and shading Gouraud shading Phong
More informationLecture outline Graphics and Interaction Surface rendering and shading. Shading techniques. Introduction. Surface rendering and shading
Lecture outline 433-324 Graphics and Interaction Surface rendering and shading Department of Computer Science and Software Engineering The Introduction Surface rendering and shading Gouraud shading Phong
More informationIllumination and Shading
CT4510: Computer Graphics Illumination and Shading BOCHANG MOON Photorealism The ultimate goal of rendering is to produce photo realistic images. i.e., rendered images should be indistinguishable from
More informationCS GPU and GPGPU Programming Lecture 16+17: GPU Texturing 1+2. Markus Hadwiger, KAUST
CS 380 - GPU and GPGPU Programming Lecture 16+17: GPU Texturing 1+2 Markus Hadwiger, KAUST Reading Assignment #10 (until April 23) Read (required): Brook for GPUs: Stream Computing on Graphics Hardware
More informationCS GPU and GPGPU Programming Lecture 11: GPU Texturing 1. Markus Hadwiger, KAUST
CS 380 - GPU and GPGPU Programming Lecture 11: GPU Texturing 1 Markus Hadwiger, KAUST Reading Assignment #6 (until Mar. 9) Read (required): Programming Massively Parallel Processors book, Chapter 4 (CUDA
More informationCOMP environment mapping Mar. 12, r = 2n(n v) v
Rendering mirror surfaces The next texture mapping method assumes we have a mirror surface, or at least a reflectance function that contains a mirror component. Examples might be a car window or hood,
More informationPipeline Operations. CS 4620 Lecture 14
Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives
More information7. Texture Mapping. Idea. Examples Image Textures. Motivation. Textures can be images or procedures. Textures can be 2D or 3D
3 4 Idea Add srface detail withot raising geometric complexity Textres can be images or procedres Textres can be D or 3D Motiation Wireframe Model + Lighting & Shading + Textre Mapping http://www.3drender.com/jbirn/prodctions.html
More informationCS 498 VR. Lecture 19-4/9/18. go.illinois.edu/vrlect19
CS 498 VR Lecture 19-4/9/18 go.illinois.edu/vrlect19 Review from previous lectures Image-order Rendering and Object-order Rendering Image-order Rendering: - Process: Ray Generation, Ray Intersection, Assign
More informationTexturing. Texture Mapping. Texture Mapping. Have seen: colour can be assigned to ver7ces But: don t want to represent all this detail with geometry
Texturing Anthony Steed 1999, Celine Loscos 2000-2005, Jan Kautz 2006-2009 Texture Mapping Have seen: colour can be assigned to ver7ces But: don t want to represent all this detail with geometry Texture
More informationToday. 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 informationMach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.
Mach band effect The Mach band effect increases the visual unpleasant representation of curved surface using flat shading. A B 320322: Graphics and Visualization 456 Mach band effect The Mach band effect
More informationIllumination Model. The governing principles for computing the. Apply the lighting model at a set of points across the entire surface.
Illumination and Shading Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL computes illumination at vertices illumination Shading
More informationCS GPU and GPGPU Programming Lecture 12: GPU Texturing 1. Markus Hadwiger, KAUST
CS 380 - GPU and GPGPU Programming Lecture 12: GPU Texturing 1 Markus Hadwiger, KAUST Reading Assignment #6 (until Mar. 17) Read (required): Programming Massively Parallel Processors book, Chapter 4 (CUDA
More informationComputer Graphics. Illumination and Shading
() Illumination and Shading Dr. Ayman Eldeib Lighting So given a 3-D triangle and a 3-D viewpoint, we can set the right pixels But what color should those pixels be? If we re attempting to create a realistic
More informationCS 130 Final. Fall 2015
CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying
More informationPipeline Operations. CS 4620 Lecture 10
Pipeline Operations CS 4620 Lecture 10 2008 Steve Marschner 1 Hidden surface elimination Goal is to figure out which color to make the pixels based on what s in front of what. Hidden surface elimination
More informationIntroduction to Computer Graphics 7. Shading
Introduction to Computer Graphics 7. Shading National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Textbook: Hearn and Baker, Computer Graphics, 3rd Ed., Prentice Hall Ref: E.Angel, Interactive
More informationCS212. 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 informationCS5620 Intro to Computer Graphics
So Far wireframe hidden surfaces Next step 1 2 Light! Need to understand: How lighting works Types of lights Types of surfaces How shading works Shading algorithms What s Missing? Lighting vs. Shading
More informationProgrammable GPUS. Last Time? Reading for Today. Homework 4. Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes
Last Time? Programmable GPUS Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes frame buffer depth buffer stencil buffer Stencil Buffer Homework 4 Reading for Create some geometry "Rendering
More informationInterpolation using scanline algorithm
Interpolation using scanline algorithm Idea: Exploit knowledge about already computed color values. Traverse projected triangle top-down using scanline. Compute start and end color value of each pixel
More informationGraphics Hardware and Display Devices
Graphics Hardware and Display Devices CSE328 Lectures Graphics/Visualization Hardware Many graphics/visualization algorithms can be implemented efficiently and inexpensively in hardware Facilitates interactive
More informationCS 4731: Computer Graphics Lecture 16: Phong Illumination and Shading. Emmanuel Agu
CS 4731: Computer Graphics Lecture 16: Phong Illumination and Shading Emmanuel Agu Recall: Setting Light Property Define colors and position a light GLfloat light_ambient[] = {0.0, 0.0, 0.0, 1.0}; GLfloat
More informationQUESTION 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 informationComputer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College
Computer Graphics Shading Based on slides by Dianna Xu, Bryn Mawr College Image Synthesis and Shading Perception of 3D Objects Displays almost always 2 dimensional. Depth cues needed to restore the third
More information3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models
3D Programming Concepts Outline 3D Concepts Displaying 3D Models 3D Programming CS 4390 3D Computer 1 2 3D Concepts 3D Model is a 3D simulation of an object. Coordinate Systems 3D Models 3D Shapes 3D Concepts
More informationIllumination Models & Shading
Illumination Models & Shading Lighting vs. Shading Lighting Interaction between materials and light sources Physics Shading Determining the color of a pixel Computer Graphics ZBuffer(Scene) PutColor(x,y,Col(P));
More informationGraphics for VEs. Ruth Aylett
Graphics for VEs Ruth Aylett Overview VE Software Graphics for VEs The graphics pipeline Projections Lighting Shading Runtime VR systems Two major parts: initialisation and update loop. Initialisation
More informationTexture 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 informationTextures. 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 informationframe buffer depth buffer stencil buffer
Final Project Proposals Programmable GPUS You should all have received an email with feedback Just about everyone was told: Test cases weren t detailed enough Project was possibly too big Motivation could
More informationOrthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015
Orthogonal Projection Matrices 1 Objectives Derive the projection matrices used for standard orthogonal projections Introduce oblique projections Introduce projection normalization 2 Normalization Rather
More informationComputer 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 informationCPSC / Texture Mapping
CPSC 599.64 / 601.64 Introduction and Motivation so far: detail through polygons & materials example: brick wall problem: many polygons & materials needed for detailed structures inefficient for memory
More informationComputer Graphics. Illumination Models and Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL
Computer Graphics Chapter 10 llumination Models and Surface-Rendering Methods Somsak Walairacht, Computer Engineering, KMTL Outline Light Sources Surface Lighting Effects Basic llumination Models Polygon
More informationGrafica 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 informationLecture 17: Shading in OpenGL. CITS3003 Graphics & Animation
Lecture 17: Shading in OpenGL CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Introduce the OpenGL shading methods - per vertex shading
More informationIllumination and Shading
Illumination and Shading Illumination and Shading z Illumination Models y Ambient y Diffuse y Attenuation y Specular Reflection z Interpolated Shading Models y Flat, Gouraud, Phong y Problems CS4451: Fall
More informationECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014
ECS 175 COMPUTER GRAPHICS Ken Joy Winter 2014 Shading To be able to model shading, we simplify Uniform Media no scattering of light Opaque Objects No Interreflection Point Light Sources RGB Color (eliminating
More informationTexturing. 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 informationCS 431/636 Advanced Rendering Techniques
CS 431/636 Advanced Rendering Techniques Dr. David Breen Matheson 308 Thursday 6PM 8:50PM Presentation 7 5/23/06 Questions from Last Time? Hall Shading Model Shadows Reflections Refractions Slide Credits
More informationObjectives. 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 informationCMSC427 Final Practice v2 Fall 2017
CMSC427 Final Practice v2 Fall 2017 This is to represent the flow of the final and give you an idea of relative weighting. No promises that knowing this will predict how you ll do on the final. Some questions
More information