Geometry Clipmaps: Terrain Rendering Using Nested Regular Grids Frank Losasso Stanford University...

Post on 27-Mar-2015

218 views 0 download

Tags:

Transcript of Geometry Clipmaps: Terrain Rendering Using Nested Regular Grids Frank Losasso Stanford University...

Geometry Clipmaps:Terrain Rendering Using Nested Regular Grids

Geometry Clipmaps:Terrain Rendering Using Nested Regular Grids

Frank LosassoStanford University

Frank LosassoStanford University

Hugues HoppeMicrosoft Research

Hugues HoppeMicrosoft Research

Terrain Rendering ChallengesTerrain Rendering Challenges

• Concise storage No paging hick-ups

• Real-Time frame rates 60 fps

• Visual continuity No temporal pops

• Concise storage No paging hick-ups

• Real-Time frame rates 60 fps

• Visual continuity No temporal pops

Mount Rainier

Olympic Mountains

Primary Dataset:United States at 30m spacing

20 Billion samples

Primary Dataset:United States at 30m spacing

20 Billion samples

Previous WorkPrevious Work

• Irregular Meshes (e.g. [Hoppe 98])

– Fewest polygons– Extremely CPU intensive

• Bin-trees (e.g. [Lindstrom et al 96])

– Simpler data structures / algorithms– Still CPU intensive

• Bin-tree Regions (e.g. [Cignoni et al 03])

– Precomputed regions Decreased CPU cost

– Temporal continuity difficult

• Irregular Meshes (e.g. [Hoppe 98])

– Fewest polygons– Extremely CPU intensive

• Bin-trees (e.g. [Lindstrom et al 96])

– Simpler data structures / algorithms– Still CPU intensive

• Bin-tree Regions (e.g. [Cignoni et al 03])

– Precomputed regions Decreased CPU cost

– Temporal continuity difficult

Previous WorkPrevious Work

• Texture Clipmaps [Tanner 1998]– ‘Infinitely’ large textures– Clipped mipmap hierarchy

• Modeling for the Plausible Emulation of Large Worlds [Dollins 2002]– Quadtree LOD around viewer– Terrain synthesis

• Texture Clipmaps [Tanner 1998]– ‘Infinitely’ large textures– Clipped mipmap hierarchy

• Modeling for the Plausible Emulation of Large Worlds [Dollins 2002]– Quadtree LOD around viewer– Terrain synthesis

Geometry ClipmapsGeometry Clipmaps

• Store data in uniform 2D grids

• Level-of-Detail from nesting of grids

• Refine based on distance

• Main Advantages– Simplicity – Compression– Synthesis

• Store data in uniform 2D grids

• Level-of-Detail from nesting of grids

• Refine based on distance

• Main Advantages– Simplicity – Compression– Synthesis

Terrain as a PyramidTerrain as a Pyramid

Coarsest Level

Finest Level

•Terrain as mipmap pyramid

•LOD using nested grids

•Terrain as mipmap pyramid

•LOD using nested grids

Puget SoundPuget Sound

Individual Clipmap LevelsIndividual Clipmap Levels

• Uniform 2D grid• Indexed triangle strip

– Efficient caching– 60 M triangles/second

• 255-by-255 grid

• Expected Soon:– Vertex Textures

• Uniform 2D grid• Indexed triangle strip

– Efficient caching– 60 M triangles/second

• 255-by-255 grid

• Expected Soon:– Vertex Textures

Inter-Level TransitionsInter-Level Transitions

• Between respective power-of-2 grids• Between respective power-of-2 grids

Inter-Level TransitionsInter-Level Transitions

No transitionNo transition Geometry transitionGeometry transition Geometry & texture transition

Geometry & texture transition

Gaps in geometryGaps in geometry Gaps in texturing/shadingGaps in texturing/shading

Inter-Level TransitionsInter-Level Transitions

• Vertex shader blend geometry

• Pixel shader blend textures– Both are inexpensive

• Vertex shader blend geometry

• Pixel shader blend textures– Both are inexpensive

Clipmap UpdateClipmap Update

• For each level– Calculate new clipmap region– Fill new L-shaped region– Use toroidal arrays for efficiency

• For each level– Calculate new clipmap region– Fill new L-shaped region– Use toroidal arrays for efficiency

Clipmap UpdateClipmap Update

• Update levels coarse-to-fine– Use limited update budget– Only render updated data

Fine levels may be cropped

Rendering load decreases as update load becomes to large for the budget

• Update levels coarse-to-fine– Use limited update budget– Only render updated data

Fine levels may be cropped

Rendering load decreases as update load becomes to large for the budget

‘Filling’ New Regions‘Filling’ New Regions

• Two Sources:– Computed on-demand at 60 frames/second

• Two Sources:– Computed on-demand at 60 frames/second

Decompressed explicit terrain

Decompressed explicit terrain

Synthesized new terrain

Synthesized new terrain

Clipmap UpdateClipmap Update

• Fine level from coarse level

• U is a 16 point C1 smooth interpolant

• For synthesized terrain, X = Gaussian noise• For explicit terrain, X = compression residual

• Fine level from coarse level

• U is a 16 point C1 smooth interpolant

• For synthesized terrain, X = Gaussian noise• For explicit terrain, X = compression residual

Terrain SynthesisTerrain Synthesis

• Adds high frequency detail

• Upsample then add Gaussian noise

– Precomputed 50-by-50 noise texture– Per-octave amplitude from real terrain

• Adds high frequency detail

• Upsample then add Gaussian noise

– Precomputed 50-by-50 noise texture– Per-octave amplitude from real terrain

Texture SynthesisTexture Synthesis

Subdivision InterpolantSubdivision Interpolant

Bilinear Interpolant (C0)Bilinear Interpolant (C0) 16-point Interpolant (C1)16-point Interpolant (C1)

Terrain CompressionTerrain Compression

• Create mipmap fine-to-coarse

• D found from data such that:

• Create mipmap fine-to-coarse

• D found from data such that:

Terrain CompressionTerrain Compression

• Calculate residuals coarse-to-fine– Upsample and compute

inter-level residual

– Quantize and compress residual

– Replace approximation Prevent error accumulation

• Calculate residuals coarse-to-fine– Upsample and compute

inter-level residual

– Quantize and compress residual

– Replace approximation Prevent error accumulation

Compression ResultsCompression Results

• U.S height map– 30m horizontal spacing– 1m vertical resolution– 216,000-by-93,600 grid– 40GB uncompressed

– 350MB compressed factor of over 100– rms error 1.8m (6% of sample spacing)

• U.S height map– 30m horizontal spacing– 1m vertical resolution– 216,000-by-93,600 grid– 40GB uncompressed

– 350MB compressed factor of over 100– rms error 1.8m (6% of sample spacing)

Compression ResultsCompression Results

LOD schemeNumber of samples

Runtime space

Bytes per sample

Hoppe [98] 8 M 50 MB 6.0

Lindstrom [02] 256 M 5.0 GB 19.5

Cignoni et al [02] 64 M 115 MB 1.8

Geometry Clipmaps 20 G 375 MB 0.02

Level-of-detail ErrorLevel-of-detail Error

• Analyzed statistically See paper

• For U.S. terrain (640-by-480 resolution)– rms error = 0.15 pixels– max error = 12 pixels– 99.9th percentile = 0.90 pixels

• Analyzed statistically See paper

• For U.S. terrain (640-by-480 resolution)– rms error = 0.15 pixels– max error = 12 pixels– 99.9th percentile = 0.90 pixels

United States of AmericaUnited States of America

Graphics Hardware FriendlyGraphics Hardware Friendly

• Can be implemented in hardware– Clipmap levels as high-precision textures– Subdivision and normal calculation [Losasso et al 03]

– Morphing already done in hardware– Noise from Noise() or from texture

• Uploaded on-demand– Decompressed terrain

• Can be implemented in hardware– Clipmap levels as high-precision textures– Subdivision and normal calculation [Losasso et al 03]

– Morphing already done in hardware– Noise from Noise() or from texture

• Uploaded on-demand– Decompressed terrain

LimitationsLimitations

• Statistical error analysis– Assumes bounded spectral density

• Unnecessarily many triangles– Assumes uniformly detailed terrain

but, allows for optimal rendering throughput

• Statistical error analysis– Assumes bounded spectral density

• Unnecessarily many triangles– Assumes uniformly detailed terrain

but, allows for optimal rendering throughput

AdvantagesAdvantages

• Simplicity

• Optimal rendering throughput

• Visual continuity

• Steady rendering

• Graceful degradation

• Compression

• Synthesis

• Simplicity

• Optimal rendering throughput

• Visual continuity

• Steady rendering

• Graceful degradation

• Compression

• Synthesis