Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "CS559: Computer Graphics Lecture 33: Shape Modeling Li Zhang Spring 2008."— Presentation transcript:

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

2 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

3 Parametric surface Line Segments (1D) -> polygon meshes (2D) Cubic curves (1D) -> BiCubic Surfaces (2D) – Bezier curve -> Bezier surface

4 Bilinear Bezier Patch Define a surface that passes through a, b, c, d? Looks familiar?

5 Biquadratic Bezier Patch Define a surface that passes a 3x3 control lattice. u v p(u,0) = (1-u) 2 p 00 + 2(1-u)u p 10 + u 2 p 20 p(u,1) = (1-u) 2 p 01 + 2(1-u)u p 11 + u 2 p 21 p(u,2) = (1-u) 2 p 02 + 2(1-u)u p 12 + u 2 p 22 p(u,v) = (1-v) 2 p(u,0) + 2(1-v)v p(u,1) + v 2 p(u,2)

6 Bicubic Bezier Patch 4x4 control points? Demo: http://www.nbb.cornell.edu/neurobio/land/OldS tudentProjects/cs490- 96to97/anson/BezierPatchApplet/index.html Connecting Bezier Patches, demo on the same page.

7 De Casteljau algorithm in 2D p 1 00 (u,v) = Bilinear(p 00, p 10, p 01, p 11 ; u, v) p 1 10 (u,v) = Bilinear(p 10, p 20, p 11, p 21 ; u, v) p 1 01 (u,v) = Bilinear(p 01, p 11, p 02, p 12 ; u, v) p 1 11 (u,v) = Bilinear(p 11, p 21, p 12, p 22 ; u, v) p 1 00 (u,v) = Bilinear(p 00, p 10, p 01, p 11 ; u, v)

8 Different degree in different directions u v

9 General Formula for Bezier Patch If we have contronl points p i,j on a m by n lattice, Properties – Invariant to affine transform – Convex combination, – Used for intersection

10 General Formula for Bezier Patch If we have contronl points p i,j on a m by n lattice, Surface Normal

11 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.

12 Subdivision Surface From a coarse control mesh to smooth mesh with infinite resolution

13 Example: Toy story 2

14 Subdivision Curve We 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

15 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

16 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

17 Subdivision Curves: Interpolating Handling Boundary Cases

18 Subdivision Surfaces Extend subdivision idea from curves to surfaces RTR, 3e, figure 13.32

19 Basic Steps

20 Loop Subdivision Regular vertex: valence = 6 Irregular vertex: valence != 6 Irregular vertices can only be initial vertices.

21 Loop Subdivision

22 C2 for regular vertices C1 for irregular vertices

23 Limiting Surface Position and tangent of a vertex of the limiting surface can be computed directly ∞

24 Sqrt(3) subdivision

25

26 C2 for regular vertices C1 for irregular vertices

27 Sqrt(3) subdivision

28 Sqrt(3) vs Loop + slower triangle growth rate + better for adaptive subdivision - Edge flipping adds complexity - Less intuitive at first few iterations

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

30 Catmull-Clark Subdivision Regular vertices: valence = 4

31 Catmull-Clark Subdivision C2 for regular vertices C1 for irregular vertices

32 Catmull-Clark Subdivision Geri’s game

33 Piecewise smooth subdivision

34


Download ppt "CS559: Computer Graphics Lecture 33: Shape Modeling Li Zhang Spring 2008."

Similar presentations


Ads by Google