cs559: computer graphics

34
CS559: Computer Graphics Lecture 33: Shape Modeling Li Zhang Spring 2008

Upload: whoopi-estrada

Post on 01-Jan-2016

32 views

Category:

Documents


0 download

DESCRIPTION

CS559: Computer Graphics. Lecture 33: Shape Modeling Li Zhang Spring 2008. Today. Shape Modeling Reading Real-Time Rendering, 3e, 13.2.1 (except Rational Bezier Patches) Linux: /p/course/cs559-lizhang/public/readings/ 13_surfs_gleicher.pdf  - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CS559: Computer Graphics

CS559: Computer Graphics

Lecture 33: Shape ModelingLi Zhang

Spring 2008

Page 2: CS559: Computer Graphics

Today• Shape Modeling

• Reading• Real-Time Rendering, 3e, 13.2.1 (except Rational Bezier

Patches)• Linux: /p/course/cs559-lizhang/public/readings/

13_surfs_gleicher.pdf • Windows: P:\course\cs559-lizhang\public\readings\

13_surfs_gleicher.pdf

Page 3: CS559: Computer Graphics

Parametric surface• Line Segments (1D) -> polygon meshes (2D)• Cubic curves (1D) -> BiCubic Surfaces (2D)

– Bezier curve -> Bezier surface

Page 4: CS559: Computer Graphics

Bilinear Bezier Patch• Define a surface that passes through a, b, c, d?

Looks familiar?

Page 5: CS559: Computer Graphics

Biquadratic Bezier Patch• Define a surface that passes a 3x3 control lattice.

u

v

p(u,0) = (1-u)2 p00 + 2(1-u)u p10 + u2 p20

p(u,1) = (1-u)2 p01 + 2(1-u)u p11 + u2 p21

p(u,2) = (1-u)2 p02 + 2(1-u)u p12 + u2 p22

p(u,v) = (1-v)2 p(u,0) + 2(1-v)v p(u,1) + v2 p(u,2)

Page 6: CS559: Computer Graphics

Bicubic Bezier Patch• 4x4 control points?

• Demo: http://www.nbb.cornell.edu/neurobio/land/OldStudentProjects/cs490-96to97/anson/BezierPatchApplet/index.html

• Connecting Bezier Patches, demo on the same page.

Page 7: CS559: Computer Graphics

De Casteljau algorithm in 2D

p100(u,v) = Bilinear(p00, p10, p01, p11; u, v)

p110(u,v) = Bilinear(p10, p20, p11, p21; u, v)

p101(u,v) = Bilinear(p01, p11, p02, p12; u, v)

p111(u,v) = Bilinear(p11, p21, p12, p22; u, v)

p100(u,v) = Bilinear(p00, p10, p01, p11; u, v)

Page 8: CS559: Computer Graphics

Different degree in different directions

u

v

Page 9: CS559: Computer Graphics

General Formula for Bezier Patch• If we have contronl points pi,j on a m by n lattice,

• Properties– Invariant to affine transform– Convex combination,– Used for intersection

Page 10: CS559: Computer Graphics

General Formula for Bezier Patch• If we have contronl points pi,j on a m by n lattice,

• Surface Normal

Page 11: CS559: Computer Graphics

Issues with Bezier Patches• With Bézier or B-spline patches, modeling

complex surfaces amounts to trying to cover them with pieces of rectangular cloth.

• It’s not easy, and often not possible if you don’t make some of the patch edges degenerate (yielding triangular patches).

• Trying to animate that object can make continuity very difficult, and if you’re not very careful, your model will show creases and artifacts near patch seams.

• Subdivision Surface is a promising solution.

Page 12: CS559: Computer Graphics

Subdivision Surface• From a coarse control mesh to smooth mesh with

infinite resolution

Page 13: CS559: Computer Graphics

Example: Toy story 2

Page 14: CS559: Computer Graphics

Subdivision CurveWe have seen this idea before

Shirley, Figure 15.15, The limiting curve is a quadratic Bezier Curve

RTR 3e, Figure 13.29, The limiting curve is a quadratic B-spline

Page 15: CS559: Computer Graphics

Subdivision Curves: Approximating

Initial (Control) Curve:

For each iteration k+1, add two vertices between:

Approximating: Limit curve is very smooth (C2), but does not pass through control points

Page 16: CS559: Computer Graphics

Subdivision Curves: Interpolating

Initial (Control) Curve:

For each iteration k+1, add two vertices between:

Interpolating: for 0<w<1/8, limit curve is C1, and passes through control points

Page 17: CS559: Computer Graphics

Subdivision Curves: Interpolating• Handling Boundary Cases

Page 18: CS559: Computer Graphics

Subdivision Surfaces

Extend subdivision idea from curves to surfaces

RTR, 3e, figure 13.32

Page 19: CS559: Computer Graphics

Basic Steps

Page 20: CS559: Computer Graphics

Loop Subdivision

• Regular vertex: valence = 6• Irregular vertex: valence != 6• Irregular vertices can only be initial vertices.

Page 21: CS559: Computer Graphics

Loop Subdivision

Page 22: CS559: Computer Graphics

Loop Subdivision

C2 for regular verticesC1 for irregular vertices

Page 23: CS559: Computer Graphics

Limiting Surface• Position and tangent of a vertex of the limiting

surface can be computed directly

Page 24: CS559: Computer Graphics

Sqrt(3) subdivision

Page 25: CS559: Computer Graphics

Sqrt(3) subdivision

Page 26: CS559: Computer Graphics

Sqrt(3) subdivision

C2 for regular verticesC1 for irregular vertices

Page 27: CS559: Computer Graphics

Sqrt(3) subdivision

Page 28: CS559: Computer Graphics

Sqrt(3) vs Loop

+ slower triangle growth rate+ better for adaptive subdivision- Edge flipping adds complexity- Less intuitive at first few iterations

Page 29: CS559: Computer Graphics

Catmull-Clark Subdivision• Work for arbitrary polygons, not limited to triangles• Used by Pixar in Geri’s game, toy story2 and all subsequent

featues

Page 30: CS559: Computer Graphics

Catmull-Clark Subdivision

Regular vertices: valence = 4

Page 31: CS559: Computer Graphics

Catmull-Clark Subdivision

C2 for regular verticesC1 for irregular vertices

Page 32: CS559: Computer Graphics

Catmull-Clark Subdivision• Geri’s game

Page 33: CS559: Computer Graphics

Piecewise smooth subdivision

Page 34: CS559: Computer Graphics

Piecewise smooth subdivision