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

Levels of Detail

  • Upload
    matteo

  • View
    35

  • Download
    2

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

Page 1: Levels of Detail

Levels of DetailLevels of Detail

COMP 770COMP 7703/25/093/25/09

Page 2: Levels of Detail

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

Page 3: Levels of Detail

ProblemProblem

Even after visibility culling we can have too many Even after visibility culling we can have too many visible trianglesvisible trianglesWon’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?

Page 4: Levels of Detail

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 viewerMethods:Methods:– Multi-resolution modelingMulti-resolution modeling

RemeshingRemeshingParametric SurfacesParametric SurfacesSubdivision SurfacesSubdivision Surfaces

– Polygonal SimplificationPolygonal Simplification– Image ImpostorsImage Impostors

Page 5: Levels of Detail

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

projectionprojectionIntegrates 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

Page 6: Levels of Detail

Polygonal SimplificationPolygonal SimplificationMethod 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 CollapseGlobal Operators:Global Operators:– Low-Pass FilteringLow-Pass Filtering– Morphological OperatorsMorphological Operators– Alpha-HullAlpha-Hull

Page 7: Levels of Detail

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– PointsPointsKeep the unique primitivesKeep the unique primitives

Page 8: Levels of Detail

Vertex ClusteringVertex ClusteringHow 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

Page 9: Levels of Detail

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

Page 10: Levels of Detail

Vertex RemovalVertex Removal

[Schroeder et al. 92][Schroeder et al. 92]Designed for Marching Cubes OutputDesigned for Marching Cubes OutputRemove a triangle and re-triangulate Remove a triangle and re-triangulate holeholeIgnores non-manifold verticesIgnores non-manifold verticesProperties:Properties:– Preserves topologyPreserves topology– Uses original verticesUses original vertices– LinearLinear

Page 11: Levels of Detail

Edge CollapseEdge Collapse

Introduced by [Hoppe93]Introduced by [Hoppe93]

Variation: Half-Edge CollapseVariation: Half-Edge Collapse

a b c

edge collapse

vertex split

Page 12: Levels of Detail

FoldoversFoldovers

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

a bc

edge collapse

vertex split

Page 13: Levels of Detail

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 edgeAllows topological simplificationAllows topological simplificationAlso known as vertex-pair collapseAlso known as vertex-pair collapseUsually limited to small distance to avoid Usually limited to small distance to avoid O(nO(n22) virtual edges) virtual edges

Page 14: Levels of Detail

Edge CollapseEdge Collapse

Allows geomorphsAllows geomorphsFine-grained: 2 triangles removed for Fine-grained: 2 triangles removed for manifold casemanifold caseTopology preservingTopology preservingHalf-edge collapse preserves vertex setHalf-edge collapse preserves vertex set

Page 15: Levels of Detail

Low-Pass FilteringLow-Pass Filtering

[He et al. 96][He et al. 96]Convert polygon mesh to volumetric Convert polygon mesh to volumetric representationrepresentationApply low-pass filter to volumetric dataApply low-pass filter to volumetric dataReconstruct the mesh using marching Reconstruct the mesh using marching cubescubes

Page 16: Levels of Detail

Morphological OperatorsMorphological Operators

[Nooruddin99][Nooruddin99]Convert polygon mesh to volumetric Convert polygon mesh to volumetric representationrepresentationApply dilation operator followed by erosion Apply dilation operator followed by erosion operator operator Reconstruct with marching cubesReconstruct with marching cubesApply polygonal simplifcationApply polygonal simplifcation

Page 17: Levels of Detail

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

Page 18: Levels of Detail

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 surfaceIf the ball does not fit into a concavity it is filledIf the ball does not fit into a concavity it is filledIf the ball does not fit in to a hole it is closedIf the ball does not fit in to a hole it is closedIf the ball does not fit between two objects it is If the ball does not fit between two objects it is closedclosedWhat if alpha=0?What if alpha=0?What if alpha=infinity?What if alpha=infinity?Show paper imagesShow paper images

Page 19: Levels of Detail

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 meshesAt runtime select an LOD mesh and render itAt runtime select an LOD mesh and render itPossible Criteria:Possible Criteria:– Distance to userDistance to user– Fraction visibleFraction visible– EccentricityEccentricity– Visual ImportanceVisual Importance

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

Page 20: Levels of Detail

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

Page 21: Levels of Detail

Continuous LODContinuous LOD

Rather than a few discrete LODs we have Rather than a few discrete LODs we have a full rangea full rangeVertex split does not require much storageVertex split does not require much storageCan geomorph between LODsCan geomorph between LODsShow videoShow video

Page 22: Levels of Detail

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:

Page 23: Levels of Detail

View-Dependent LODView-Dependent LOD

Create an LOD representation at runtime Create an LOD representation at runtime according to view-parametersaccording to view-parametersWhat 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

Page 24: Levels of Detail

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.

Page 25: Levels of Detail

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

Page 26: Levels of Detail

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

Page 27: Levels of Detail

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

Page 28: Levels of Detail

Simplification ErrorSimplification ErrorWhy 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

Page 29: Levels of Detail

Hausdorff DistanceHausdorff Distance

A measure of surface deviationA measure of surface deviationh(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 distanceProvides a bound on the Provides a bound on the maximum possible errormaximum possible errorProject to screen space to get Project to screen space to get deviation in pixelsdeviation in pixels

A B

Page 30: Levels of Detail

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

Page 31: Levels of Detail

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 = vTTQvQvAdditional 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

Page 32: Levels of Detail

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 programsVertices may lie at a discontinuityVertices may lie at a discontinuity– Different TexturesDifferent Textures– Different Material PropertiesDifferent Material Properties– Different ShadersDifferent Shaders

Page 33: Levels of Detail

AttributesAttributes

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

Wedges separate discrete attributes at a Wedges separate discrete attributes at a vertexvertexA wedge disappears when all its triangles A wedge disappears when all its triangles collapsecollapse

Page 34: Levels of Detail

AttributesAttributesEarlier 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 spaceBetter:Better:– Normals in spherical domainNormals in spherical domain– Colors in a perceptually linear color spaceColors in a perceptually linear color spaceGenerally total error is a weighted sum of Generally total error is a weighted sum of position and attribute errorsposition and attribute errors

Page 35: Levels of Detail

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

Page 36: Levels of Detail

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 processAllows topological simplification at all Allows topological simplification at all scalesscales

Page 37: Levels of Detail

Image Driven SimplificationImage Driven Simplification

Render the object from a sampling of Render the object from a sampling of view-pointsview-pointsMeasure error as RMS of pixelsMeasure error as RMS of pixelsOnly redraw relevant trianglesOnly redraw relevant trianglesBenefits?Benefits?Drawbacks?Drawbacks?

Page 38: Levels of Detail

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 envelopesLimitations?Limitations?

Page 39: Levels of Detail

Other Forms of LODOther Forms of LODImage 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

Page 40: Levels of Detail

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