Object Representation Rama C Hoetzlein, 2010 Univ. of California Santa Barbara Lecture Notes.

Slides:



Advertisements
Similar presentations
OpenGL: Simple Use Open a window and attach OpenGL to it Set projection parameters (e.g., field of view) Setup lighting, if any Main rendering loop –Set.
Advertisements

COMP 175 | COMPUTER GRAPHICS Remco Chang1/6103b – Shapes Lecture 03b: Shapes COMP 175: Computer Graphics February 3, 2015.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Building Models modified by Ray Wisman Ed Angel Professor of Computer Science,
1 Building Models. 2 Objectives Introduce simple data structures for building polygonal models ­Vertex lists ­Edge lists OpenGL vertex arrays.
Concept of Modeling Model -- The representation of an object or a system Modeling -- The creation and manipulation of an object or a system representation.
2 COEN Computer Graphics I Evening’s Goals n Discuss the fundamentals of lighting in computer graphics n Analyze OpenGL’s lighting model n Show.
1 Computer Graphics Chapter 7 3D Object Modeling.
Informationsteknologi Monday, October 29, 2007Computer Graphics - Class 21 Today’s class Graphics programming Color.
HCI 530 : Seminar (HCI) Damian Schofield.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 8: Intro to 3D objects, meshes Ravi Ramamoorthi
Computer Graphics - Class 14
Meshes Dr. Scott Schaefer. 3D Surfaces Vertex Table.
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 4: 3D Objects and Meshes Ravi Ramamoorthi
Modelling. Outline  Modelling methods  Editing models – adding detail  Polygonal models  Representing curves  Patched surfaces.
1 Lecture 4 Graphical primitives Rasterization: algorithmic approach Rasterization: geometric approach 2D discrete lines, triangles Discrete planes 3D.
IE433 CAD/CAM Computer Aided Design and Computer Aided Manufacturing Part-4 Computer Graphics- CAD Software Dr. Abdulrahman M. Al-Ahmari Industrial Engineering.
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
1 Finite-Volume Formulation. 2 Review of the Integral Equation The integral equation for the conservation statement is: Equation applies for a control.
Introduction to Modeling. What is CG Modeling? Combination of Sculpting, Architecture, Drafting, and Painting. The core component of computer animation.
MS. WILLIAMS Anatomy of a 3D Model. 3D Model 3D Models are one of the essential building blocks of 3D computer graphics. Without them there would be no.
3D Concepts Coordinate Systems Coordinates specify points in space 3D coords commonly use X, Y, & Z A vertex is a 'corner' of an object Different coordinate.
Modeling and representation 1 – comparative review and polygon mesh models 2.1 Introduction 2.2 Polygonal representation of three-dimensional objects 2.3.
11/30/04© University of Wisconsin, CS559 Fall 2004 Last Time More modeling: –Hierarchical modeling –Instancing and Parametric Instancing –Constructive.
In the name of God Computer Graphics Modeling1. Today Introduction Modeling Polygon.
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
Modeling. Geometric Models  2D and 3D objects  Triangles, quadrilaterals, polygons  Spheres, cones, boxes  Surface characteristics  Color  Texture.
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves 1/23 Curves and Surfaces.
CS559: Computer Graphics Lecture 33: Shape Modeling Li Zhang Spring 2008.
Graphics Graphics Korea University cgvr.korea.ac.kr Creating Virtual World I 김 창 헌 Department of Computer Science Korea University
4/15/04© University of Wisconsin, CS559 Spring 2004 Last Time More modeling: –Hierarchical modeling –Instancing and Parametric Instancing –Constructive.
Week 11 - Thursday.  What did we talk about last time?  Image processing  Blurring  Edge detection  Color correction  Tone mapping  Lens flare.
12/03/10 ANIMASI TEKNOLOGI IF.UB. Eriq Muhammad Adams J. -
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
CS559: Computer Graphics Lecture 24: Shape Modeling Li Zhang Spring 2010.
Geometric Objects and Transformation
Representation. Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames for.
Game Programming 06 The Rendering Engine
Introduction to Computer Graphics: Object Representation Rama C Hoetzlein, 2010 Univ. of California Santa Barbara Lecture Notes.
Non-Uniform Rational B-Splines NURBS. NURBS Surfaces NURBS surfaces are based on curves. The main advantage of using NURBS surfaces over polygons, is.
Computer Graphics Basic 3D Geometry CO2409 Computer Graphics Week 5-1.
Computer Graphics Bing-Yu Chen National Taiwan University.
Geometric Modeling How to design a graphical model? How to create a digital description of a real-world object? Design Digitize.
GPH 338 Computer Animation Survey
Vertices, Edges and Faces By Jordan Diamond. Vertices In geometry, a vertices is a special kind of point which describes the corners or intersections.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Procedural Models How to easily generate complex data?
Lecture Fall 2001 Illumination and Shading in OpenGL Light Sources Empirical Illumination Shading Transforming Normals Tong-Yee Lee.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Subdivision Surfaces Greg Humphreys University of Virginia CS 445, Fall 2003.
In the name of God Computer Graphics. Introduction Modeling techniques modeling techniques managements Some renderings.
CS559: Computer Graphics Final Review Li Zhang Spring 2010.
Where We Stand So far we know how to: –Transform between spaces –Rasterize –Decide what’s in front Next –Deciding its intensity and color.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 15 Creating 3D Models.
Introduction to Meshes Lecture 22 Mon, Oct 20, 2003.
11/16/04© University of Wisconsin, CS559 Fall 2004 Last Time Texture Anti-Aliasing Texture boundaries Modeling introduction.
Solid Modeling Dr. Scott Schaefer.
UNIT 11: 3D AutoCAD Objectives: How to print or plot a drawing How to setup a layout using title blocks and viewports Create and manage new layouts Be.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009
Rendering Pipeline Fall, 2015.
Week 12 - Thursday CS361.
Constructing Objects in Computer Graphics
POLYGON MESH Advance Computer Graphics
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics
Lecture 33: Shape Modeling Li Zhang Spring 2008
Texture Mapping COMP575/COMP770.
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
Introduction to Meshes
Introduction to Meshes
Presentation transcript:

Object Representation Rama C Hoetzlein, 2010 Univ. of California Santa Barbara Lecture Notes

Object Representation Object representation can be understood as an issue in communication… Describe to me, in exact detail what a surface looks like, without using “fuzzy” words.

Mathematical definition: Surface A subset of points in R, which span a local two-dimensional space at each point. For any given point in the set, there are two directions in which another point in the set is infinitely close. 3

What are some natural examples of surfaces that are... - Open Surfaces with no interior - Closed Surfaces which have an interior - Disjoint Surfaces with distinct parts (C0 discontinuous) - Rough Surfaces with angles (C1 discontinuous) - Smooth Surfaces which are locally smooth (C1 smooth) - Self-similar Surfaces which are similar at different scales - Implicit Surfaces with no sharp boundaries - Analytical Surfaces defined by a closed mathematical func. - Revolved Surfaces created by sweeping a curve about an axis - Loft Surfaces created by sweeping a curve along a path

Three most common in Computer Graphics: Implicit surfaces f(x,y,z) = R (eg. Metablobs) Curved surfaces f(u, v) => R (eg. NURBS) Polygonal surfaces... M = {V, E, F} (eg. Meshes) Object Representation 1 1 3

Implicit Surfaces f(x,y,z) = R A function of three variables is defined which maps every point in space to a scalar value. Selecting a range of values defines a volume, while selecting a single value defines a surface. 1

Simple implicit surface F(x,y,z) = sqrt( p – r ) < 1

Blob functions add together Metaballs: One kind of Implicit Surface f(x,y,z) =

James Blinn, “A Generalization of Algebraic Surface Drawing”, 1982

Implicit Surface Implicit Surfaces - Rendering Option 1: Raytrace the function Option 2: Convert to polygons (Marching Cubes)

Curved Surfaces f(u, v) => R A two-dimensional function is defined with maps two parametric variables to a point in 3D space. There are many ways that f(u,v) could be defined. 3

Curved Surfaces - Key points define the shape of an explicit function. - Properties: Infinitely divisible Everywhere smooth Easy to control

Utah Teapot Alan Newell, 1975

Curved surfaces have revolutionized the automotive and film industry by simplifying complex shapes. (Prior to this, only way was to explicitly specify all vertices.) Geri’s Game, 1997 (Pixar), First sub-division surfaces.

M = {V, E, F} Polygonal Surfaces Defined as a discrete set of vertices, edges and faces which connected together create a locus of points defining a surface.

Polygonal Surfaces A mesh is a discrete representation of a surface. - Surface is broken into vertices, edges, and faces. - Vertices = Subset of S sampled at discrete locations.

Stanford Bunny Greg Turk & Marc Levoy, D scanned mesh, 69,451 triangles

Paolo Uccello Perspective drawing of a Challice (ca. 1450)

- Just describe the vertices. We also need their connectivity. - How do you know what the faces are?

Colin Smith, On Vertex-Vertex Systems and Their Use in Geometric and Biological Modeling, 2006.

- Make faces explicit. Each face indexes vertices. - Most common in graphics hardware. Const time face geometry.

Mesh storage... Example PLY files: - Number of vertices - Number of faces - Each vertex has a list of properties. In this case, x/y/z. Vertex could also have a color, or texture coordinate. - Each face is an index of vertices. (This example: 3-sided faces only)

Mesh Operations What do you need to do for? 1. Adding a vertex 2. Deleting a vertex 3. Adding a face 4. Deleting a face

Winged Edge Meshes - More storage space - Each edge has: 2 vertices 2 faces - But... we can now find neighboring vertices and faces in constant time.

Each representation makes more information explicit... giving constant-time lookups at the cost of storage space.

Many Operations Add/Remove Noise Face Extrusion Subdivision Find Silouettes Simplification Change Representation

Modeling in OpenGL Objects are expressed as vertex lists, appearing between glBegin..glEnd blocks: glBegin ( GL_TRANGLES); glVertex3f ( 0, 0, 0); glVertex3f ( 1, 0, 0); glVertex3f ( 0, 0, 1 ); glEnd ();

The type of primitive determines how the vertices will be interpreted. glBegin ( GL_POINTS );// Every 1 is a point glBegin ( GL_LINES) ;// Every 2 is a line glBegin ( GL_TRANGLES );// Every 3 is a face glBegin ( GL_QUADS );// Every 4 is a face

Surface normals and colors can be provided for every vertex if you want.. glBegin ( GL_TRANGLES );// Every 3 is a triangle glNormal3f ( 1, 0, 0 ); glColor3f(1,0,0); glVertex3f (1, 0, 0); glNormal3f ( 0, 1, 0 ); glColor3f(0,1,0); glVertex3f (0, 1, 0); glNormal3f ( 0, 0, 1 ); glColor3f(0,0,1); glVertex3f (0, 0, 1);.... next triangle.. glEnd ();

The glBegin..glEnd block indicates to OpenGL that you are giving it geometry. Transformations and Lighting must appear before any geometry is specified. Nothing else can appear in the glBegin/glEnd section except for geometry data. glEnable ( GL_LIGHTING );// Lighting glTranslate3f ( 1, 0, 0);// Transform(s) glScale3f ( 2, 2, 2 ); glBegin ( GL_TRIANGLES );// Geometry glColor3f(1,0,0); glVertex3f ( 1, 0, 0 ); // Color is part of geom glNormal3f(0,1,0); glVertex3f ( 0, 1, 0 ); // Normal is also geom glVertex3f ( 0, 0, 1 ); glEnd ();

Modeling in OpenGL LAB #5 – 10: :00 1) Model a cube in OpenGL 2) Make sure that dynamic lighting of the cube is correct 3) Model the Coke Can challenge