1 Curved PN Triangles Alex Vlachos AVlachos@ati.com Jörg Peters jorg@cise.ufl.edu
Outline 2 Motivation Constraints Surface Properties Performance Demo
Quick Demo 3
Constraints 4 Software Developers Must fit into their art and engineering pipelines Must be compatible with work already in progress Must be backward compatible API s: OpenGL & Microsoft s Direct3D Expressible through the API concisely Minimal change (vertex buffers and index buffers) Hardware Performance Cost Fits current architecture
Goal: Improve Visual Quality No paradigm change for developers & artists Do not require developers to store geometry differently (triangles) Wide array of art content is usable Backwards compatible Minimize change to API s Use existing data structures No explicit connectivity information Fit existing hardware designs 5
Rendering Curved Surfaces 6 Visual cues Smooth silhouettes Lighting cues on the interior of polygons Separability of normal and position Familiar paradigm: bump mapping Visual Smoothness Curved PN Triangles provide Improved silhouettes Additional sample points for per-vertex operations Lighting operations (approximate Phong shading) Vertex shaders
7 Vertex and Index Buffers Index Buffer Vertex Buffer Triangle 0 Triangle 1 Triangle 2 0 4 7 2 4 9 8 2 3. P 0,N 0 P 1,N 1 P 2,N 2 P 3,N 3 P 4,N 4 P 5,N 5 P 6,N 6 P 7,N 7 P 8,N 8 P 9,N 9. N 4 N 0 P 0 P 4 P 7 N 7
8 Vertex and Index Buffers Index Buffer Vertex Buffer Triangle 0 Triangle 1 Triangle 2 0 4 7 2 4 9 8 2 3. P 0,N 0 P 1,N 1 P 2,N 2 P 3,N 3 P 4,N 4 P 5,N 5 P 6,N 6 P 7,N 7 P 8,N 8 P 9,N 9. N 4 P 4 N 2 P 2 N 9 P 9
" " " Geometry: cubic Bézier (de Casteljau) form = control points = coefficients control net! #" $ #" $ % '& % #" ( )" *,+ + -% ". /10
5 5 5 Normal: quadratic Bézier (de Casteljau) form 2 3 4 5768 4 9 2 :;<-=1>@? ACBB = 5 D AFE B EGIH = D A B EEJG ;%= D A BB H 5 D A EE B G ; H D A B B ;K5 (or 2 linear == Phong shading)
Evaluation API lod L MON1PRQSP!TPRU$UVUXW = number of evaluation points on one edge minus two
Insertion into Graphics Pipeline On chip Vertex and primitive assembly Vertex shading Triangle setup Rasterization
Insertion into Graphics Pipeline On chip Vertex and primitive assembly. in 1 triangle (P & N) lod Curved PN triangle tesselation. out Y[Z]\_^ ` acb-d microtriangles Vertex shading Triangle setup Rasterization
e e e e Why this choice? Constraints: Isolation (cannot access mesh neighbors) Fast Evaluation (including normal) Modeling range (smoother contours and better shading) Symmetry (aesthic)
f f f f Constraints: f Isolation Fast Evaluation Decision: Rules out subdivision or surface spline Continuous normal without neighbor? (Prescribe normal along boundary but shape can be poor) Modeling range Symmetry.
g g g g g g h j i Constraints: Isolation Fast Evaluation Modeling range Decision: No subdivision or surface spline? (can t see neighbor!) No rational surface (normal of) rational surface is expensive [Gregory, Chiyokura, Grimm & Hughes] not multiple pieces [Clough- Tocher, Shirman-Sequin, Powell- Sabin] polynomial Symmetry.
k k k k k k l m Constraints: k Isolation Decision: No subdivision or surface spline? (can t see neighbor!) Fast Evaluation Not rational parametrization not multiple pieces n polynomial Modeling range Symmetry shape preservation Inflections: geometry cubic, normal quadratic predictability: want curved PN triangle close to the flat triangle
o o o o o o o p q Constraints: o Isolation Decision: No subdivision or surface spline? (can t see neighbor!) Fast Evaluation Not rational surface not multiple pieces r polynomial Modeling range (shape preservation) Inflections: geometry cubic, normal quadratic predictable: prove curved patch is close to the flat triangle Symmetry 3-sided Bézier patch.
Geometry coefficients stuu v wyx etc. s{z xu v ~})w x w zy ƒ x z x J ˆ. ƒ,š Œv wc Ž w Š Š s(xxx v J } v ~s{z xu s x z u s u z x. s u$x z s x u z sxz u$x ). v wyx w z w t J )ˆ.. (Farin 83)
Normal coefficients Linear vs Quadratic Normal Normalize ššœž Ÿ ~ Ÿ. «) K ± c²³ µ ¹ º Ÿ µ Ÿ ²» ± c²¼³ µ ¹ º O²³ )µ ½ ¾ (VanOverveld, Wyvill) šª
Normal coefficients Linear vs Quadratic Normal
È È À À Properties Interpolates À Á and  Á. ÃXÄ{ÅÆ on circle with center À Å Ç and radius É É. È ÊË Ì Å Í ÄXÎJÏ)Ð Quadratic precision: à ÅÅÅ. Surface is smooth at corners; Surface looks smooth (except possibly at silhouttes)
PN triangle calisthenics
Performance 10 Geometry, textures, display lists, shaders etc compete for memory Bandwidth savings Now able to actually feed high performance transform/shader engines
11 Basic Advantages Coarse triangulations yield geometry compression Level of detail (LOD) Geometry looks smoother!
Summary 12 API-friendly Developer-friendly Provides a vast visual improvement to existing and future content Improve silhouettes Improve lighting calculations Advantage of geometry compression and memory savings Overall performance is increased