(c) University of Wisconsin

Slides:



Advertisements
Similar presentations
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 14: Review / Subdivision Ravi Ramamoorthi Slides courtesy.
Advertisements

Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 10 Ravi Ramamoorthi
Computer Vision - A Modern Approach Set: Radiometry Slides by D.A. Forsyth Radiometry Questions: –how “bright” will surfaces be? –what is “brightness”?
© University of Wisconsin, CS559 Spring 2004
B-Spline Blending Functions
Subdivision Curves & Surfaces and Fractal Mountains. CS184 – Spring 2011.
Fractal Mountains, Splines, and Subdivision Surfaces Jordan Smith UC Berkeley CS184.
Modelling. Outline  Modelling methods  Editing models – adding detail  Polygonal models  Representing curves  Patched surfaces.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Curves Week 13, Mon 24 Nov 2003.
Curve Modeling Bézier Curves
11/30/04© University of Wisconsin, CS559 Fall 2004 Last Time More modeling: –Hierarchical modeling –Instancing and Parametric Instancing –Constructive.
10/21/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Terrain Dynamic LOD.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
01/24/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
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.
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.
12/05/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling Very brief intro to global illumination.
Week 11 - Thursday.  What did we talk about last time?  Image processing  Blurring  Edge detection  Color correction  Tone mapping  Lens flare.
-Global Illumination Techniques
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
Subdivision Schemes Basic idea: Start with something coarse, and refine it into smaller pieces for rendering –We have seen how subdivision may be used.
Graphics Lecture 13: Slide 1 Interactive Computer Graphics Lecture 13: Radiosity - Principles.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Parametric Surfaces Define points on the surface in terms of two parameters Simplest case: bilinear interpolation s t s x(s,t)x(s,t) P 0,0 P 1,0 P 1,1.
04/30/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling We are now all done with modeling, the standard hardware pipeline.
Course Introduction to virtual engineering Óbuda University John von Neumann Faculty of Informatics Institute of Applied Mathematics Lecture and laboratory.
Lee Byung-Gook Dongseo Univ.
04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves.
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.
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. Shortcomings So Far The representations we have looked at so far have various failings: –Meshes are large, difficult.
11/26/02(C) University of Wisconsin Last Time BSplines.
In the name of God Computer Graphics. Last Time Some techniques for modeling Today Global illumination and raytracing.
Local Illumination and Shading
01/27/03© 2002 University of Wisconsin Last Time Radiometry A lot of confusion about Irradiance and BRDFs –Clarrified (I hope) today Radiance.
Graphics Lecture 14: Slide 1 Interactive Computer Graphics Lecture 14: Radiosity - Computational Issues.
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
11/29/01CS 559, Fall 2001 Today Photorealistic rendering Algorithms for producing high-quality images Ways of deciding which algorithm for use.
Subdivision Schemes. Center for Graphics and Geometric Computing, Technion What is Subdivision?  Subdivision is a process in which a poly-line/mesh is.
Introduction to Parametric Curve and Surface Modeling.
Tessellation Shaders.
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 SPLINES
© University of Wisconsin, CS559 Spring 2004
CS262 – Computer Vision Lect 4 - Image Formation
Week 12 - Thursday CS361.
© University of Wisconsin, CS559 Spring 2004
Shading Revisited Some applications are intended to produce pictures that look photorealistic, or close to it The image should look like a photograph A.
Advanced Computer Graphics
Daniil Rodin for CAGD course, 2016
BRDFs Randy Rauwendaal.
3D Graphics Rendering PPT By Ricardo Veguilla.
Constructing Objects in Computer Graphics By Andries van Dam©
Radiometry (Chapter 4).
© 2002 University of Wisconsin
Texture Mapping COMP575/COMP770.
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
The Variety of Subdivision Schemes
(c) 2002 University of Wisconsin
Implicit Functions Some surfaces can be represented as the vanishing points of functions (defined over 3D space) Places where a function f(x,y,z)=0 Some.
(c) 2002 University of Wisconsin
Introduction to Parametric Curve and Surface Modeling
Subdivision Surfaces 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr.
Computer Graphics (Fall 2003)
Last Time B-splines Project 3 was made available
Presentation transcript:

(c) University of Wisconsin Last Time B-splines Recall a property of B-spline surfaces – the control point grid must be rectangular Clarification: For non-uniform B-splines, there is one control point for every n-d knots, regardless of whether the knot values are equal 0,0,0,1,2,2,2 requires 7 – 3 = 4 control points for a cubic B-spline 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Today Subdivision schemes Introduction to Global Illumination 12/03/02 (c) University of Wisconsin

B-splines as Approximation B-splines were developed as approximation functions Given a set of points – the control points – the B-spline approximates them with a smooth curve or surface Ideally, we would like to be able to provide a polygonal mesh, and then smooth it out with a B-spline surface The 3D equivalent of smoothing a 2D poly-line with a B-spline But we can’t do this in general, because B-spline control meshes must be rectangular Can’t even do simple cases like a sphere: You can’t wrap a sphere is a rectangular sheet without singularities 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Subdivision Schemes Basic idea: Start with something coarse, and refine it into smaller pieces, smoothing along the way We have seen how subdivision may be used to render parametric curves and Bezier surfaces We will see how it can be used for modeling specific objects, and as a modeling scheme in itself In this lecture: Subdivision for tessellating a sphere Subdivision for fractal surfaces Subdivision for B-spline patches General subdivision surfaces 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Tessellating a Sphere Spheres are best parameterized in polar coordinates: Note the singularity at the poles Tessellation: The process of approximating a surface with a polygon mesh One option for tessellating a sphere: Step around and up the sphere in constant steps of  and  Problem: Polygons are of wildly different sizes, and some vertices have very high degree 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Subdivision Method Begin with a course approximation to the sphere, that uses only triangles Two good candidates are platonic solids with triangular faces: Octahedron, Isosahedron They have uniformly sized faces and uniform vertex degree Repeat the following process: Insert a new vertex in the middle of each edge Push the vertices out to the surface of the sphere Break each triangular face into 4 triangles using the new vertices Octahedron Isosahedron 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin The First Stage Each new vertex is degree 6, original vertices are degree 4 Each face gets split into 4: 12/03/02 (c) University of Wisconsin

Sphere Subdivision Advantages All the triangles at any given level are the same size Relies on the initial mesh having equal sized faces, and properties of the sphere The new vertices all have the same degree Mesh is uniform in newly generated areas This is a property we will see later in subdivision surfaces Makes it easier to analyze what happens to the surface The location and degree of existing vertices does not change The only extraordinary points lie on the initial mesh Extraordinary points are those with degree different to the uniform areas 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Fractal Surfaces Fractals are objects that show self similarity The word is overloaded – it can also mean other things Landscapes and coastlines are considered fractal in nature Mountains have hills on them that have rocks on them and so on Continents have gulfs that have harbors that have bays and so on Subdivision is the natural way of building fractal surfaces Start with coarse features, Subdivide to finer features Different types of fractals come from different subdivision schemes and different parameters to those schemes 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Fractal Terrain (1) Start with a coarse mesh Vertices on this mesh won’t move, so they can be used to set mountain peaks and valleys Also defines the boundary Mesh must not have dangling edges or vertices Every edge and every vertex must be part of a face Also define an “up” direction Then repeatedly: Add new vertices at the midpoint of each edge, and randomly push them up or down Split each face into four, as for the sphere 12/03/02 (c) University of Wisconsin

Fractal Terrain Example A mountainside 12/03/02 (c) University of Wisconsin

Fractal Terrain Details There are options for choosing where to move the new vertices Uniform random offset Normally distributed offset – small motions more likely Procedural rule – eg Perlin noise Scaling the offset of new points according to the subdivision level is essential For the subdivision to converge to a smooth surface, the offset must be reduced for each level Colors are frequently chosen based on “altitude” 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Fractal Terrains http://members.aol.com/maksoy/vistfrac/sunset.htm 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Terrain, clouds generated using procedural textures and Perlin noise http://www.planetside.co.uk/ -- tool is called Terragen 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Terrain, clouds generated using procedural textures and Perlin noise http://www.planetside.co.uk/ -- tool is called Terragen 12/03/02 (c) University of Wisconsin

Fractal Terrain Algorithm The hard part is keeping track of all the indices and other data Same algorithm works for subdividing sphere Split_One_Level(struct Mesh terrain) Copy old vertices for all edges Create and store new vertex Create and store new edges for all faces Create new edges interior to face Create new faces Replace old vertices, edges and faces 12/03/02 (c) University of Wisconsin

Subdivision Operations Split an edge, create a new vertex and two new edges Each edge must be split exactly once Need to know endpoints of edge to create new vertex Split a face, creating new edges and new faces based on the old edges and the old and new vertices Require knowledge of which new edges to use Require knowledge of new vertex locations 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Data Structure Issues We must represent a polygon mesh so that the subdivision operations are easy to perform Questions influencing the data structures: What information about faces, edges and vertices must we have, and how do we get at it? Should we store edges explicitly? Should faces know about their edges? 12/03/02 (c) University of Wisconsin

General Subdivision Schemes Subdivision schemes can also be used where there is no “target” surface They aim to replace a polygonal mesh with a smooth surface that approximates the coarse mesh There are many schemes: Butterfly scheme (for triangular meshes) Catmull-Clark subdivision (for mostly rectangular meshes, converges to B-splines in uniform regions) Loop’s scheme (for triangular meshes) Modified butterfly scheme (for triangular meshes) Many more… 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Butterfly Scheme Subdivides the same way we have been discussing Each edge is split Each face is split into four Rules are defined for computing the splitting vertex of each edge Basic rule for a uniform region Splitting an edge with endpoints that have degree 6 As before, all new interior vertices will have degree 6 Take a weighted sum of the neighboring vertices Weights define rules http://www.gamasutra.com/features/20000411/sharp_01.htm 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Butterfly Scheme (1) c b c a a d d c b c Multiply each vertex by its weight and sum them up w is a control parameter – determines how closely the shape conforms to the original mesh 12/03/02 (c) University of Wisconsin

Modified Butterfly Scheme The butterfly scheme must be modified to deal with edges with an endpoint of degree  6 In that case, compute new vertex based only the neighbors of the extraordinary vertex If an edge has two extraordinary endpoints, average the results from each endpoint to get the new endpoint The modified butterfly scheme is provably continuous about extraordinary vertices Proof formulates subdivision as a matrix operator and does eigen-analysis of subdivision matrix 12/03/02 (c) University of Wisconsin

Modified Butterfly Scheme v eN-1 eN-3 eN-2 12/03/02 (c) University of Wisconsin

Modified Butterfly Example Notes: The mesh is uniform everywhere except the original vertices It interpolates the original vertices It has smoothed out the underlying mesh 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Shading Revisited Some applications are intended to produce pictures that look photorealistic, or close to it The image should look like a photograph A better metric is perceptual: the image should generate a target set of perceptions Applications include: Film special effects, Training simulations, Computer games, Architectural visualizations, Psychology experiments, … To achieve the goal of photorealism, we must think carefully about light and how it interacts with surfaces What you should take away: The various aspects of light interaction and how algorithms capture or ignore them 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Light Transport Light transport problems are concerned with how much light arrives at any surface, and from what direction The physical quantity of interest is radiance: How much light (power) is traveling along a line in space per unit foreshortened area per unit solid angle We will not go into the theory - it takes 3 hours just to give the definitions and equations CS779 will cover this material in detail Similar problems arise in radiated heat transport (i.e. satellites), where some of the technology was originally developed 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Light Transport Which surface gets more light? Why? How much light reaches point “a”? If the walls are black? If the walls are mirrors? a a b 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Reflectance Modeling Reflectance modeling is concerned with the way in which light reflects off surfaces Clearly important to deciding what surfaces look like Also important in solving the light transport problem Physical quantity is BRDF: Bidirectional Reflectance Distribution Function A function of a point on the surface, an incoming light direction, and an outgoing light direction Tells you how much of the light that comes in from one direction goes out in another direction General BRDFs are difficult to work with, so simplifications are made 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Simple BRDFs Diffuse surfaces: Uniformly reflect all the light they receive Sum up all the light that is arriving: Irradiance Send it back out in all directions A reasonable approximation for matte paints, soot, carpet Perfectly specular surfaces: Reflect incoming light only in the mirror direction Rough specular surfaces: Reflect incoming light around the mirror direction Diffuse + Specular: A diffuse component and a specular component 12/03/02 (c) University of Wisconsin

(c) University of Wisconsin Light Sources Sources emit light: exitance Different light sources are defined by how they emit light: How much they emit in each direction from each point on their surface For some algorithms, “point” lights cannot exist For other algorithms, only “point” light can exist 12/03/02 (c) University of Wisconsin

Global Illumination Equation The total light leaving a point is given by the sum of two major terms: Exitance from the point Incoming light from other sources reflected at the point Exitance Sum BRDF Incoming light Light leaving Incoming light reflected at the point 12/03/02 (c) University of Wisconsin

Photorealistic Lighting Photorealistic lighting requires solving the equation! Not possible in the general case with today’s technology Light transport is concerned with the “incoming light” part of the equation Notice the chicken and egg problem To know how much light leaves a point, you need to know how much light reaches it To know how much light reaches a point, you need to know light leaves every other point Reflectance modeling is concerned with the BRDF Hard because BRDFs are high dimensional functions that tend to change as surfaces change over time 12/03/02 (c) University of Wisconsin