higher order surfaces in opengl with nv_evaluators cass everitt [email protected]

15
Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt [email protected]

Upload: jemimah-york

Post on 29-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Higher Order Surfaces in OpenGL with NV_evaluators

Higher Order Surfaces in OpenGL with NV_evaluators

Cass Everitt

[email protected]

Page 2: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Why surfaces?Higher order primitives

Animation

Level of Detail

Bandwidth

Filtering

Page 3: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Overview

• What are the “general evaluators” defined NV_evaluators?

• How do they differ from standard OpenGL evaluators?

• Important new features• Per-edge tessellation control• Fractional tessellation• Support for all per-vertex attributes• Direct support for triangular patches

Page 4: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

What are the “general evaluators” defined by NV_evaluators?

• Like OpenGL evaluators, general evaluators can be used evaluate polynomial and rational bivariate functions defined relative to the Bezier basis

Page 5: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Why New Evaluators?

• OpenGL evaluators have not seen widespread use due to a variety of problems• Difficult to optimize

• spec too strict on order of evaluation

• Incomplete support for all vertex attributes (particularly multiple texture coordinates)

• Difficult to use with adaptive LOD (tessellation scheme too rigid)

Page 6: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Why New Evaluators? (2)

• General evaluators address these issues• Ease of optimization

• Support only 4-component maps

• Evaluate full range of all enabled maps at once

• Support all vertex attributes• Provide more flexible tessellation schemes

• Eases varying LOD on adjacent patches

• Provides mechanism for smooth LOD

• Direct support for triangular patches

Page 7: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Per-Edge Tessellation Specification

• Easy to vary the tessellation across a patch

• Easy to render adjacent patches without cracks• glMapParameterfvNV(GL_EVAL_2D_NV,

GL_MAP_TESSELLATION_NV, edge_tess_ptr);

Page 8: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Four Independent Tessellation Factors

Page 9: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Generalized Tessellation isImportant

Page 10: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Fractional Tessellation

• Not only is each edge’s tessellation independent, the tessellation does not have to be integral values!

• Enable smooth changes in LOD

Page 11: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Fractional Number of Segments

12.0

12.5

13.0

13.5

14.0

• Because of symmetry, edges always match if their control points and tessellation number are the same

Page 12: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Support for All Vertex Attributes• A map can be applied to any numeric vertex

attribute (0-15) with values as described below

attribute number

per-vertex Parameter

per-vertex Command

4 secondary color glSecondaryColorEXT5 Fog coordinate glFogCoordEXT8 Texture coord 0 glMultiTexCoord9 Texture coord 1 glMultiTexCoord10 Texture coord 2 glMultiTexCoord11 Texture coord 3 glMultiTexCoord

0 vertex position glVertex1 vertex weights glVertexWeightEXT2 normal glNormal3 Primary color glColor

14 Texture coord 6 glMultiTexCoord15 Texture coord 7 glMultiTexCoord

12 Texture coord 4 glMultiTexCoord13 Texture coord 5 glMultiTexCoord

Page 13: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Triangular Patches are Necessary

3DStudioMax

Patch outlines

Hardware emulation

Page 14: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Direct Support for Triangular Patches

• Triangular patches can be converted to regular patches, but NV_evaluators provides support directly

Page 15: Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt cass@nvidia.com

Questions, comments, feedback

• Cass Everitt, [email protected]

• www.nvidia.com/developer