40
Levels of Detail Levels of Detail COMP 770 COMP 770 3/25/09 3/25/09

Levels of Detail

Embed Size (px)

DESCRIPTION

Levels of Detail. COMP 770 3/25/09. Problem. Models can be very detailed Look great when close up Last week we explored one way of attacking this problem. 13M Triangles. 1M Triangles. 8M Elevation Points. Problem. Q: Why else might we want to reduce the working set size?. - PowerPoint PPT Presentation

Citation preview

Levels of DetailLevels of Detail

COMP 770COMP 770

3/25/093/25/09

ProblemProblem

Models can be very detailedModels can be very detailed

Look great when close upLook great when close upLast week we explored one way of Last week we explored one way of attacking this problemattacking this problem

13M Triangles8M Elevation Points1M Triangles

ProblemProblem

Even after visibility culling we can have too many Even after visibility culling we can have too many visible trianglesvisible triangles

Won’t this problem go away with faster GPUs?Won’t this problem go away with faster GPUs?– The real world has virtually infinite complexityThe real world has virtually infinite complexity– Our ability to model and capture this complexity Our ability to model and capture this complexity

outpaces rendering performanceoutpaces rendering performance

270M Elevation Points

82M Triangles

100M Triangles

372M Triangles

Q: Why else might we want to reduce the working set size?

Levels of DetailLevels of Detail

Basic Idea: Render using fewer triangles Basic Idea: Render using fewer triangles when model is farther from viewerwhen model is farther from viewer

Methods:Methods:– Multi-resolution modelingMulti-resolution modeling

RemeshingRemeshing

Parametric SurfacesParametric Surfaces

Subdivision SurfacesSubdivision Surfaces

– Polygonal SimplificationPolygonal Simplification– Image ImpostorsImage Impostors

LOD HierarchyLOD Hierarchy

[Clark76] First LOD paper[Clark76] First LOD paper– Replace each object in the scene graph with a Replace each object in the scene graph with a

hierarchy of objects at differing resolutionshierarchy of objects at differing resolutions– Select LOD based on size of screen-space Select LOD based on size of screen-space

projectionprojection

Integrates VFC with LOD searchIntegrates VFC with LOD searchSupports out-of-core renderingSupports out-of-core renderingMost LOD systems today are based on Most LOD systems today are based on this basic conceptthis basic concept

Polygonal SimplificationPolygonal Simplification

Method for reducing the polygon count of meshMethod for reducing the polygon count of meshLocal Operators:Local Operators:– Vertex ClusteringVertex Clustering– Vertex RemovalVertex Removal– Edge CollapseEdge Collapse– Triangle CollapseTriangle Collapse

Global Operators:Global Operators:– Low-Pass FilteringLow-Pass Filtering– Morphological OperatorsMorphological Operators– Alpha-HullAlpha-Hull

Vertex ClusteringVertex Clustering

[Rossignac & Borrel 93][Rossignac & Borrel 93]Weight vertices by:Weight vertices by:– Inverse of max angle between edges (why?)Inverse of max angle between edges (why?)– Size of largest adjacent face (why?)Size of largest adjacent face (why?)

Impose a grid on the modelImpose a grid on the modelCompute weighted average vertex in each cellCompute weighted average vertex in each cellTriangles become:Triangles become:– TrianglesTriangles– LinesLines– PointsPoints

Keep the unique primitivesKeep the unique primitives

Vertex ClusteringVertex Clustering

How do we create a set How do we create a set of LODs?of LODs?

What are the limitations What are the limitations on this method?on this method?

Main Benefits:Main Benefits:

– Hard to target a polygon countHard to target a polygon count

– Poor error controlPoor error control

– Not invariant to rotation or Not invariant to rotation or translationtranslation

– Mixed primitive typesMixed primitive types

– SimpleSimple

– RobustRobust

Vertex ClusteringVertex Clustering

[Low & Tan 97][Low & Tan 97]

Improve on R&B in a several ways Improve on R&B in a several ways including:including:– Floating-cell clusteringFloating-cell clustering– Improved angle weight [draw it]Improved angle weight [draw it]– Rendering using thick linesRendering using thick lines

Vertex RemovalVertex Removal

[Schroeder et al. 92][Schroeder et al. 92]

Designed for Marching Cubes OutputDesigned for Marching Cubes Output

Remove a triangle and re-triangulate Remove a triangle and re-triangulate holehole

Ignores non-manifold verticesIgnores non-manifold vertices

Properties:Properties:– Preserves topologyPreserves topology– Uses original verticesUses original vertices– LinearLinear

Edge CollapseEdge Collapse

Introduced by [Hoppe93]Introduced by [Hoppe93]

Variation: Half-Edge CollapseVariation: Half-Edge Collapse

a b c

edge collapse

vertex split

FoldoversFoldovers

Collapsing an edge can flip a faceCollapsing an edge can flip a face

a bc

edge collapse

vertex split

Virtual Edge CollapseVirtual Edge Collapse

Extension of edge collapse to two vertices Extension of edge collapse to two vertices not connected by an edgenot connected by an edge

Allows topological simplificationAllows topological simplification

Also known as vertex-pair collapseAlso known as vertex-pair collapse

Usually limited to small distance to avoid Usually limited to small distance to avoid O(nO(n22) virtual edges) virtual edges

Edge CollapseEdge Collapse

Allows geomorphsAllows geomorphs

Fine-grained: 2 triangles removed for Fine-grained: 2 triangles removed for manifold casemanifold case

Topology preservingTopology preserving

Half-edge collapse preserves vertex setHalf-edge collapse preserves vertex set

Low-Pass FilteringLow-Pass Filtering

[He et al. 96][He et al. 96]

Convert polygon mesh to volumetric Convert polygon mesh to volumetric representationrepresentation

Apply low-pass filter to volumetric dataApply low-pass filter to volumetric data

Reconstruct the mesh using marching Reconstruct the mesh using marching cubescubes

Morphological OperatorsMorphological Operators

[Nooruddin99][Nooruddin99]

Convert polygon mesh to volumetric Convert polygon mesh to volumetric representationrepresentation

Apply dilation operator followed by erosion Apply dilation operator followed by erosion operator operator

Reconstruct with marching cubesReconstruct with marching cubes

Apply polygonal simplifcationApply polygonal simplifcation

Topological Simplification Using Topological Simplification Using Alpha-HullsAlpha-Hulls

[El-Sana and Varshney 98][El-Sana and Varshney 98]

Definition:Definition:– Set of points PSet of points P– Spherical ball b with radius alphaSpherical ball b with radius alpha– If b is placed such that it does not intersect P If b is placed such that it does not intersect P

it is emptyit is empty– The alpha-hull is the complement of empty The alpha-hull is the complement of empty

ballsballs

Topological Simplification Using Topological Simplification Using Alpha-HullsAlpha-Hulls

Intuitively, we roll a ball around the points to Intuitively, we roll a ball around the points to define the new surfacedefine the new surface

If the ball does not fit into a concavity it is filledIf the ball does not fit into a concavity it is filled

If the ball does not fit in to a hole it is closedIf the ball does not fit in to a hole it is closed

If the ball does not fit between two objects it is If the ball does not fit between two objects it is closedclosed

What if alpha=0?What if alpha=0?

What if alpha=infinity?What if alpha=infinity?

Show paper imagesShow paper images

Discrete LODDiscrete LOD

Use local or global operators to compute a set of Use local or global operators to compute a set of LOD meshesLOD meshes

At runtime select an LOD mesh and render itAt runtime select an LOD mesh and render it

Possible Criteria:Possible Criteria:– Distance to userDistance to user– Fraction visibleFraction visible– EccentricityEccentricity– Visual ImportanceVisual Importance

Extension: HLODS [Erikson01]Extension: HLODS [Erikson01]

Continuous LODContinuous LOD

Progressive Meshes [Hoppe96]Progressive Meshes [Hoppe96]Iteratively decimate a mesh using edge Iteratively decimate a mesh using edge collapse operatorcollapse operatorStore the inverse vertex split for each Store the inverse vertex split for each collapsecollapseThe most simplified mesh (base mesh) The most simplified mesh (base mesh) and vsplit records form the progressive and vsplit records form the progressive mesh:mesh:

MM00→M→M1 1 →… → M→… → Mnn

Continuous LODContinuous LOD

Rather than a few discrete LODs we have Rather than a few discrete LODs we have a full rangea full range

Vertex split does not require much storageVertex split does not require much storage

Can geomorph between LODsCan geomorph between LODs

Show videoShow video

View-Dependent LODView-Dependent LOD

So far we have:So far we have:– Discrete LOD: fixed models at various Discrete LOD: fixed models at various

fidelitiesfidelities– Continuous LOD: a progression of meshes Continuous LOD: a progression of meshes

from coarse to finefrom coarse to fine

Consider a case like this:Consider a case like this:

View-Dependent LODView-Dependent LOD

Create an LOD representation at runtime Create an LOD representation at runtime according to view-parametersaccording to view-parameters

What view-dependent criteria can we use?What view-dependent criteria can we use?More detail close to the viewerMore detail close to the viewerPreserve the silhouette of the objectPreserve the silhouette of the objectPreserve specular highlightsPreserve specular highlightsAggressively simplify the backfacesAggressively simplify the backfaces

View-Dependent LODView-Dependent LOD

Organize the simplification operations as a Organize the simplification operations as a hierarchyhierarchyCompute a front in the hierarchyCompute a front in the hierarchyUse temporal coherenceUse temporal coherence[Luebke&Erikson97] use octree clustering[Luebke&Erikson97] use octree clustering[Hoppe96] uses edge collapse[Hoppe96] uses edge collapseShow videoShow video

Figure 7. A vertex tree. The blue line represents the boundary. The greenportion of the tree are the unfolded nodes above the boundary. The yellowportion of the tree represents the folded nodes below the boundary.

View-Dependent LODView-Dependent LOD

View-Dependent LOD has fidelity View-Dependent LOD has fidelity advantages but not generally used.advantages but not generally used.

Why?Why?

– Expensive to traverse hierarchy frontExpensive to traverse hierarchy front– Dynamically generated geometry difficult to Dynamically generated geometry difficult to

render optimallyrender optimally

CHPMCHPM

[Yoon et al. 2004][Yoon et al. 2004]

Addresses problems of vertex hierarchyAddresses problems of vertex hierarchy

Same framework used for LOD collision detectionSame framework used for LOD collision detection

CHPMCHPM

Video:Video:– http://gamma.cs.unc.edu/QVDRhttp://gamma.cs.unc.edu/QVDR

Collision:Collision:– http://gamma.cs.unc.edu/MRChttp://gamma.cs.unc.edu/MRC

Simplification ErrorSimplification Error

Why measure error?Why measure error?– Better quality LODBetter quality LOD– Know the quality of the LODKnow the quality of the LOD

Usually, we want to measure appearanceUsually, we want to measure appearanceGenerally, we use a geometric measure as a proxyGenerally, we use a geometric measure as a proxyError measures are used in three ways:Error measures are used in three ways:– To pick which operation to performTo pick which operation to perform– To determine resulting surface from an operation (e.g. position To determine resulting surface from an operation (e.g. position

of replacement vertex)of replacement vertex)– To pick an LOD at runtimeTo pick an LOD at runtime

Two common LOD selection criteria:Two common LOD selection criteria:– Target framerateTarget framerate– Target qualityTarget quality

Hausdorff DistanceHausdorff Distance

A measure of surface deviationA measure of surface deviation

h(A,B)=maxh(A,B)=maxaaminminbb(|a-b|)(|a-b|)

H(A,B)=max(h(a,b),h(b,a))H(A,B)=max(h(a,b),h(b,a))

h is sometimes called the one-h is sometimes called the one-sided Hausdorff distancesided Hausdorff distance

Provides a bound on the Provides a bound on the maximum possible errormaximum possible error

Project to screen space to get Project to screen space to get deviation in pixelsdeviation in pixels

A B

Vertex Plane DistanceVertex Plane Distance

[Ranford 96][Ranford 96]

One metric is the max distance between One metric is the max distance between the vertex and the planes of the supported the vertex and the planes of the supported trianglestriangles E=maxE=maxpp(p(p••v)v)

ab

v

Quadric Error MetricQuadric Error Metric

[Garland & Heckbert 97][Garland & Heckbert 97]Use sum of squared distance rather than Use sum of squared distance rather than max distancemax distanceE=E=(p(p•v)•v)22= = (v(vTTp) (pp) (pTTv)=vv)=vTT[[(p p(p pTT)]v)]v

= v= vTT[[QQpp]v = v]v = vTTQvQv

Additional plane can be incorporated by a Additional plane can be incorporated by a 4x4 matrix addition4x4 matrix additionCost to compute the error given a quadric Cost to compute the error given a quadric and vertex is constantand vertex is constant

AttributesAttributes

Vertices have more than just position:Vertices have more than just position:– ColorsColors– NormalsNormals– Texture CoordsTexture Coords– And now varying input to programsAnd now varying input to programs

Vertices may lie at a discontinuityVertices may lie at a discontinuity– Different TexturesDifferent Textures– Different Material PropertiesDifferent Material Properties– Different ShadersDifferent Shaders

AttributesAttributes

[Hoppe98] introduces the idea of [Hoppe98] introduces the idea of wedgeswedges

Wedges separate discrete attributes at a Wedges separate discrete attributes at a vertexvertex

A wedge disappears when all its triangles A wedge disappears when all its triangles collapsecollapse

AttributesAttributes

Earlier algorithms ignored attributes or simply Earlier algorithms ignored attributes or simply propagated their valuespropagated their valuesCan simply use the same metric as for position:Can simply use the same metric as for position:– Normals in Euclidean spaceNormals in Euclidean space– Colors in RGB spaceColors in RGB space

Better:Better:– Normals in spherical domainNormals in spherical domain– Colors in a perceptually linear color spaceColors in a perceptually linear color space

Generally total error is a weighted sum of Generally total error is a weighted sum of position and attribute errorsposition and attribute errors

Normal conesNormal cones

[Luebke & Erikson 97][Luebke & Erikson 97]

Used in view-dependent LOD to determine Used in view-dependent LOD to determine likelihood that a vertex represents the likelihood that a vertex represents the silhouette or be at a specular highlightsilhouette or be at a specular highlight

cluster

GAPSGAPS

[Erikson99][Erikson99]

Uses a threshold distance Uses a threshold distance ττ

Vertex pairs within distance Vertex pairs within distance ττ are are candidatescandidates

ττ grows over simplification process grows over simplification process

Allows topological simplification at all Allows topological simplification at all scalesscales

Image Driven SimplificationImage Driven Simplification

Render the object from a sampling of Render the object from a sampling of view-pointsview-points

Measure error as RMS of pixelsMeasure error as RMS of pixels

Only redraw relevant trianglesOnly redraw relevant triangles

Benefits?Benefits?

Drawbacks?Drawbacks?

Simplification EnvelopesSimplification Envelopes

Compute interior and Compute interior and exterior offset surfaces exterior offset surfaces at distance at distance εε

Remove vertices and Remove vertices and retriangulate if new retriangulate if new surface does not surface does not intersect envelopesintersect envelopes

Limitations?Limitations?

Other Forms of LODOther Forms of LOD

Image impostorsImage impostors– Warping (e.g. [Rafferty98])Warping (e.g. [Rafferty98])– Texture Depth Meshes (e.g. [Aliaga99])Texture Depth Meshes (e.g. [Aliaga99])

Shader LODShader LOD– Number of shadersNumber of shaders– Number of texturesNumber of textures

Simulation LODSimulation LOD– Time stepsTime steps– Simulation resolutionSimulation resolution– Number of particlesNumber of particles

LightingLighting– Number and type of lights usedNumber and type of lights used

ResourcesResources

LOD Book: Luebke et al.LOD Book: Luebke et al.– www.lodbook.comwww.lodbook.com

Surveys:Surveys:– http://www.cs.cmu.edu/afs/cs/user/garland/www/http://www.cs.cmu.edu/afs/cs/user/garland/www/

multires/survey.htmlmultires/survey.html– http://www.cs.umd.edu/class/spring2005/cmsc828v/http://www.cs.umd.edu/class/spring2005/cmsc828v/

papers/surveyMINGLE.pdfpapers/surveyMINGLE.pdf– http://citeseer.ist.psu.edu/247479.htmlhttp://citeseer.ist.psu.edu/247479.html– http://www.cs.virginia.edu/~luebke/publications/pdf/http://www.cs.virginia.edu/~luebke/publications/pdf/

cg+a.2001.pdfcg+a.2001.pdf