3D Modeling: Surfaces

Similar documents
3D Representation and Solid Modeling

3D Modeling: Solid Models

Intro to Curves Week 4, Lecture 7

CS 536 Computer Graphics Intro to Curves Week 1, Lecture 2

11/1/13. Polygon Meshes and Implicit Surfaces. Shape Representations. Polygon Models in OpenGL. Modeling Complex Shapes

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

CHAPTER 1 Graphics Systems and Models 3

Polygon Meshes and Implicit Surfaces

Polygon Meshes and Implicit Surfaces

XPM 2D Transformations Week 2, Lecture 3

3D Transformations World Window to Viewport Transformation Week 2, Lecture 4

Surface Modeling. Polygon Tables. Types: Generating models: Polygon Surfaces. Polygon surfaces Curved surfaces Volumes. Interactive Procedural

XPM 2D Transformations Week 2, Lecture 3

Intro to Curves Week 1, Lecture 2

Computer Graphics 1. Chapter 2 (May 19th, 2011, 2-4pm): 3D Modeling. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2011

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

9. Three Dimensional Object Representations

Curves and Surfaces Computer Graphics I Lecture 10

Outline. The de Casteljau Algorithm. Properties of Piecewise Linear Interpolations. Recall: Linear Interpolation

Lecture notes: Object modeling

Ray Casting of Trimmed NURBS Surfaces on the GPU

Outline. Properties of Piecewise Linear Interpolations. The de Casteljau Algorithm. Recall: Linear Interpolation

From curves to surfaces. Parametric surfaces and solid modeling. Extrusions. Surfaces of revolution. So far have discussed spline curves in 2D

Chapter 4-3D Modeling

3D Modeling Parametric Curves & Surfaces

Level of Details in Computer Rendering

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple

Transformations Week 9, Lecture 18

Overview of 3D Object Representations

Curves and Surfaces 1

Intro to Modeling Modeling in 3D

3D Modeling Parametric Curves & Surfaces. Shandong University Spring 2013

Physically-Based Modeling and Animation. University of Missouri at Columbia

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

VALLIAMMAI ENGINEERING COLLEGE

Modeling 3D Objects: Part 2

Central issues in modelling

Curve Representation ME761A Instructor in Charge Prof. J. Ramkumar Department of Mechanical Engineering, IIT Kanpur

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Computer Graphics I Lecture 11

Introduction to Computer Graphics

Computergrafik. Matthias Zwicker. Herbst 2010

Geometric Modeling. Introduction

Chapter 9 3D Modeling

An Introduction to Geometric Modeling using Polygonal Meshes

SEOUL NATIONAL UNIVERSITY

3D Modeling techniques

Advanced 3D-Data Structures

Point based Rendering

3D Rasterization II COS 426

CEng 477 Introduction to Computer Graphics Fall 2007

Curves & Surfaces. Last Time? Progressive Meshes. Selective Refinement. Adjacency Data Structures. Mesh Simplification. Mesh Simplification

Curves and Surface I. Angel Ch.10

Object representation

3D Modeling I. CG08b Lior Shapira Lecture 8. Based on: Thomas Funkhouser,Princeton University. Thomas Funkhouser 2000

Lecture 4b. Surface. Lecture 3 1

CS-184: Computer Graphics

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Homework #2. Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves

11/1/13. Visualization. Scientific Visualization. Types of Data. Height Field. Contour Curves. Meshes

Visualization. CSCI 420 Computer Graphics Lecture 26

A Developer s Survey of Polygonal Simplification algorithms. CS 563 Advanced Topics in Computer Graphics Fan Wu Mar. 31, 2005

Introduction to Computer Graphics

Introduction to Geometry. Computer Graphics CMU /15-662

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

CSG obj. oper3. obj1 obj2 obj3. obj5. obj4

Curves and Curved Surfaces. Adapted by FFL from CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

B-Splines and NURBS Week 5, Lecture 9

Bezier Curves, B-Splines, NURBS

3D Object Representation. Michael Kazhdan ( /657)

Geometric Modeling. Bing-Yu Chen National Taiwan University The University of Tokyo

GL9: Engineering Communications. GL9: CAD techniques. Curves Surfaces Solids Techniques

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves

Curves and Surfaces Computer Graphics I Lecture 9

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics 1/15

Spatial Data Structures

Overview of 3D Object Representations

Werner Purgathofer

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics

CMSC427 Final Practice v2 Fall 2017

Scientific Visualization Example exam questions with commented answers

Pipeline Operations. CS 4620 Lecture 14

Processing 3D Surface Data

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13

Computer Graphics. Prof. Feng Liu. Fall /21/2016

CS4620/5620: Lecture 14 Pipeline

Computer Aided Engineering Applications

EF432. Introduction to spagetti and meatballs

Line Drawing Week 6, Lecture 9

Introduction to the Mathematical Concepts of CATIA V5

Polygonization of Implicit Surfaces

Curves & Surfaces. MIT EECS 6.837, Durand and Cutler

The Traditional Graphics Pipeline

CS337 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics. Bin Sheng Representing Shape 9/20/16 1/15

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Processing 3D Surface Data

Surface and Solid Geometry. 3D Polygons

CSC Computer Graphics

Transcription:

CS 430/536 Computer Graphics I 3D Modeling: Surfaces Week 8, Lecture 16 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing Laboratory Department of Computer Science Drexel University http://gicl.cs.drexel.edu 1

Overview 3D model representations Mesh formats Bicubic surfaces Bezier surfaces Normals to surfaces Direct surface rendering 2 1994 Foley/VanDam/Finer/Huges/Phillips ICG

3D Modeling 3D Representations Wireframe models Surface Models Solid Models Meshes and Polygon soups Voxel/Volume models Decomposition-based Octrees, voxels Modeling in 3D Constructive Solid Geometry (CSG), Breps and feature-based 3

Representing 3D Objects Exact Wireframe Parametric Surface Solid Model CSG BRep Implicit Solid Modeling Approximate Facet / Mesh Just surfaces Voxel Volume info 4

Representing 3D Objects Exact Precise model of object topology Mathematically represent all geometry Approximate A discretization of the 3D object Use simple primitives to model topology and geometry 5

Negatives when Representing 3D Objects Exact Complex data structures Expensive algorithms Wide variety of formats, each with subtle nuances Hard to acquire data Translation required for rendering Approximate Lossy Data structure sizes can get HUGE, if you want good fidelity Easy to break (i.e. cracks can appear) Not good for certain applications Lots of interpolation and guess work 6

Positives when Representing 3D Objects Exact Precision Simulation, modeling, etc Lots of modeling environments Physical properties Many applications (tool path generation, motion, etc.) Compact Approximate Easy to implement Easy to acquire 3D scanner, CT Easy to render Direct mapping to the graphics pipeline Lots of algorithms 7

Exact Representations Wireframe Parametric Surface Solid Model operations CSG, BRep, implicit geometry 8

Wireframes Basic idea: Represent the model as the set of all of its edges Example: A simple cube 12 lines 8 vertices How about the faces? 9 Foley/VanDam, 1990/1994

Issues with Wireframes Visually ambiguous No surfaces! What s inside? What s outside? Hidden line removal? What does validity entail? Don t we just have a bunch of wires? Do they need to add up to something? How to model wireframe shapes? Wire by wire? Not very easy! 11

Surface Models Basic idea: Represent a model as a set of faces/patches Limitations: Topological integrity; how do faces line up?; which way is inside / outside? Used in many CAD applications Why? They are fine for drafting and rendering, not as good for creating true physical models 12

3D Mesh File Formats Some common formats STL SMF OpenInventor VRML 13

Minimal Vertex + Face No colors, normals, or texture Primarily used to demonstrate geometry algorithms 14

Full-Featured Colors / Transparency Vertex-Face Normals (optional, can be computed) Scene Graph Lights Textures Views and Navigation 15

Simple Mesh Format (SMF) Michael Garland http://graphics.cs.uiuc.edu/~garland/ Triangle data Vertex indices begin at 1 16

Stereolithography (STL) Triangle data + Face Normal The de-facto standard for rapid prototyping 17

How STL Works 18

Open Inventor Developed by SGI Predecessor to VRML Scene Graph 20

Virtual Reality Modeling Language (VRML) SGML Based Scene-Graph Full Featured 21

Issues with 3D mesh formats Easy to acquire Easy to render Harder to model with Error prone split faces, holes, gaps, etc 22

BRep Data Structures Winged-Edge Data Structure (Weiler) Vertex n edges Edge 2 vertices 2 faces Face m edges 23 Pics/Math courtesy of Dave Mount @ UMD-CP

BRep Data Structure Vertex structure X,Y,Z point Pointers to n coincident edges Edge structure 2 pointers to end-point vertices 2 pointers to adjacent faces Pointer to next edge Pointer to previous edge Face structure Pointers to m edges 24

Biparametric Surfaces Biparametric surfaces A generalization of parametric curves 2 parameters: s, t (or u, v) Two parametric functions 25

Bicubic Surfaces Recall the 2D curve: G: Geometry Matrix M: Basis Matrix S: Polynomial Terms [s 3 s 2 s 1] For 3D, we allow the points in G to vary in 3D along t as well: 26

For a fixed t 1, is a curve Observations About Bicubic Surfaces Gradually incrementing t 1 to t 2, we get a new curve The combination of these curves is a surface are 3D curves 27

Bicubic Surfaces Each is, where Transposing, we get 28

Bicubic Surfaces Substituting into, we get Q(s, t) The g 11, etc. are the control points for the Bicubic surface patch: 29

Bicubic Surfaces Writing out gives 30

Bézier Surfaces Bézier Surfaces (similar definition) 32

Faceting 33

Plotting Isolines 34

Faceting 35

Bézier Surfaces C 0 and G 0 continuity can be achieved between two patches by setting the 4 boundary control points to be equal G 1 continuity achieved when cross-wise CPs are co-linear 36

Bézier Surfaces: Example Utah Teapot modeled by 32 Bézier Patches with G 1 continuity 37

Bezier Surface: Example Increased facet resolution Rendered 38

B-spline Surfaces Representation for B-spline patches C 2 continuity across boundaries is automatic with B-splines 39

Normals to Surfaces Normals used for Shading Interference detection in robotics Calculating offsets for numerically controlled machining 40

Computing the Normals to Surfaces For a bicubic surface, first, compute the s tangent vector 41

Computing the Normals to Surfaces Next, compute the t tangent vector: t 42

Computing the Normals to Surfaces Since s and t are tangent to the surface, their cross product is the normal vector to the surface! x s - x component of s tangent y s - y component of s tangent z s - z component of s tangent 43

Drawing Parametric Surfaces Usually done patch by patch Two choices Draw/render directly from the parametric description Approximate the surface with a polygon mesh, then draw/render the mesh 45

Direct Rendering Use a scan-line algorithm Evaluate pixel by pixel Problem: How to go from (x,y) screen space to point on the 3D patch Easy for a planar polygon where we know max/min y, equations for edges, screen depth Not as easy for parametric surfaces 46

Issues for Direct Rendering Max/Min y coords may not lie on boundaries Silhouette edges result from patch bulges Need to track both silhouettes and boundaries What if they intersect? Note: patch edges need not be monotonic in x or y Idea: Scan convert patch plane-by-plane, using scan planes instead of scan lines 47

Direct Scan Conversion of Basic idea Find intersection of patch with XZ plane Patches Producing a planar curve Draw the curve De Boor, D Casteljeau Note: if doing rendering, one can compute pixelby-pixel color values this way Patch: x=x(u,v), y=y(u,v), z=z(u,v) 48

Patch to Polygon Conversion Two methods: Object Space Conversion Techniques Uniform subdivision Non-uniform subdivision Resolution: depends on object space Image Space Conversion Resolution: depends on pixels and screen 50

Object Space Conversion: Uniform Subdivision Basic Procedure Cut parameter space into equal parts Find new points on the surface Recurse/Repeat until done Split squares into triangles Render 51

Object Space Conversion: Non-Uniform Subdivision Basic idea More facets in areas of high curvature Use change in normals to surface to assess curvature More derivatives Break patch into sub-patches based on curvature changes 52

Image Space Conversion Idea: control subdivision based on screen criteria Minimum pixel area Stop when patch is basically one pixel Screen flatness Stop when patch converges to a polygon Screen flatness of silhouette edges Stop when edge is straight or size of pixel 53

How do I know if I ve found a silhouette edge? If the viewing ray is tangent to the surface at the point it hits the surface! N L = 0 Where N is the normal at the point where L, the line of sight, hits the surface 54