Review of Tuesday. ECS 175 Chapter 3: Object Representation

Similar documents
Information Coding / Computer Graphics, ISY, LiTH. Splines

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside

08 - Designing Approximating Curves

Design considerations

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Ray Casting of Trimmed NURBS Surfaces on the GPU

Computergrafik. Matthias Zwicker. Herbst 2010

3D Modeling Parametric Curves & Surfaces

For each question, indicate whether the statement is true or false by circling T or F, respectively.

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

CHAPTER 1 Graphics Systems and Models 3

Intro to Modeling Modeling in 3D

Curves and Surfaces Computer Graphics I Lecture 9

INF3320 Computer Graphics and Discrete Geometry

Interactive Graphics Using Parametric Equations (Day 2)

Lecture IV Bézier Curves

Rendering Curves and Surfaces. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Introduction to Computer Graphics

Computer Graphics Curves and Surfaces. Matthias Teschner

Curves and Surfaces 1

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

Curves and Surfaces Computer Graphics I Lecture 10

2D Spline Curves. CS 4620 Lecture 18

Direct Rendering of Trimmed NURBS Surfaces

Parametric Surfaces. Michael Kazhdan ( /657) HB , FvDFH 11.2

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

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

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

Computer Graphics I Lecture 11

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

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

Splines. Connecting the Dots

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

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

Point-Based Rendering

Surfaces for CAGD. FSP Tutorial. FSP-Seminar, Graz, November

2D Spline Curves. CS 4620 Lecture 13

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

Chapter IV Fragment Processing and Output Merging. 3D Graphics for Game Programming

CS GPU and GPGPU Programming Lecture 11: GPU Texturing 1. Markus Hadwiger, KAUST

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

Linear Precision for Parametric Patches

Rational Bezier Curves

Intro to Curves Week 4, Lecture 7

Texturing Theory. Overview. All it takes is for the rendered image to look right. -Jim Blinn 11/10/2018

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

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

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

CS130 : Computer Graphics. Tamar Shinar Computer Science & Engineering UC Riverside

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

The Free-form Surface Modelling System

Spline Functions on Triangulations

Intro to Curves Week 1, Lecture 2

Bezier Curves, B-Splines, NURBS

Curves. Computer Graphics CSE 167 Lecture 11

CS130 : Computer Graphics Curves. Tamar Shinar Computer Science & Engineering UC Riverside

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

Texture Mapping 1/34

Sung-Eui Yoon ( 윤성의 )

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

Texture Mapping and Special Effects

Objects 2: Curves & Splines Christian Miller CS Fall 2011

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

Chapter 4-3D Modeling

Texture Mapping. Texture (images) lecture 16. Texture mapping Aliasing (and anti-aliasing) Adding texture improves realism.

lecture 16 Texture mapping Aliasing (and anti-aliasing)

Curved PN Triangles. Alex Vlachos Jörg Peters

Curves D.A. Forsyth, with slides from John Hart

Direct Rendering. Direct Rendering Goals

CPSC / Texture Mapping

CS 130 Final. Fall 2015

Computer Graphics. Lecture 8 Antialiasing, Texture Mapping

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

Higher Order Surfaces in OpenGL with NV_evaluators. Sébastien Dominé

Height Fields and Contours Scalar Fields Volume Rendering Vector Fields [Angel Ch. 12] April 23, 2002 Frank Pfenning Carnegie Mellon University

Textures and normals in ray tracing

Approximate Catmull-Clark Patches. Scott Schaefer Charles Loop

Properties of Blending Functions

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

CS 428: Fall Introduction to. Texture mapping and filtering. Andrew Nealen, Rutgers, /18/2010 1

Texture Mapping. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

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

Visualization. CSCI 420 Computer Graphics Lecture 26

Central issues in modelling

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

Remark. Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 331

(Spline, Bezier, B-Spline)

COMP3421. Global Lighting Part 2: Radiosity

09 - Designing Surfaces. CSCI-GA Computer Graphics - Fall 16 - Daniele Panozzo

Shape modeling Modeling technique Shape representation! 3D Graphics Modeling Techniques

Subdivision Surfaces

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1

Curves and Surfaces. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd

Curves & Surfaces. MIT EECS 6.837, Durand and Cutler

Roadmap for tonight. What are Bezier curves (mathematically)? Programming Bezier curves (very high level view).

3D Modeling: Surfaces

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

Level of Details in Computer Rendering

Bézier Splines. B-Splines. B-Splines. CS 475 / CS 675 Computer Graphics. Lecture 14 : Modelling Curves 3 B-Splines. n i t i 1 t n i. J n,i.

Transcription:

Review of Tuesday We have learnt how to rasterize lines and fill polygons Colors (and other attributes) are specified at vertices Interpolation required to fill polygon with attributes 26

Review of Tuesday Mathematical formulation: Given (x i,f i ) ( positions and values ) Find function f defined on [x 0,x n ] such that f(x i )=f i We required our solutions to be linear functions 27

Interpolation: Linear Linear interpolation Parametric function takes the form f(u) =(1 u)f 0 + uf 1 Values between u 0 and u 1 are mixtures of f 0 and f 1 u =0.2 80%f 0 + 20%f 1 Control points are weighted/blended together 28

Interpolation: Linear Basis functions/blending functions/weights f(u) =(1 u)f 0 + uf 1 (1 u)+u =1 partition of unity weights sum up to one f(u) =b 0 (u) f 0 + b 1 (u) f 1 f(u) = i b i (u) f i control point contributions are blended together 29

What about colors? Linear interpolation (component-wise) f RGB (t) =(f R (t),f G (t),f B (t)) 30

What about colors? Linear interpolation across triangle Can we construct function as mixture of corner vertices? f(α 0,α 1,α 2 )=α 0 f 0 + α 1 f 1 + α 2 f 2 31

What about colors? Barycentric interpolation across triangle p = α 0 p 0 + α 1 p 1 + α 2 p 2 f(p) =α 0 f 0 + α 1 f 1 + α 2 f 2 Compute weights (barycentric coordinates) Interpolate values α 0 + α 1 + α 2 =1 0 α 0,α 1,α 2 1 convex combination 32

What about colors? 33

What about colors? Polygon interpolation is dependent on triangulation 34

How about patterns? Define color on more positions than just vertices? Map an image onto a mesh add details 35

Texture Mapping 2D texture coordinates (s,t) specified per vertex Interpolation of coordinates takes care of the rest 36

Texture Mapping and Rasterization How do we map texels to pixels? Aliasing Look up texel at pixel center (point sampling; nearest neighbor) Linear filtering (average texels around pixel center location) 37

Texture Mapping and Rasterization Magnification: texel maps to multiple pixels Minification: pixel maps to multiple texels CC-SA Wojciech Mula OpenGL demo in class 38

Texture Mapping and Rasterization Mip-Mapping: Create low resolution texture images for minification Similar to low-pass filtering before sampling Faster rendering Reduced aliasing 39

Texture Mapping Textures on curved 3D objects are distorted CC-SA Beuc 40

Triangles and Rasterization - Summary Summary: Vertices, lines, triangles are easily mapped to fragments Rasterization produces fragments from continuous primitives Fragments have interpolated attributes Color Texture coordinates Alpha Strong aliasing effects can be caused by sampling 41

General Object Representations So far we have described objects as (triangle) meshes Triangle meshes are piecewise linear object representations Easy to rasterize/ put on the screen Maps nicely to graphics pipeline What about other representation techniques? Disconnect rendering from object representation? Editing? Vector graphics? 42

General Object Representations Three ways to represent curves and surfaces Explicit y = f(x) Implicit f(x, y) =0 Parametric f(u) =(x(u),y(u),z(u)) 43

General Object Representations Explicit representation y = f(x) Independent variable defines value of dependent variable 44

General Object Representations Implicit representation f(x, y) =0 Points in space can be tested for membership In 2D these functions define curves, in 3D they define surfaces. 45

General Object Representations Parametric representation f(u) =(x(u),y(u),z(u)) Coordinates expressed in terms of one independent variable, the parameter. 46

Parametric Representation Set of control points Piecewise linear representation vs. higher-order parametric curves Linear representation Linear interpolation Bézier curve (cubic) Approximation 47

Bézier Curves Relaxing the interpolation condition allows for more stable curve construction (approximation) Goals: Easy construction Suitable for rendering and basic geometric operations Control over smoothness Stability Easy computation of derivatives 48

Bézier Curves Geometric construction of a cubic Bézier curve Four control points are weighted to construct a cubic Bézier curve. 49

Bézier Curves Bézier curve constructed by repeated linear interpolation f(u) = n b in (u)p i i=0 curve blends together control points cubic Bernstein basis polynomials b in (u) = n u i (1 u) n i i 50

Bézier Curves Convex hull property n b in (u) = u i (1 u) n i i n b in (u) =1 partition of unity 0 b in (u) 1 i=0 Bézier polynomial is convex combination of control points; stays Within convex hull of control polygon. 51

Bézier Curves Subdivision example: cubic Bézier curve p k i (u) =(1 u) p k 1 i 1 + u pk 1 i f(u) =p 3 3(u) cubic Bézier curve (p 0 0,p 1 1,p 2 2,p 3 3) (p 3 3,p 3 2,p 3 1,p 3 0) Cubic curve 1 Cubic curve 2 52

Bézier Curves Derivatives f(u) = n b in (u) p i i=0 Derivatives are tangents. Lighting computations require derivatives. Example: Utah Teapot consists of bicubic Bézier patches 53

Bézier Curves Derivatives f(u) = n b in (u) p i i=0 df (u) du = d du n b in (u) p i = i=0 n i=0 db in (u) du p i db in (u) du = n(b i 1,n 1 (u) b i,n 1 (u)) df (u) n du = n(b i 1,n 1 (u) b i,n 1 (u)) p i i=0 54

Bézier Curves Derivatives df (u) du = n i=0 n(b i 1,n 1 (u) b i,n 1 (u)) p i df (u) du n 1 = i=0 b i,n 1 (u) n(p i+1 p i ) Derivative is a Bézier curve of order (n-1) with combined control points 55

Bézier Curves Joining Bézier curves Discontinuous C 0 f continuous f discontinuous C 1 f continuous f continuous 56