Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr Subdivision Schemes...

Post on 29-Jan-2016

218 views 0 download

Tags:

transcript

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Subdivision Schemes

Lee Byung-GookDongseo Univ.

http://kowon.dongseo.ac.kr/~lbg/

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

What is Subdivision?

• Subdivision is a process in which a poly-line/mesh is recursively refined in order to achieve a smooth curve/surface.

• Two main groups of schemes:– Approximating - original vertices are moved– Interpolating – original vertices are unaffected

Is the scheme used here interpolating or approximating?Is the scheme used here interpolating or approximating?

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Geri’s Game

Frame from “Geri’s Game” by Pixar

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Subdivision Curves

• How do You Make a Smooth Curve?

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Chaikin’s Algorithm

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Corner Cutting

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Corner Cutting

1 : 33

: 1

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Corner Cutting

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Corner Cutting

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Corner Cutting

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Corner Cutting – Limit Curve

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Corner Cutting

The control polygon

The limit curve – Quadratic B-Spline Curve

A control point

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Linear B-spline Subdivision Scheme

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Quadratic B-spline Subdivision Scheme

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Cubic B-spline Subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

N. Dyn 4-points Subdivision Scheme

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

4-Point Scheme

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

4-Point Scheme

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

4-Point Scheme

1

: 1

1 :

1

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

4-Point Scheme

1 :

8

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

4-Point Scheme

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

4-Point Scheme

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

4-Point Scheme

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

4-Point Scheme

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

4-Point Scheme

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

4-Point Scheme

The control polygon

The limit curveA control point

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Comparison

Non interpolatory subdivision schemes

• Corner Cutting

Interpolatory subdivision schemes

• The 4-point scheme

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Theoretical Questions

• Given a Subdivision scheme, does it converge for all polygons?

• If so, does it converge to a smooth curve? – – – Better?

• Does the limit surface have any singular points?• How do we compute the derivative of the limit surface?

1C2C

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Subdivision Surfaces

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Subdivision SurfacesGeri’s hand as a piecewise smooth Catmull-Clark surface

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Subdivision Surfaces

• A surface subdivision scheme starts with a control net (i.e. vertices, edges and faces)

• In each iteration, the scheme constructs a refined net, increasing the number of vertices by some factor.

• The limit of the control vertices should be a limit surface.• a scheme always consists of 2 main parts:

– A method to generate the topology of the new net.– Rules to determine the geometry of the vertices in the new

net.

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

General Notations

• There are 3 types of new control points:– Vertex points - vertices that are created in place of an old

vertex.– Edge points - vertices that are created on an old edge.– Face points – vertices that are created inside an old face.

• Every scheme has rules on how (if) to create any of the above.

• If a scheme does not change old vertices (for example - interpolating), then it is viewed simply as if

oldi

newi VV

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Doo-Sabin Subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Doo-Sabin Subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Doo-Sabin Subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Doo-Sabin Subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Doo-Sabin subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Catmull-Clark Subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Catmull-Clark Subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Catmull-Clark Subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Catmull-Clark Subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Catmull-Clark Subdivision

• The mesh is the control net of a tensor product B-Spline surface. – The refined mesh is also a control net, and the scheme was

devised so that both nets create the same B-Spline surface.

• Uses face points, edge points and vertex points.

• The construction is incremental – – First the face points are calculated, – Then using the face points, the edge points are computed.– Finally using both face and edge points, we calculate the

vertex points.

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Catmull-Clark - results

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Catmull-Clark - results

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Catmull-Clark - results

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Catmull-Clark - results

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Catmull-Clark - results

Catmull-Clark Scheme results in a surface which is almost everywhere2C

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Loop Subdivision

• Based on a triangular mesh• Loop’s scheme does not create face points

Old face

New face

Vertex points

Edge points

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

• How Position New Vertices?– Choose locations for new vertices as weighted average of

original vertices in local neighborhood

Loop Subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Loop Subdivision

• Every new vertex is a weighted average of old ones.• The list of weights is called a Stencil• Is this scheme approximating or interpolating?

3 3

1

1

1

1

1

1

1

nw

n

n

nwn

22cos2340

64

The rule for vertex points

The rule for edge points

8

33 lkj VVVVV

i

new

2 1cos( )

3 2

2cos( ) 0

4

2 5 1cos( ) 0.309

5 4

2 1

cos( )6 2

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Loop Subdivision

• How Refine Mesh?– Refine each triangle into 4 triangles by splitting each edge

and connecting new vertices

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Box Spline

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Loop - Results

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Loop - Results

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Loop - Results

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Loop - Results

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Loop - Results

Loop’s scheme results in a limit surface which is of continuity everywhere except for a finite number of singular points, in which it is .

2C1C

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Butterfly Scheme

• Butterfly is an interpolatory scheme.• Topology is the same as in Loop’s scheme.• Vertex points use the location of the old vertex.• Edge points use the following stencil:

-w

-w

-w

-w

1/21/2

2w

2w

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Butterfly - results

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Butterfly - results

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Butterfly - results

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Butterfly - results

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Butterfly - results

The Butterfly Scheme results in a surface which is but is not differentiable twice anywhere.

1C

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

LoopLoop

Catmull-ClarkCatmull-Clark

ButterflyButterfly

Comparison

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Kobblet sqrt(3) Subdivision

2 1cos( )

3 2

2cos( ) 0

4

2 5 1cos( ) 0.309

5 4

2 1

cos( )6 2

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Kobblet sqrt(3) Subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Kobblet sqrt(3) Subdivision

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Subdivision Schemes

Loop Butterfly

Catmull-Clark Doo-Sabin

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Subdivision Schemes

Loop Butterfly Catmull-Clark Doo-Sabin

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Advantages & Difficulties

• Advantages:– Simple method for describing complex surfaces– Relatively easy to implement– Arbitrary topology– Smoothness guarantees– Multiresolution

• Difficulties:– Intuitive specification– Parameterization– Intersections

Graphics Programming, Lee Byung-Gook, Dongseo Univ., E-mail:lbg@dongseo.ac.kr

Subdivision Schemes

• There are different subdivision schemes– Different methods for refining topology– Different rules for positioning vertices

• Interpolating versus approximating

Face Split Vertex Split

Doo-Sabin, Midege (C1)

Biquartic (C2)Catmull-Clark (C2)

Kobbelt (C1)

Quad. Meshes

Loop (C2)

Butterfly (C1)

Triangular Meshes

Approximating

Interpolating