Download presentation
Presentation is loading. Please wait.
Published byCornelia Jennings Modified over 9 years ago
1
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer Graphics William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://snipurl.com/1y5gchttp://snipurl.com/1y5gc Course web site: http://www.kddresearch.org/Courses/CIS736http://www.kddresearch.org/Courses/CIS736 Instructor home page: http://www.cis.ksu.edu/~bhsuhttp://www.cis.ksu.edu/~bhsu Readings: Sections 20.5 – 20.9, Eberly 2 e – see http://snurl.com/1ye72http://snurl.com/1ye72 NeHe tutorials: 22 (bump), 23 (sphere environment) – http://nehe.gamedev.nethttp://nehe.gamedev.net NVidia tutorial (cube environment): http://snurl.com/2214yhttp://snurl.com/2214y OpenGL documentation (transparency and blending): http://snurl.com/2216vhttp://snurl.com/2216v Advanced CG Topics 2 of 8: Mappings
2
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Online Recorded Lectures for CIS 736 Computer Graphics Project Topics for CIS 736 Advanced Topics in Computer Graphics (8) 1. Filters for Texturing – first month 2. More Mappings – second month 3. Advanced Lighting Models – second month 4. Advanced Ray-Tracing – first month 5. Advanced Ray-Tracing, concluded – second month 6. Global Illumination: Photon Maps (Radiosity) – third month 7. More on Scientific, Data, Info Visualization – third month 8. Terrain – first month Recommended Background Reading for CIS 736 Shared Lectures with CIS 636 (Computer Graphics) Regular in-class lectures (35) and labs (7) Guidelines for paper reviews – second month Preparing project presentations, demos for graphics – third month
3
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Lecture Outline References: Wohn (2002) Mappings Explained Intermediate Surface Method Revisited (Cylinder, Sphere, Plane, Box) Reflected ray Object normal Object centroid Intermediate normal Cuboid vs. Sphere Mappings: Tradeoffs Bump Mapping: Perturbing Surface Normals Displacement Mapping: Perturbing Geometry Reflection Mapping aka Environment Mapping: Object-Centered Imaging Transparency Mapping: Viewer-Centered Imaging with Refraction Using Single-Pass and Multi-Pass Rendering Noise Models (especially 2-D) Read: Handout 1 (Texturing and Mapping)
4
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Source Material CS492A Computer Game Development Fall 2002 Course: http://vr.kaist.ac.kr/courses/cs492/http://vr.kaist.ac.kr/courses/cs492/ Instructor: http://vr.kaist.ac.krhttp://vr.kaist.ac.kr Kwangyun Wohn Korea Advanced Institute of Science and Technology (KAIST) Virtual Reality Lab
5
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Review: Texturing Adapted from slides © 2002 Gröller, E. & Jeschke, S. Vienna Institute of Technology
6
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Review: Properties and their Mappings
7
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2005 Isenberg, T., University of Calgary (now at U. Groningen) Some Mappings Texture, Transparency, Reflection, Shadow
8
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Contents Introduction Two-dimensional texture maps to polygon mesh object Two-dimensional texture domain to bi-cubic parametric patch objects Bump mapping Environment or reflection mapping Three-dimensional texture domain techniques Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
9
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Introduction [1] Texture mapping Migrate into hardware. Developed in parallel with research into global illumination algorithms – ray tracing and radiosity. Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
10
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Introduction [2] Texture Color Specular color Normal vector perturbation Displacement mapping Transparency Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
11
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Color Texture Map Texture Very complex geometry without texture Simple geometry with texture Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
12
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Specular Color Specular light term can be calculated by texture mapping. Gourad / Phong [Intensity / Normal] Reflected Ray Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
13
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Normal Vector Perturbation Normal vector perturbation for express natural appearance. Bump mapping [J.Blinn] Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
14
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Displacement Mapping Perturb the geometry. Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
15
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Transparency Control the opacity of a transparent object. Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
16
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Two-Dimensional Texture Maps onto Polygon Mesh Objects During the modeling phase, he/she associate texture coordinates with polygon vertices. Two main mapping algorithm Inverse mapping [screen order] Forward mapping [texture order] Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
17
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Inverse Mapping By bi-linear interpolation Screen coordinate (x,y) bi-linear interpolation -> (u,v) Two linear projective transform equation X = f1(u,v) Y = f2(u,v) Inverse Matrix (homogeneous coordinate) (u,v,q) = M(x,y,w) T Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
18
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Inverse Mapping using Intermediate Surface Using an ‘ easy ’ Intermediate surface onto which the texture is initially projected. [Bier and Sloan 1986] Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
19
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Intermediate Surface [1] (a)PlaneCylinderSphere Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
20
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Intermediate Surface [2] Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
21
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Four Possible Mappings Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
22
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Cylindrical Mapping: Centroid Method
23
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Cylindrical Mapping
24
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Technique developed by J. Blinn in 1978. Surface normals are perturbed for producing local geometric variations on a smooth surface. Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bump Mapping [1]
25
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bump Mapping [2]
26
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bump Mapping [3]
27
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Perturbation of surface normals only No geometry perturbation Same silhouette edges Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bump Mapping [4]: Summary and Example
28
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Bump Mapping Internals [1] Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
29
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics New Imaginary Surface P ’ Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bump Mapping Internals [2]
30
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bump Mapping Internals [3]
31
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bump Mapping Internals [4]
32
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Intensity Calculation = Gouraud component + Normal Map component Key Idea = D Computation Image subtraction Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bump Mapping: Multi-Pass Technique [1]
33
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Render with bump map (1) Render with bump map which are shifted by tangent space (2) Subtract Two Projected Image (1) – (2) Finally Render Object without texture map Step (1) and (2) compute D.L All Done in the frame buffer, Conventional Texture Mapping Unit can be used. Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bump Mapping: Multi-Pass Technique [2]
34
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Frame Buffer Multi-Pass Case Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Multi-Pass Texturing
35
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Single-Pass Case Frame Buffer Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Single-pass Texturing
36
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Environment Mapping aka reflection mapping [1] Reflection Mapping: Blinn [1977] Purpose Rendering shiny objects (silvered, mirrored, etc.) Reflect the environment in which objects are placed Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
37
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Environment Mapping aka reflection mapping [2]
38
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Relative size of Object and Environment important Object must be smaller than environment Otherwise: image reversal (“outside”) Object can only reflect environment, not itself Separate map required for each object Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Environment Mapping aka reflection mapping [3]
39
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Reflected Ray R v = 2(N V) N – V Same as ray tracing! Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
40
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Bounding Volume Method Cube Sphere Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bounding Box / Cuboid Mapping [1]
41
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Environment map captured at teapot position Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bounding Box / Cuboid Mapping [2]
42
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Bounding Sphere mapping [1]: Tradeoffs with Bounding Box Cubic Mapping Consists of six planes Accesses six planes for each object Tradeoffs Lots of culling Distortion (see slides 19 & 41) Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
43
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Advantage: Speed Tradeoff: Non-Uniform Sampling Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bounding Sphere mapping [2]: Pro and Con
44
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics a)Cubic perspective b)Mercator c)Orthographic Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Bounding Sphere mapping [3]: Projections
45
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Three-dimensional texture domain techniques To overcome surface rendering Surface curvature restrict texture compression Non trivial surface topology Can ’ t be mapped by 2-D texture Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
46
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Three-dimensional noise Perlin (1985) Define noise function three-dimensional position as input and returns single scalar value Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
47
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics 1-D Noise Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
48
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Controlled by amplitude Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
49
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics 2-D Noise [1] Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
50
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) 2-D Noise [2]
51
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Animating Turbulence [1] RGB space Blue, green, red Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST)
52
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Turbulence function (Perlin noise) Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Animating Turbulence [2]
53
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Series of turbulence functions Used to simulate keyframe animation Adapted from slides © 2002 Wohn, K., Korea Advanced Institute of Science and Technology (KAIST) Animating Turbulence [3]
54
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Summary Mappings Explained Definitions Design principles Intermediate Surface Method Revisited Methods: Reflected Ray, Normal, Centroid, Intermediate Normal Cuboid vs. Sphere Mappings Tradeoffs: different distortions Projections Bump Mapping (Normals) vs. Displacement Mapping (Geometry) Reflection Mapping aka Environment Mapping Transparency Mapping Using Single-Pass and Multi-Pass Rendering Noise Models (especially 2-D) Interpolation Turbulence
55
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics Terminology Mapping: projecting or generating image on object Intermediate Surface Method Revisited (Cylinder, Sphere, Plane, Box) Four Mapping Methods Reflected ray Object normal Object centroid Intermediate normal Bounding Box vs. Bounding Sphere Bump Mapping: Perturbing Surface Normals Displacement Mapping: Perturbing Geometry Reflection Mapping aka Environment Mapping: Object-Centered Imaging Transparency Mapping: Viewer-Centered Imaging with Refraction Using Single-Pass and Multi-Pass Rendering Noise Models (especially 2-D)
56
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics Next: Advanced CG 3 of 8 Lighting (Blinn-Phong, Torrance- Sparrow) More on Filters for Texturing Mappings Bump vs. Displacement Environment / Reflection Transparency Decaling / Shadow Maps Shadow Stencil Buffer in OpenGL Texturing and Shading Advanced 3 & 6 of 8: Lighting Models, Radiosity Advanced 4-5 of 8: Ray Tracing 4. Advanced, Part 1 of 2: Basics and Distributed Ray Tracing 5. Advanced, Part 2 of 2: Improving Ray Tracers Advanced 7 of 8: Visualization Advanced 8 of 8: Terrain
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.