higher order surfaces n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Higher Order Surfaces PowerPoint Presentation
Download Presentation
Higher Order Surfaces

Loading in 2 Seconds...

play fullscreen
1 / 37

Higher Order Surfaces - PowerPoint PPT Presentation


  • 166 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Higher Order Surfaces' - sebastien-romano


Download Now 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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
why surfaces higher order primitives
Why surfaces?Higher order primitives
  • Animation
  • Level of Detail
  • Bandwidth
  • Filtering
the surfaces roadmap
The “Surfaces” Roadmap
  • Polynomial Surfaces
    • B-Spline, Bézier
    • Tensor product, Triangle
  • Subdivision Surfaces
    • Catmull-Clark, Loop
  • Displacement Mapping

Massive Levels of Geometric Detail

t l created a major content shift
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

a new band of computation

AI,

Physics,

Game Play

Geometry

Processing

Transform

& Lighting

Rendering

Graphics Processor

CPU

A New Band of Computation
another order of magnitude
...Another Order of Magnitude

k

image courtesy of Pixar Animation Studios

the geforce3 graphics pipeline
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

historical solution e g opengl evaluators
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
triangular patches are necessary

Square

Grid

Integer

Share

Triangular Patches are Necessary

Hardware emulation

3DStudio

Max

Patch outlines

fractional number of segments

Square

Grid

Integer

Share

Fractional Number of Segments

6.0

6.25

6.5

6.75

7.0

multiple tessellation styles

Square

Grid

Integer

Share

Multiple Tessellation Styles

Morphing Tessellation

Optimal Tessellation

dedicated hardware

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
setting tessellation factors edge based patch soup
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
how to get started
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
dx8 interface
DX8 Interface
  • Surface representation
    • Bézier
    • B-spline
    • Catmull-Rom
  • Shape (domains)
    • Quadrilateral
    • Triangular
  • Constraints
    • Uniform degree

Bézier

Catmull-Rom

B-spline

dx8 entry points
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
opengl interface
OpenGL Interface
  • Surface representation
    • Bézier
  • Shape (domains)
    • Quadrilateral
    • Triangular
opengl entry points
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
tips techniques dos don ts
Tips & TechniquesDos & Don’ts
  • Level of detail calculation
  • Memory footprint
  • Performance
  • Mixing with meshes
  • Continuity
  • Tangents, normals & bi-normals
  • Skinning and blending
level of detail calculation screen space edge length
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
variable vs fixed lod by object
Variable vs. Fixed LOD by Object

6,326 triangles

24,794 triangles

memory footprint
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
performance hardware
Performance - Hardware
  • One “clock” per degree
    • Bi-cubic position 3
    • Two partial derivatives 5
    • Two linearly varying textures 2

total 10 clocks

performance software
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…
mixing with meshes
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
tangents normals bi normals
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
skinning blending
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
continuity
Continuity
  • Affected region
    • Control points neighboring boundary
  • Complications
    • Some control points are incident to two boundaries
  • Solution
    • Project onto a plane at the corner
questions comments feedback
Questions, comments, feedback
  • www.nvidia.com/developer