content subdivision

32
Content Subdivision First some basics (control point polygon, mesh) Smooth - Triangle Some Polygon techniques(Strips, fans, meshes) Subdivision Linear/ Curves Subdivision Surfaces -Doo-Sabin -Catmull-Clark -Loop Scheme

Upload: akando

Post on 06-Jan-2016

42 views

Category:

Documents


1 download

DESCRIPTION

Content Subdivision. First some basics (control point polygon, mesh) Smooth - Triangle Some Polygon techniques(Strips, fans, meshes) Subdivision Linear/ Curves Subdivision Surfaces -Doo-Sabin -Catmull-Clark -Loop Scheme. Basics(Control Polygon). Basics(Control Mesh). Smooth - Triangle(1). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Content Subdivision

Content Subdivision

• First some basics (control point polygon, mesh)

• Smooth - Triangle

• Some Polygon techniques(Strips, fans, meshes)

• Subdivision Linear/ Curves• Subdivision Surfaces

-Doo-Sabin -Catmull-Clark

-Loop Scheme

Page 2: Content Subdivision

Basics(Control Polygon)

Page 3: Content Subdivision

Basics(Control Mesh)

Page 4: Content Subdivision

Smooth - Triangle(1)

• Curves are described with equations

• curves: -Compact notations,-Scalable,-Smooth and continuous,-Easy for collision detection and animation;-Saving in memory-Curves use less matrix transformation then similar done with a mesh-Potential for real-time rendering and simple code

Page 5: Content Subdivision

Smooth - Triangle(2)

• Basic Atom

• Graphics cards do not have build-in support for curves.Curves are not generous enough for computing shadow volume which can be more easily done with the basic atom.

Page 6: Content Subdivision

Tessellation

• Splitting a surface into a set of polygons.

• Also possible for curved surfaces

• Why??? Hardware!

• Any surface can be made out of triangles.

• With triangles it is alluded as Triangulation.

• Useful to handle concave polygons.

• Important for catching shadows and light.

Page 7: Content Subdivision

Tessellation(2)

• Avoid long thin triangles for shading.

• A Tessellator first projects its 3D polygon to a 2D plane.

• Best plane is where polygon with the largest area.

• Calculation of area where the magnitude of the normal has the largest length and throw away that direction.

Page 8: Content Subdivision

Tessellation(3)

• Ear clipping O(n2)

• Look at triangles with vertices i, (i+1), (i+2) where modulo n check if the line segments from at vertices i and (i+2) intersects line segments.

• Other problems might occur when polygons do not exhibit from one single outline. When they consists of holes for example. Solution could be to connects the holes with the exterior bounds so that one outline emerges.

Page 9: Content Subdivision

Tessellation(Ear Clipping)

Page 10: Content Subdivision

Triangle Strips

• Serie of connected triangles

• No need for sending each triangle.

• Only needs to send one vertex

• So rendering will be done fast.

• (v0, v1, v2, …, vn-1)

1 2i i iv v v

Page 11: Content Subdivision

Triangle Fan

• Same Idea as Strips

• Same performance

• Nvidea prefers Strips over Fans because of the driver optimisation.

• (v0, v1, v2, …, vn-1)

0 1 2,i iv v v

Page 12: Content Subdivision

Subdivision modelling

• What is Subdivision?• Relative new(used in movies)

• -Creating Attractive shapes(usually smooth)

• -From a basic to nice shape !

• -from an arbitrary mesh• -the limit of an infinite refinement

process

• Subdivision can be used for Modelling, animation and even for colours and textures.

Page 13: Content Subdivision

Subdivision modelling

• What is Subdivision?

Page 14: Content Subdivision

Subdivision

• Subdivision Can be roughly be categorised into Interpolating and approximating schemes.

• You start with an initial polygonal mesh which often has few vertices.

• By repetitively applying the subdivision procedure to the initial mesh, we generate a sequence of meshes that converges to a resulting surface.

Page 15: Content Subdivision

Subdivision(Linear)

• Piecewise Linear • 1-Dimensional• X = 1/2(Xleft + Xright)

• Y = 1/2(Yleft + Yright)

Page 16: Content Subdivision

Subdivision Curves

• Chaikin’s scheme:Qi = 3/4Pi + 1/4Pi+1

Ri = 1/4Pi + 3/4Pi+1

• P0 -> P1 ->P2 -> P (P =Polygon)

• Approximation

• convex hull

• Works on open and closed polygons

• Corner cutting(low pass filter)

• twice as much vertices

• after each step new vertices are connected.

Page 17: Content Subdivision

Subdivision Curves (Example)

Page 18: Content Subdivision

Subdivision Surfaces(1)

• Powerful Paradigm !!!

• Infinite level of detail (LOD)

• original surface is compact!

• Easy implementation, but analysis not.

• Works with polygons !

Page 19: Content Subdivision

Subdivision Surfaces(2)

• Two phase Process1) Refinement phase2) Smoothing Phase

Page 20: Content Subdivision

Subdivision Surfaces(3)

• The details specify the scheme and thus the shape-splitting can be done in different ways.-Whether the surface is approximating or interpolating.

• A subdivision scheme can be specified by: -(non)Stationary -uniform, same rules for each vertex and edge (smoothing phase)-triangle/polygon

Page 21: Content Subdivision

Subdivision Surfaces(4)

Page 22: Content Subdivision

Subdivision Surfaces(5)

• Regular/ irregular vertices.• Conditions

-Subdivision should be efficientthus few floating point operations. -The region of a of a control point should be finite.-Subdivision should achieve a order of smoothness thus C1 or C2.

• Shrinking at approximation

• Convex polyhedral

Page 23: Content Subdivision

Doo-Sabin Scheme(1)

• For each vertex of each face there will be an new vertex created

• For each face, connect the new points that have been generated.

• Connect the new vertices to the adjacent ones

Page 24: Content Subdivision

Doo-Sabin Scheme(2)

Page 25: Content Subdivision

Doo Sabin Scheme (example)

• Every Valence = 4

• note the triangular facets

• Approximating

Page 26: Content Subdivision

Catmull-Clark Sheme(1)

• For each face of the mesh, generate the new face points

• Generate the new edge points

• Calculate the new vertex points

• The mesh is reconnected by the following method. -Each new face point is connected to the new edge points of the edges defining the original face. -Each new vertex point is connected to the new edge points of all original

edges incident on the original vertex point. • Catmull-Clark works with quad meshes

Page 27: Content Subdivision

Catmull-Clark Scheme(2)

Page 28: Content Subdivision

Catmull-Clark Scheme (example)

• Every face has 4 control points

• Vertices retain their valence

• First order continuity at a irregular vertex

• Approximating

• Subdivision can be adapted at certain places where more detail is needed.

Page 29: Content Subdivision

Loop-Scheme(1)

• The Loop scheme is defined for triangle meshes only

• Every triangle will be split in 4 new triangles.

• m triangles, with n steps, 4n m

triangles.

• Most edges are shared by two triangles

• phase 1: refinement.

• Phase 2: fix geometrylook at mesh not just a triangle

Page 30: Content Subdivision

Loop Scheme(2)

• First formula updates existing vertices

• Second updates the new vertices

1

10 1

1 1

(1 ) ( )

3 3

8ki

k k k kn

k k k ki i i

n

p p p p

p p p pp

Page 31: Content Subdivision

Loop Scheme(3)

• Valence = 6 (regular)

• Mask (draw)

• New point should lie on the neighbourhood of the weighted points

• Next Beta-function give C2 at regular vertices

21 5 (3 2cos(2 / )( ) ( )

8 643

( )( 2)

nn

n

nn n

Page 32: Content Subdivision

Loop Scheme(3)

• First formula calculates directly a limit point

• Second formula calculates a limit tangent

• use cross product to get the normal, n = tu x tv

• With many subdivisions a model shrinks, a solution might be to increase more vertices at the control mesh

1 1

0 0

1( )

38 ( )

cos(2 / ) , sin(2 / ) ,n n

k ku i v i

i i

nn

n

t i n t i n

p p