Surface Parametrizations Hugues Hoppe Microsoft Research IMA Workshop on Computer Graphics May 18, 2001 Hugues Hoppe Microsoft Research IMA Workshop on Computer Graphics May 18, 2001
MotivationMotivation Powerful rasterization hardware n normal maps, … n multi-texturing n pixel shaders n mainstream Need to associate textures with surface Need to parametrize surface Powerful rasterization hardware n normal maps, … n multi-texturing n pixel shaders n mainstream Need to associate textures with surface Need to parametrize surface
Two approaches l Lapped parametrization n overlapping patches n instancing l Lapped parametrization n overlapping patches n instancing l Global parametrization n atlas of charts n distinct domains 2D texture mesh surface
Projects in this talk l Lapped parametrization n Lapped textures [SIGGRAPH 2000] n Real-time fur [I3D 2001] n Real-time hatching [SIGGRAPH 2001] l Lapped parametrization n Lapped textures [SIGGRAPH 2000] n Real-time fur [I3D 2001] n Real-time hatching [SIGGRAPH 2001] l Global parametrization n Silhouette clipping [SIGGRAPH 2000] n Texture mapping progressive meshes [SIGGRAPH 2001] with:Emil Praun, Adam Finkelstein (Princeton), Jed Lengyel (Microsoft) with:Emil Praun, Adam Finkelstein (Princeton), Jed Lengyel (Microsoft) with:Pedro Sander, Steven Gortler (Harvard), John Snyder (Microsoft) with:Pedro Sander, Steven Gortler (Harvard), John Snyder (Microsoft)
[Sander, Gu, Gortler, Hoppe, Snyder. SIGGRAPH 2000] Silhouette clipping
Mesh simplification original mesh + texture/bump map poor silhouette simplified mesh
silhouette clipped Silhouette clipping original mesh simplified mesh + texture/bump map
silhouette clipped Silhouette clipping original mesh simplified mesh + texture/bump map
Texturing the simplified mesh original mesh simplified mesh texture atlas rendered 70K faces500 faces [Soucy et al 96] [Cignoni et al 98]
Atlas of triangles mesh (500 faces) (8 x 32 x 2 triangles, 256 x 1024 texels) texture type normal map color map
Texture sampling closest-point [Cignoni et al 98] original simplified vertex normals normal-shooting (our technique)
Summary: atlas of triangles original mesh simplified mesh texture atlas rendered 70K faces500 faces non-uniform sampling!
[Sander, Snyder, Gortler, Hoppe. SIGGRAPH 2001] Texture mapping progressive meshes
43,000 faces Progressive mesh representation refinement stream base mesh 43 faces 1,000 2,000 level-of-detail control 43,000
ChallengeChallenge l So far, texture atlas defined for single mesh. l What if desire mesh with 1000, 2000 faces? l Store additional texture atlases ? l So far, texture atlas defined for single mesh. l What if desire mesh with 1000, 2000 faces? l Store additional texture atlases ? 500 faces atlas of 500 triangles
SolutionSolution l Construct texture atlas valid for all M 0 …M n. 470 faces 700 faces 1,200 faces 10,000 faces
GoalsGoals (1) Minimize texture stretch
GoalsGoals (2) Minimize texture deviation (1) Minimize texture stretch (2) Minimize texture deviation (stricter than Hausdorff error) [Cohen et al 98]
ApproachApproach (1) partition original mesh into charts (2) form initial chart parametrizations (3) resize chart polygons (4) simplify mesh (5) optimize parametrization (6) pack chart polygons (7) sample texture images
ApproachApproach straight boundaries!
ApproachApproach (1) partition original mesh into charts (2) form initial chart parametrizations (3) resize chart polygons (4) simplify mesh (5) optimize parametrization (6) pack chart polygons (7) sample texture images
ApproachApproach
ApproachApproach
ApproachApproach
ApproachApproach
ApproachApproach mipmap artifacts!
ApproachApproach (1) partition original mesh into charts (2) form initial chart parametrizations (3) resize chart polygons (4) simplify mesh (5) optimize parametrization (6) pack chart polygons (7) sample texture images
ParametrizationParametrization angle-preserving (conformal) γ = Γ angle-preserving (conformal) γ = Γ area-preserving γ Γ = 1 area-preserving γ Γ = 1 length-preserving (isometric) γ = Γ = 1 length-preserving (isometric) γ = Γ = 1 angle-preserving (conformal) γ = Γ angle-preserving (conformal) γ = Γ area-preserving γ Γ = 1 area-preserving γ Γ = 1 length-preserving (isometric) γ = Γ = 1 length-preserving (isometric) γ = Γ = 1 2D texture domain surface in 3D linear map TT singular values: γ, Γ
Stretch-minimizing parametrization 2D texture domain surface in 3D linear map TT singular values: γ, Γ L 2 (M) = T (L 2 (T)) 2 A(T) L ∞ (M) = max T L ∞ (T) L 2 (T) = ½√ γ 2 + Γ 2 L ∞ (T) = Γ high stretch!
Stretch-minimizing parametrization Floater parametrization (≈ harmonic map) L 2 = 2.26 L = 9.86 L 2 stretch minimization L 2 = 1.22 L = 2.13
Example of stretch minimization ignoring stretch minimizing stretch
DemoDemo l bunny l horse l parasaur l bunny l horse l parasaur
Summary: global parametrization l Good for normal maps l Large texture l Resampling artifacts l Good for normal maps l Large texture l Resampling artifacts atlas of triangles atlas of charts
[Praun, Finkelstein, Hoppe. SIGGRAPH 2000] Lapped textures
ExampleExample “example” image textured surface mesh geometry ?
ApproachApproach texture patch surface
Key idea: patch pasting texture patch surfacesurface “lapped textures”
Texture patch creation
Less structure splotch
Direction field: user-specified
Patch growth
Improve alignment to direction field texture patch surface
Tangential vector field TTSS
Optimizing the parametrization TT SS BB CC AA (T)(T)(T)(T) (T)(T)(T)(T) (S)(S)(S)(S) (S)(S)(S)(S) (A)(A)(A)(A) (A)(A)(A)(A) (B)(B)(B)(B) (B)(B)(B)(B) (C)(C)(C)(C) (C)(C)(C)(C) face in 3D 2D texture space
Optimizing the parametrization Sparse linear least squares problem fast solution Sparse linear least squares problem fast solution
Result of optimization
Texture storage and rendering l Traditional approach: Global texture atlas n Pre-composite into a texture map. -- OR -- l Novel approach: Runtime pasting n Composite at runtime using hardware. l Traditional approach: Global texture atlas n Pre-composite into a texture map. -- OR -- l Novel approach: Runtime pasting n Composite at runtime using hardware.
Traditional: Global texture atlas
Novel: Runtime pasting l Store vertex parametrizations for each patch l Composite at run-time using hardware (triangles may be rendered several times) l Store vertex parametrizations for each patch l Composite at run-time using hardware (triangles may be rendered several times)
Pros & Cons Global atlasGlobal atlas + Faster rendering, more portable + Easy to paint unique details (eyes, nose) – Sampling artifacts Runtime pastingRuntime pasting – Increases model complexity ( 1.6 –3) + Huge effective resolution + Reuse parametrization for many textures Global atlasGlobal atlas + Faster rendering, more portable + Easy to paint unique details (eyes, nose) – Sampling artifacts Runtime pastingRuntime pasting – Increases model complexity ( 1.6 –3) + Huge effective resolution + Reuse parametrization for many textures
DemosDemos l bunny (& paint) l parasaur l holes3 l stonebunny l bunny (& paint) l parasaur l holes3 l stonebunny
Results: splotches (completely automatic: no direction field)
Results: anisotropic
25 frames per sec! 256 x 256 texture (282 times) 256 x 256 texture (282 times) 15,000 faces
Controlling direction and scale
LimitationsLimitations low-frequencycomponentsboundarymismatches direction field singularities
ExtensionsExtensions
[Lengyel, Praun, Finkelstein, Hoppe. I3D 2001] Real-time fur on arbitrary surfaces volumetric lapped texture
MotivationMotivation
Previous work: geometric hair l Lines interactive for sparse fur l Challenge: aliasing l Lines interactive for sparse fur l Challenge: aliasing [Van Gelder, Wilhelms ’97]
Shell textures [Lengyel ’00]
Shell textures l Problem: required texture memory is huge! l Solution: use lapped texture for each shell. l Problem: required texture memory is huge! l Solution: use lapped texture for each shell. opaque skin transparent shells composite
Generating the textures 1.Geometric model – Seed surface with “curl” starting points. – Grow as particle system. 1.Geometric model – Seed surface with “curl” starting points. – Grow as particle system.
Generating the textures – Interpolate to generate more seed points. – Ignore hair-to-hair collision. – Interpolate to generate more seed points. – Ignore hair-to-hair collision.
Generating the textures 2. Sample volume Keep: – color – opacity – ( normal) 2. Sample volume Keep: – color – opacity – ( normal)
Generating the textures Using different particle parameters, wide range of fur possible.
Poor silhouette
Solution: fins
Fin rendering l Fade based on viewing angle
Fur results ~20 fps
[Praun, Hoppe, Webb, Finkelstein. SIGGRAPH 2001] Real-time hatching 1-D (tonal) array of textures help convey shape!
OverviewOverview - Real-time rendering - Strokes with temporal & spatial coherence - Real-time rendering - Strokes with temporal & spatial coherence Challenges:Challenges: Solution:Solution: - Exploit hardware multi-texturing - Coherence: n tonal art maps (TAMs) n 6-way blend on each triangle - Exploit hardware multi-texturing - Coherence: n tonal art maps (TAMs) n 6-way blend on each triangle
Tonal art map l Mip-mapped texture images l Stroke nesting property l Mip-mapped texture images l Stroke nesting property tone scale
tone tone v1v1v1v1 v2v2v2v2 v3v3v3v3 6-way blend final Multitexture blending
Lapped parametrization texture patch surfacesurface
Direction field l Based on surface principal curvatures l Optimized to be smooth n [Hertzmann & Zorin 2000] n Symmetry: 180º instead of 90º l Based on surface principal curvatures l Optimized to be smooth n [Hertzmann & Zorin 2000] n Symmetry: 180º instead of 90º
ResultResult (30 fps)
ResultResult
ResultResult
Summary: lapped parametrizations l Instancing reduce memory permits volume textures & 1D functions l Avoids resampling artifacts l Instancing reduce memory permits volume textures & 1D functions l Avoids resampling artifacts 256 x 256 texels 256 x 256 x x 256 x 6
Overall summary l Lapped parametrization n overlapping patches n patches share data l Lapped parametrization n overlapping patches n patches share data l Global parametrization n atlas of charts n all charts unique
Parametrization Notes l Scale control given by ||T||, ||S|| l Solution unique up to a translation l No explicit fairness term l No “flipped triangle” ambiguity l Patch may require further growth l Scale control given by ||T||, ||S|| l Solution unique up to a translation l No explicit fairness term l No “flipped triangle” ambiguity l Patch may require further growth
Fin Texture l Single fin texture l Interval region for each edge. l Single fin texture l Interval region for each edge. edge2edge1