1 / 46

Geometry Clipmaps: Terrain Rendering Using Nested Regular Grids

Geometry Clipmaps: Terrain Rendering Using Nested Regular Grids. Frank Losasso Stanford University Hugues Hoppe Microsoft Research [SIGGRAPH 2004]. What is a Clipmap?. [Tanner et al 1998] – Vi rt ual mipmap.

kasie
Download Presentation

Geometry Clipmaps: Terrain Rendering Using Nested Regular Grids

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Geometry Clipmaps:Terrain Rendering Using NestedRegular Grids Frank Losasso Stanford University Hugues Hoppe Microsoft Research [SIGGRAPH 2004]

  2. What is a Clipmap? [Tanner et al 1998] – Virtual mipmap A dynamic texture representation that efficiently caches textures of arbitrarily size in a finite amount of physical memory for rendering at real-time rates.

  3. Terrain Rendering U.S. at 30m spacing216,000  93,600 grid40GB • Challenges: • Concise storage (no paging hiccups) • Fast rendering (60 frames/sec) • Visual continuity (no pops) Mount Rainier Olympic Mountains

  4. Previous Work

  5. Previous Work: Irregular Mesh • Fewest triangles • CPU intensive View Dependent Progressive Mesh [Hoppe 1997],

  6. The Clipmap:A Virtual Mipmap Christopher C. et al(Silicon Graphics Computer Systems) in 1998.

  7. Geometry Clipmap

  8. Geometry Clipmap [ Hoppe et al, 2004] • LOD based on viewer distance, not data. • Simplicity of regular grids Which caches the terrain in a set of nested regular grids centered about the viewer.

  9. Process Terrain as an Image • Mipmap [Williams 1983] • Clipmap [Tanner et al 1998] coarsestlevel spatially finestlevel

  10. Texture clipmaps Caches available data LOD in screen-space Per pixel Distance from viewer Surface orientation Geometry clipmaps Determines rendered data LOD in world-space Nested rectangles Distance from viewer Differences from Texture Clipmaps [Tanner 1998] screen-space geometry  depends on geometry LOD

  11. Regions of a Geometry Clipmap • Clip region- The world extent of n*n grid of data stored at that level. • Active region- The extent we wish to render ,specifically a square of size n*n centered at the viewer.

  12. Regions of a Geometry Clipmap

  13. Computation of Desired Active Regions 1

  14. Computation of Desired Active Regions Desired active region :square • Average screen-space depth • about (0.4) • : approximate screen-space triangle size • W : window size • ϕ : field of view • Default • W = 640pixel • ϕ =90° • n =255 (good result)

  15. Computation of Desired Active Regions • When the view direction is not horizontal, the screen-space depth of render_region(l) is larger than the (0.4)ngl derived above,and therefore the screen-space triangle size becomes smaller than s. • If the view looks straight down from high above the terrain,triangle size is tiny and alising become evident. The solution is to disable the rendering of unnecessarily fine levels.

  16. Computation of Desired Active Regions • A drawback- The clipmap size n must grow as the field of view narrows. • Solution- We instead chose viewed-centered regions,because they let the view instantly rotate about the current viewpoint.

  17. Clipmap Update • Shift clipmap levels as user moves coarsestlevel finestlevel

  18. Geometry clipmap update • Toroidal acess We do not need to copy the old data when shifting a level.Instead,we simply fill the newly exposed “L-shaped” region. When the viewer moving fast,the processing needed to update all levels can become excessive. We update levels in coarse-to-fine order,stopping upon reaching a given processing budget. • Effect 1.The fast-moving(near-viewer)terrain loses its high- frequency detail. 2.Rendering load actually decreases as the viewer moves faster.

  19. Clipmap Update • For each level: • Fill exposed “L-shaped” region

  20. Clipmap Update • For each level: • Fill exposed “L-shaped” region • To avoid data shift, use toroidal access

  21. Toroidal access

  22. Rendering Each Level • Indexed triangle strips 255x255 grid 60MΔ/sec The render_region(l) is partitioned into 4 rectangular regions which are rendered using triangle strips. The maximum strip length is selected for optimal vertex caching. [Hoppe 1999]

  23. Rendering Each Level Basic rendering algorithm

  24. Transition regions for visual continuity • To both eliminate the gaps and provide temporal continuity,we morph the geometry near the outer boundary of each render_region(l) such that it transition to the geometry of the coarser level l-1. • Each vertex stores (x, y, z, zc),

  25. Transition regions for visual continuity • Each vertex : (x, y, z, zc), • zc : terrain height in the next-coarser level l-1 • :continuous coordinates of the viewpoint in the grid of clip_region(l) • : integer extents of active_region(l) =

  26. Transition regions for visual continuity • Through experimentation,we found that a transition width w of n/10 grid units works well. • If width is much smaller, The level boundaries become apparent. • If width is much larger, The fine detail is lost unnevessarily. • If the finer active_region(l+1) is too close, We compute w = min(n/10, min_width(l ) ), where min_width(l ) is known to be at least 2

  27. Need for Smooth Transitions No transition Geometry transition Geometry + Texture transition resolutiondiscontinuities  gaps 

  28. Transition Regions • Vertex shader • blend z, zc • Pixel shader • blend textures

  29. Eliminating T-junctions • Numerical imprecision  dropped pixels • Simple solution: render zero-area triangles Degenerate triangles

  30. View-frustum Culling • View-frustum Culling is used to reduce rendering loading. • Each 2D rectangular extent is extruded by the terrain bounds[Zmin,Zmax]to form an axis-aligned bounding box. • The axis-aligned rectangle bounding this set is used to crop the given rectangular region.

  31. View-frustum Culling 3x speedup

  32. Terrain Compression Decompressed Synthesized Both are computed incrementally at 60 frames/sec

  33. Terrain Compression • Height maps are remarkably coherent in practice, significantly more so than typical color images, and thus offer a huge opportunity for compression.

  34. Terrain Compression • Create mipmap fine-to-coarse: Tl-1 = D(Tl) Find optimal D on training data: minD || Tl –U(D(Tl)) || • Compress coarse-to-fine: • Upsample and compute inter-level residual Rl = Tl–U(Tl-1) • Compress residual Rl = compress(Rl) • Replace approximation TlU(Tl-1) + Rl Tl-1 Tl

  35. Compression result • U.S. height map • 30m spacing • 1m vertical resolution • 216,000 x 93,600 grid • Result: • 40GB 350MB (factor 100!) • rms error 1.8m (6% of sample spacing)

  36. Terrain Synthesis • Infinite extent & resolution“for free” • Upsample & add Gaussian noise Tl = U(Tl-1) + noise • precomputed 50x50 noise texture

  37. Importance of Letting U be C1 bilinear interpolant (non-C1) 16-point interpolant (C1)

  38. Update Rate

  39. Compression Error • Puget Sound dataset(普及灣) • 537 MB to 8.5 MB • rms error : • 1.0m (PSNR=20log10(zmax/rms)=72.6dB) • U.S. dataset • 40.4 GB to 355 MB • rms error : • 1.8m (PSNR=67.7dB)

  40. Screen-space LOD error • PL : piecewise linear mesh interpolant over the (x,y) domain This function is related to the (continuous) spectral density of the terrain signal. • :screen-space projection of error el(x,y) at location (x,y)

  41. Analysis of Screen-space Geometric Error (n=255, W=640, ϕ=90°, i.e. s=3). rms : Root-Mean-Square

  42. Analysis of Screen-space Geometric Error • We find- • The rms screen-space error is smaller than one pixel. • The max( ) error values is misleading,because the acquired terrain data contains mosaic misregistration artifacts that create artificial cliffs. • When examining the 99.9th percentile error,we see that it is also still smaller than a pixel.

  43. Space Requirement

  44. Space Requirement 375MB=355MB+11MB+3MB+6MB 355MB: The compressed terrain data 11MB: The geometry clip map 3MB: The replication of Z height value 6MB: The normal map

  45. Advantages of Geometry Clipmaps • Simplicity • Optimal throughput • Visual continuity • Steady rendering • Graceful degradation • Surface shading • Compression • Synthesis New

  46. 報告完畢

More Related