Introduction to Meshes Lecture 22 Mon, Oct 20, 2003.

Slides:



Advertisements
Similar presentations
Computer Graphics- SCC 342
Advertisements

COMP 175 | COMPUTER GRAPHICS Remco Chang1/6103b – Shapes Lecture 03b: Shapes COMP 175: Computer Graphics February 3, 2015.
1 Planes, Polygons and Objects ©Anthony Steed
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
1 Computer Graphics Chapter 9 Rendering. [9]-2RM Rendering Three dimensional object rendering is the set of collective processes which make the object.
Computer Graphics - Class 10
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
Content Subdivision First some basics (control point polygon, mesh)
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Shading Week 5, Wed 1 Oct 2003 recap: lighting shading.
1 Dr. Scott Schaefer Generalized Barycentric Coordinates.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm Lecture #18.
9-4 Geometry in Three Dimensions  Simple Closed Surfaces  Regular Polyhedra  Cylinders and Cones.
Polygon Shading. Assigning color to a shape to make graphical scenes look realistic, or artistic, or whatever effect we’re attempting to achieve But first.
CS 445 / 645 Introduction to Computer Graphics Lecture 18 Shading Shading.
CS-321 Dr. Mark L. Hornick 1 3-D Object Modeling.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
1 Dr. Scott Schaefer Generalized Barycentric Coordinates.
Triangle Scan Conversion. 2 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Rasterization Rasterization (scan conversion) –Determine which.
Vertex – A point at which two or more edges meet Edge – A line segment at which two faces intersect Face – A flat surface Vertices, Edges, Faces.
Part 6: Graphics Output Primitives (4) 1.  Another useful construct,besides points, straight line segments, and curves for describing components of a.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 1 Shading (Shading) & Smooth Shading Graphics.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
Geometry 10-1 Solids Face: the flat side of a figure
Linear Interpolation (for curve 01).  This chapter discusses straight lines and flat surfaces that are defined by points.  The application of these.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Steve Sterley. Real World Lighting Physical objects tend to interact with light in three ways: Absorption (black body) Reflection (mirror) Transmission.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
Illumination and Shading How to shade surfaces based on the position,orientation,characteristics of the surfaces and the light sources illuminating them.
CAP4730: Computational Structures in Computer Graphics
Computer Graphics Basic 3D Geometry CO2409 Computer Graphics Week 5-1.
1 Polygonal Techniques 이영건. 2 Introduction This chapter –Discuss a variety of problems that are encountered within polygonal data sets The.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
Lecture Fall 2001 Illumination and Shading in OpenGL Light Sources Empirical Illumination Shading Transforming Normals Tong-Yee Lee.
In the name of God Computer Graphics Bastanfard. Curve Function(2) Other method is approximate it using a poly-line. Just locate a set of points along.
3D Object Representations graphics scenes contain solid geometric objects trees, flowers, clouds, rocks, water representations surface ↔interior models.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Local Illumination and Shading
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
Render methods. Contents Levels of rendering Wireframe Plain shadow Gouraud Phong Comparison Gouraud-Phong.
Schedule Update GP 4 – Tesselation/Cg GDS 4 – Subdiv Surf. GP 5 – Object Modeling Lab: Mini-proj Setup GDS 5 – Maya Modeling MCG 6 – Intersections GP 6.
Introduction to 3D Solids and Solids of Revolution Some 3D shapes can be formed by revolving a 2D shape around a line (called the axis of revolution).
Computer Graphics (Fall 2006) COMS 4160, Lecture 16: Illumination and Shading 1
Computer Graphics Lecture 26 Mathematics of Lighting and Shading Part II Taqdees A. Siddiqi
POLYGON MESH Advance Computer Graphics
Morphing and Shape Processing
CS148: Introduction to Computer Graphics and Imaging
Area 8.1 Rectangles & Parallelograms 8.2 Triangles,Trapezoids & Kites
Gouraud Shading with Bilinear Interpolation
Chapter 14 Shading Models.
CSC461: Lecture 23 Shading Computation
Introduction to Computer Graphics with WebGL
The Graphics Pipeline Lecture 5 Mon, Sep 3, 2007.
Y. Lipman D. Levin D. Cohen-Or
Introduction to Meshes
Color and Shading Lecture 9 Mon, Sep 26, 2005.
Shading Polygons Lecture 36 Wed, Nov 28, 2007.
CS-378: Game Technology Lecture #4: Texture and Other Maps
Y. Lipman D. Levin D. Cohen-Or
Computer Graphics Material Colours and Lighting
Computer Graphics (Fall 2003)
Chapter 14 Shading Models.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Introduction to Meshes
Presentation transcript:

Introduction to Meshes Lecture 22 Mon, Oct 20, 2003

Chapter 6 Modeling Shapes with Polygonal Meshes

Introduction to Solid Modeling with Polygonal Meshes In computer graphics, we do not draw surfaces that are truly curved. Instead, each surface consists of many small polygons connected in a mesh. This is also called a wireframe. If we fill the polygons in the mesh, then the surface looks solid.

Solid Model

Wireframe Model

Solid Model (69451 faces)

Wireframe Model

Close-up of Wireframe Model

Polygonal Faces The simplest of all polygonal faces is the triangle. Triangles have two major advantages. All triangles are planar. All triangles are convex.

One Normal for the Face The normal may be calculated from the vertices. n = (Q – P)  (R – P). P R Q n

One Normal for each Vertex The normal at each vertex may be perpendicular to the face. n 1 = n 2 = n 3. n1n1 n3n3 n2n2

One Normal for each Vertex The normal at each vertex may point in a unique direction. n 1  n 2  n 3. n1n1 n3n3 n2n2

Lighting and Normals When using a lighting model, the brightness and color of the surface are determined, in part, by the normals. If there is one normal, the surface is of uniform brightness. This is called flat shading.

Lighting and Normals If each vertex has a distinct normal, then the brightness may vary over the surface. This is called smooth shading.

One Normal, Uniform Shading

Distinct Normals, Varying Shading

Shading a Triangle We will study lighting models later. Lighting models determine how to color, or shade, a vertex. For now, we will assume that each vertex has been assigned a shade. Note: “shading” has nothing to do with shadows. It refers to the shade of color.

Shading a Triangle Each point in the interior and on the boundary of a triangle can be expressed as a linear combination aP + bQ + cR of the three vertices of the triangle, where a + b + c = 1. These are the barycentric coordinates.

Shading a Triangle The coefficients a, b, c are used to determine the color of the point in the triangle. The color of the point is the same linear combination of the colors of the vertices. This is done for each pixel that is part of the triangle.

Consider this triangle. Shading a Triangle R(4, 8), color = (1, 0, 0) P(0, 0) color = (1, 1, 0) Q(12, 0) color = (0, 1, 1)

Shading a Triangle What is the color of the outlined pixel? R(4, 8), color = (1, 0, 0) P(0, 0) color = (1, 1, 0) Q(12, 0) color = (0, 1, 1)

Shading a Triangle The coordinates are (3, 3). Solve the system a(0, 0) + b(12,0) + c(4, 8) = (3, 3), a + b + c = 1. The equations are 12b + 4c = 3, 8c = 3, a + b + c = 1.

Shading a Triangle The solution is a = 1/2. b = 1/8. c = 3/8. Therefore, the color of the pixel is (1/2)(1, 1, 0) + (1/8)(0, 1, 1) + (3/8)(1, 0, 0) = (7/8, 5/8, 1/8).

Shading a Triangle R(4, 8), color = (1, 0, 0) P(0, 0) color = (1, 1, 0) Q(12, 0) color = (0, 1, 1) color = (7/8, 5/8, 1/8)

Shading a Triangle The entire triangle R(4, 8) P(0, 0) Q(12, 0)