html5-img
1 / 37

Higher Order Surfaces

Higher Order Surfaces. Henry Moreton. Why surfaces? Higher order primitives. Animation Level of Detail Bandwidth Filtering. The “Surfaces” Roadmap. Polynomial Surfaces B-Spline, Bézier Tensor product, Triangle Subdivision Surfaces Catmull-Clark, Loop Displacement Mapping

Download Presentation

Higher Order Surfaces

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Higher Order Surfaces Henry Moreton

  2. Why surfaces?Higher order primitives • Animation • Level of Detail • Bandwidth • Filtering

  3. The “Surfaces” Roadmap • Polynomial Surfaces • B-Spline, Bézier • Tensor product, Triangle • Subdivision Surfaces • Catmull-Clark, Loop • Displacement Mapping Massive Levels of Geometric Detail

  4. T&L Created A Major Content Shift... CPU Graphics Processor Previous Generation 1 Frame (1/60 sec) AI, Physics, Game Play Transform & Lighting Rendering Current Generation 1 Frame (1/60 sec) Graphics Processor CPU

  5. AI, Physics, Game Play Geometry Processing Transform & Lighting Rendering Graphics Processor CPU A New Band of Computation

  6. ...Another Order of Magnitude k image courtesy of Pixar Animation Studios

  7. The GeForce3 Graphics Pipeline curved surfaces vertex shaders per-vertex geometry & shading programs setup rasterizer tex-addr ops shadow textures texture blending per-pixel shading frame-buffer antialiasing

  8. Historical Solution e.g. OpenGL Evaluators • Square - tensor product patches • Grid - just specify rows and columns • Integer - number of segments • Share - use T&L hardware

  9. Square Grid Integer Share Triangular Patches are Necessary Hardware emulation 3DStudio Max Patch outlines

  10. Square Grid Integer Share Four Independent Tessellation Factors

  11. Square Grid Integer Share Generalized Tessellation is Important

  12. Square Grid Integer Share Fractional Number of Segments 6.0 6.25 6.5 6.75 7.0

  13. Square Grid Integer Share LOD Morphing Suppresses Visual Artifacts

  14. Square Grid Integer Share Multiple Tessellation Styles Morphing Tessellation Optimal Tessellation

  15. Square Grid Integer Share Dedicated Hardware • Doesn’t slow down transform • Performance matched pipeline • Most efficient way to draw triangles • Bandwidth • CPU – light weight animation • Transform & Lighting – great vertex reuse

  16. Setting Tessellation Factorsedge based – (patch soup) • Crack prevention • Tessellation factors must be specified consistently for shared edges. • Data structures or - • Tessellation factors must be based on shared information, patch edges. • Criteria • Curvature • Screen space • Transform the control hull edge (Bézier) • Silhouettes • Shared surface normals

  17. How to Get Started? • Modeling • Polynomial Patches – quadrilateral and triangular • DX8 • Bézier, B-spline, & Catmull-Rom spline patches • OpenGL • Bézier patches – rational • NO Trimmed NURBS • Use exporters - • Maya, 3DStudio

  18. DX8 Interface • Surface representation • Bézier • B-spline • Catmull-Rom • Shape (domains) • Quadrilateral • Triangular • Constraints • Uniform degree Bézier Catmull-Rom B-spline

  19. DX8 Entry Points • DrawRectPatch & DrawTriPatch • Specify and draw triangular/rectangular patches • DeletePatch • Free cached patches • SetRenderState • D3DPATCHEDGESTYLE • Discrete - integer • Continuous – fractional • CAPS • D3DDEVCAPS_RTPATCHES • D3DDEVCAPS_QUINTICRTPATCHES

  20. OpenGL Interface • Surface representation • Bézier • Shape (domains) • Quadrilateral • Triangular

  21. OpenGL Entry Points • MapControlPointsNV • EVAL_2D_NV or EVAL_TRIANGULAR_2D_NV • Specify the control points for the vertex component • MapParameterivNV & MapParameterfvNV • MAP_TESSELLATION_NV • Specify the tessellation factors for the patch • EvalMapsNV • Tessellate (render) the patch, sending vertices, forming triangles to T&L

  22. Tips & TechniquesDos & Don’ts • Level of detail calculation • Memory footprint • Performance • Mixing with meshes • Continuity • Tangents, normals & bi-normals • Skinning and blending

  23. Level of Detail Calculation screen space edge length • By patch – significant foreshortening • Transform to screen space • Compute control hull length • Divide by desired edge length • By object – little foreshortening • Beforehand • Compute boundary lengths in model space • Each frame (or so) • Transform Bbox or proxy to screen space • Compute size • Scale relative lengths computed off-line

  24. Variable vs. Fixed LOD by Object 6,326 triangles 24,794 triangles

  25. Memory Footprint • With tessellation factors A,B,C,D • min(max(A,C), max(B,D))order + 3order + slop • Roughly 2x for fractional tessellation • Equivalent triangle mesh • max(A,C)  max(B,D) + min(A,C) + min(B,D) + 1 • Comparison – bi-cubic • Assume A=B=C=D • 4A + 16 vs. A^2 + 2A + 1

  26. Performance - Hardware • One “clock” per degree • Bi-cubic position 3 • Two partial derivatives 5 • Two linearly varying textures 2 total 10 clocks

  27. Performance – Software • Change nothing • time to transfer data • Change tessellation (LOD) • order^3 multiplies (matrix mult) + order (order-1) adds • Change geometry • + order^3 multiplies (matrix mult) • Similar to your costs…

  28. Mixing with Meshes • Integer tessellation • Use tessellation factor of one • Use patch normal • Fractional tessellation • Always splits once… • Use tessellation factor of two • Calculate boundary mid point using subdivision • Use patch normal

  29. Tangents, Normals & Bi-Normals • Autonormal – Standard T&L • Driver does the work for you… • Only use with standard T&L • Manual – Vertex Shader • Compute tangents (partial derivatives) • Compute normal (cross product) in Shader • Partials are simple! • Subtract rows and/or columns of control points • Triangles too

  30. Partial Derivatives

  31. Skinning & Blending • Modify control points on the CPU • Simple • Recalculate patch every change (frame?) • Activate union of matrices • For each patch take union of matrices • Interpolate weights using a patch or patches

  32. Continuity • Affected region • Control points neighboring boundary • Complications • Some control points are incident to two boundaries • Solution • Project onto a plane at the corner

  33. Demos - Animation

  34. Demos – LOD morphing

  35. Examples!

  36. Examples…

  37. Questions, comments, feedback • www.nvidia.com/developer

More Related