29.01.2014 Views

Segmentation & Constraints

Segmentation & Constraints

Segmentation & Constraints

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Siggraph Course<br />

Mesh Parameterization –<br />

Theory and Practice<br />

<strong>Segmentation</strong> & <strong>Constraints</strong>


<strong>Segmentation</strong><br />

• Necessary for closed and high genus meshes<br />

• Reduce parametric distortion<br />

Chartification<br />

Texture Atlas


<strong>Segmentation</strong> – Goals<br />

Large Charts<br />

Low Distortion


<strong>Segmentation</strong> – Single Chart<br />

Gu et al. 2002 Sheffer & Hart 2002<br />

• High genus surface → topological disk<br />

• Improve the cuts


<strong>Segmentation</strong> – Multiple Charts<br />

MCGIM<br />

LSCM<br />

Iso-charts<br />

D-charts


Iso-charts<br />

• Fast and effective atlas generator<br />

– large charts with bounded parametric distortion<br />

• UVAtlas in DirectX 9<br />

– D3DXUVAtlasCreate, D3DXUVAtlasPartition,<br />

D3DXUVAtlasPack<br />

• Light map compression, Halo


Iso-charts – Demo


Iso-charts – Overview<br />

• Surface spectral analysis<br />

• Stretch optimization<br />

• Surface spectral clustering<br />

• Optimize chart boundary<br />

• Recursively split charts<br />

– until stretch criterion is met<br />

• Atlas packing


Iso-charts – Spectral Analysis<br />

x N<br />

y N<br />

x 2<br />

y 2<br />

d 1 N<br />

d 2 N<br />

d12<br />

x 1<br />

<br />

<br />

min<br />

<br />

<br />

N<br />

N<br />

<br />

i1 j1<br />

(||<br />

y<br />

i<br />

<br />

d<br />

Geodesic Distance Distortion (GDD)<br />

y<br />

j<br />

||<br />

y 1<br />

ij<br />

2<br />

)


Iso-charts – Spectral Analysis<br />

d 1 N<br />

x 1<br />

d 2 N<br />

d12<br />

x N<br />

x 2<br />

D<br />

N<br />

<br />

d<br />

<br />

d<br />

<br />

<br />

<br />

d<br />

2<br />

11<br />

2<br />

21<br />

<br />

2<br />

N1<br />

d<br />

d<br />

d<br />

2<br />

12<br />

2<br />

22<br />

2<br />

N 2<br />

<br />

<br />

d<br />

d<br />

d<br />

2<br />

1N<br />

2<br />

2N<br />

2<br />

NN<br />

<br />

<br />

<br />

<br />

<br />

<br />

• Step 1: Construct the matrix of squared distance<br />

– Surazhsky et al. 2005


Iso-charts – Spectral Analysis<br />

x N<br />

1<br />

d 1 N<br />

d 2 N<br />

d12<br />

x 2<br />

B<br />

N<br />

<br />

where J<br />

N<br />

2<br />

<br />

J<br />

I<br />

<br />

N<br />

D<br />

1<br />

N<br />

N<br />

J<br />

T<br />

11<br />

N<br />

x 1<br />

• Step 2: Perform centering and normalization


Iso-charts – Spectral Analysis<br />

x N<br />

d 1 N<br />

d 2 N<br />

d12<br />

x 2<br />

<br />

T<br />

1 v1<br />

| | | <br />

T<br />

<br />

<br />

2 v2<br />

<br />

y1<br />

y 2 y N <br />

<br />

<br />

<br />

| | | <br />

T<br />

<br />

n vn<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

x 1<br />

• Step 3: Perform eigen-analysis to get the embedding<br />

coordinates


Iso-charts – Spectral Analysis<br />

Zigelman et al. 2002<br />

• Produces triangle flips<br />

• Only handles single-chart models


Iso-charts – Stretch Optimization<br />

Sander et al. 2001<br />

nonlinear optimization<br />

2D texture domain<br />

singular values: γ , Γ<br />

surface in 3D


Iso-charts – Stretch Optimization<br />

[Sander01], L 2 = 1.04, 222s<br />

[Sander02], L 2 = 1.03, 39s<br />

Spectral, L 2 = 1.04, 2s<br />

Spectral+Optimization, L 2 = 1.03, 6s


Iso-charts – Spectral Clustering<br />

Analysis<br />

Clustering


Iso-charts – Boundary Optimization<br />

S<br />

T<br />

• Create nonjaggy cut, through “crease” edges<br />

• Minimize embedding distortion


Iso-charts – Atlas Packing<br />

• A Tetris algorithm [Lévy02]<br />

V<br />

U


Iso-charts – Acceleration<br />

• Landmark algorithm [Silva et al. 2003]<br />

– reduce the size of the eigenanalysis<br />

• Only compute the top 10 eigenvalues<br />

– over 95% of the squared energy


<strong>Constraints</strong><br />

• Enforce specific point-to-point correspondences<br />

3D mesh 2D image constrained<br />

texture mapping


Constrained Texture Mapping<br />

• Soft constraints [Lévy 2001]<br />

– approximate constraints<br />

– generate foldovers for large constraint sets<br />

• Hard constraints<br />

– Lagrange multipliers [Desbrun et al. 2002]<br />

– Matchmaker [Kraevoy et al. 2003]<br />

– TextureMontage [Zhou et al. 2005]


Matchmaker – Key Idea<br />

• Reduce constrained<br />

parameterization problem to<br />

unconstrained one by<br />

– Split mesh into patches s.t. constrained<br />

vertices V F are on patch boundaries<br />

4<br />

1 2<br />

5<br />

3<br />

– Split 2D domain into matching convex<br />

pieces s.t. matching positions P F are<br />

on their boundaries<br />

1<br />

5<br />

2<br />

– Map each patch to corresponding<br />

convex using barycentric embedding<br />

4<br />

3


Matchmaker – Algorithm<br />

1. Input: 3D mesh + (V F , P F )<br />

2. Compute unconstrained<br />

2D embedding M<br />

3. Virtual boundary:<br />

1. Triangulate region between<br />

M and its bounding<br />

rectangle<br />

2. M*= M+new triangles<br />

mesh+V F<br />

P F<br />

3. Add boundary vertices to V F<br />

M<br />

M*


Matchmaker – Algorithm<br />

4. Find matching triangulations<br />

– Adding non-intersecting edges/paths<br />

M* T M* (V F )<br />

P F T(P F )


Matchmaker – Algorithm<br />

• Path matching<br />

Compute all shortest paths between vertices in V F<br />

While paths exist<br />

Get shortest path s=(v i ,v j )<br />

v k<br />

p k<br />

Test if s is legal<br />

If legal<br />

(p i ,p j ) does not intersect existing edges in T(P F )<br />

(v i ,v j ) does not block future paths<br />

Add s to T M* (V F ) & (p i ,p j ) to T(P F )<br />

Recompute non-tested paths that intersect s<br />

T M* (V F ) T(P F )


Matchmaker – Algorithm<br />

• Introducing Steiner vertices<br />

– allow the creation of a valid path<br />

between any pairs of features<br />

• Perform Dijkstra searches on<br />

both the mesh vertices and the<br />

edge midpoints<br />

T(P F )<br />

– Schreiner et al. 2004<br />

T M* (V F )


Matchmaker – Algorithm<br />

5. Map each patch S i T M* (V F ) to matching triangle<br />

T i T(P F ) using barycentric coordinates<br />

T M* (V F )<br />

T(P F )<br />

Barycentric<br />

mapping M’<br />

Texture using M’


Matchmaker – Algorithm<br />

6. Constrained smoothing M’<br />

– Minimize metric distortion compared to<br />

original 3D mesh<br />

– Maintain validity<br />

M’<br />

Smoothed M’


Matchmaker – Results<br />

+<br />

=


TextureMontage<br />

• Texturing arbitrary surface from multiple images<br />

Stanford Bunny<br />

6 photographs of another bunny


TextureMontage – Key Issues<br />

• Texturing arbitrary surface from multiple images<br />

– Partition the model and images automatically and<br />

simultaneously<br />

– Ensure continuity across patch boundaries with few<br />

correspondences<br />

– Fill in non-texture areas


TextureMontage – Algorithm<br />

1. Preprocessing<br />

– Adjust exposure differences and color balances<br />

– Segment background regions (e.g. LazySnapping [Li04])<br />

– Compute and store the distance to the nearest non-background<br />

pixel for each pixel


TextureMontage – Algorithm<br />

2. Partition mesh and images<br />

– Add valid path-edge pairs (similar to Matchmaker)<br />

– Prevent path-edge pairs from crossing background regions


TextureMontage – Algorithm<br />

3. Generate progressive mesh<br />

– Half-edge collapse simplification [Hoppe 96]<br />

v j<br />

v i<br />

v j


TextureMontage – Algorithm<br />

4. Create coarse texture map<br />

– Map triangles of the base mesh to corresponding texture<br />

triangles in images


TextureMontage – Algorithm<br />

5. Coarse-to-fine map construction<br />

– Insert deleted vertices back one by one<br />

v j v j v i<br />

– For inner vertices, minimize geometric stretch energy<br />

[Sander et al. 2001]<br />

– For boundary vertices, minimize texture mismatch


TextureMontage – Algorithm<br />

• Texture coords optimization for boundary vertices<br />

v m<br />

p<br />

v j<br />

v j<br />

v i<br />

v k<br />

v l<br />

v m<br />

p v k<br />

p v i<br />

v j<br />

G A (p)<br />

v l<br />

v j<br />

G B (p)<br />

p<br />

v i<br />

v k<br />

Image 1 Image 2


TextureMontage – Algorithm<br />

• Texture coords optimization for boundary vertices<br />

– Evaluate texture mismatch energy<br />

E<br />

tex<br />

<br />

<br />

n<br />

<br />

'<br />

'<br />

I1<br />

( sk<br />

) I2(<br />

sk<br />

) (1 )<br />

G ( sk<br />

) G ( s<br />

1<br />

2 k<br />

)<br />

k1<br />

– Minimize both geometric stretch and texture mismatch<br />

– Fix one border and optimize the other<br />

E<br />

E geo<br />

( 1<br />

)<br />

E tex


TextureMontage – Algorithm<br />

• Texture coords optimization for boundary vertices<br />

Original<br />

Model<br />

Unconstrained<br />

Optimization<br />

Color Matching<br />

Enforced<br />

Color and<br />

Gradient


TextureMontage – Algorithm<br />

6. Surface texture inpainting<br />

– Unassigned region due to lack of correspondences


TextureMontage – Algorithm<br />

6. Surface texture inpainting<br />

– Smoothly fill in hole regions based on Poisson equation<br />

<br />

s.t. | *<br />

f d f f |<br />

<br />

<br />

<br />

f<br />

:<br />

unknown color values of<br />

vertices in hole regions<br />

[Polthier and Preuss 2000]<br />

[Pérez et al. 2003]<br />

f<br />

*<br />

<br />

d<br />

:<br />

:<br />

:<br />

color values of vertices around<br />

hole regions<br />

Laplace operator<br />

a controlling scalar field


TextureMontage – Algorithm<br />

6. Surface texture inpainting<br />

(a) (b) (c)


TextureMontage – Algorithm<br />

7. Atlas packing (UVAtlas)


TextureMontage – Demo


Siggraph Course<br />

Mesh Parameterization –<br />

Theory and Practice<br />

<strong>Segmentation</strong> & <strong>Constraints</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!