Download presentation
Presentation is loading. Please wait.
Published byLynn Norman Modified over 9 years ago
1
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 10: Computer Graphics Computer Science: An Overview Tenth Edition by J. Glenn Brookshear Modified by Senem Kumova Metin
2
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-2 Chapter 10: Computer Graphics 10.1 The Scope of Computer Graphics 10.2 Overview of 3D Graphics 10.3 Modeling 10.4 Rendering
3
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-3 2D // 3D Graphics // Image processing 2D Graphics: Deals with manipulating two-dimensional images(converts two-dim. Shapes in patterns of pixels to produce an image) 3D Graphics: Deals with producing and displaying images of three-dimensional virtual scenes. Image Processing: Analyses images
4
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-4 Figure 10.1 A “photograph” of a virtual world produced using 3D graphics (from Toy Story by Walt Disney Pictures/Pixar Animation Studios) © Corbis/Sygma
5
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-5 Overview of 3D Graphics A process of 3 steps : –Modeling : Designing a set of objects which are constructed from digitally encoded algorithms –Rendering : Producing 2D image of the scene (Determining the appearance of each pixel and storing them in frame buffer) –Displaying
6
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-6 Figure 10.2 The 3D graphics paradigm
7
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-7 1. Modeling Objects Shape: Represented by a polygonal mesh obtained from 1.Traditional mathematical equations (e.g ) 2.Bezier curves and surfaces 3.Procedural models 4.Other methods being researched Surface: Can be represented by a texture map (Texture mapping : Associating color patterns with an object’s surface)
8
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-8 Figure 10.3 A polygonal mesh for a sphere A collection of small flat surfaces = planar patches Collection of patches = polygonal mesh
9
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-9 Figure 10.4 A Bezier curve
10
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-10 Figure 10.5 Growing a polygonal mesh for a mountain range
11
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-11 Figure 10.6 A scene from Shrek 2 by Dreamworks SKG (© Dreamworks/The Kobal Collection) Search for realism : Modeling of skin Modeling cloth Modeling of human hair
12
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-12 Modeling entire scene Required information includes –Models of objects –Locations –Sizes –Orientations within the scene This collection of information is called scene graph
13
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 2. Rendering Determining how objects in a scene graph would appear when projected onto the projection plane Rendering process involves –Light –Surface Interaction –Clipping, Scan conversion, Hidden –surface removal = Rendering pipeline –Shading 10-13
14
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-14 Light –Surface Interaction: Reflection Versus Refraction Reflection: Light rays bounce off surface. –Specular light –Diffuse light –Ambient light Refraction: Light rays penetrate surface.
15
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-15 Figure 10.7 Reflected light
16
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-16 Figure 10.8 Specular versus diffuse light Specular light = Parallel light rays reflected from smooth surface => the color of original light Diffuse light = Scattered light rays reflected from non-smooth surface => the color of the object
17
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-17 Figure 10.9 Refracted light
18
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-18 Rendering Pipeline Consists of traditional algorithms for clipping, scan conversion, and shading Often implemented in firmware Used as an abstract tool in graphics applications
19
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-19 RENDERING PIPELINE Figure 10.10 Identifying the region of the scene that lies inside the view volume View Volume : The region in 3 dimensional scene that contains the objects
20
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-20 Rendering Pipeline Clipping: Restricts attention to objects within view volume Scan Conversion(Rastering): Associates pixel positions with points in scene Shading: Determines appearance of points associated with pixels
21
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-21 Figure 10.11 The scan conversion of a triangular patch
22
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Scan conversion problems Hidden-surface removal : Indentifying and discarding point in a scene that are blocked from view (e.g. Back face elimination) –Painter’s algorithm (Closer objects override previous result) –Z-buffer (depth buffer, focus on individual pixels) 10-22
23
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-23 Shading Techniques Shading : Determining the appearance of patches which are selected by rendering process –Flat Shading: Creates faceted appearance –Bump Mapping: Creates bumpy, rounded appearance –Gouraud and Phong Shading: Creates smooth, rounded appearance
24
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-24 Figure 10.12 A sphere as it might appear when rendered by flat shading
25
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-25 Figure 10.13 A conceptual view of a polygonal mesh with normal vectors at its vertices
26
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10-26 Figure 10.14 A sphere as it might appear when rendered using bump mapping
27
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Rendering-Pipeline Hardware Graphic cards OpenGL (open graphics library) 10-27
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.