Download presentation
Presentation is loading. Please wait.
Published byGriffin Moore Modified over 9 years ago
1
Geometry Clipmaps: Terrain Rendering Using Nested Regular 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 arbitra rily size in a finite amount of physical memory for rendering at real-time rat es.
3
Terrain Rendering Challenges: Concise storage (no paging hiccups) Fast rendering (60 frames/sec) Visual continuity (no pops) U.S. at 30m spacing 216,000 93,600 grid 40GB 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
LOD based on viewer distance, not data. Simplicity of regular grids Which caches the terrain in a set of nested regular grids centered abo ut the viewer. [ Hoppe et al, 2004]
9
Process Terrain as an Image Mipmap [Williams 1983] Clipmap [Tanner et al 1998] finest level coarsest level spatially
10
Differences from Texture Clipmaps [Tanner 1998] 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 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 t hat 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
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) Desired active region : square
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) ng l 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 v iew 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 finest level coarsest level
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 60MΔ/sec 255x255 grid 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, z c ),
25
Transition regions for visual continuity : continuous coordinates of the viewpoint in the grid of clip_region(l) : integer extents of active_region(l) Each vertex : (x, y, z, z c ), z c : terrain height in the next-coarser level l-1 =
26
Transition regions for visual continuity Through experimentation,we found that a transition wi dth 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 gaps resolution discontinuities
28
Transition Regions Vertex shader blend z, z c Pixel shader blend textures
29
Eliminating T-junctions Numerical imprecision dropped pixels Simple solution: render zero-area triangles Degenerate triangles
30
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. View-frustum Culling
31
3x speedup
32
Terrain Compression Both are computed incrementally at 60 frames/sec DecompressedSynthesized
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: T l-1 = D (T l ) Find optimal D on training data: min D || T l – U (D (T l ) ) || Compress coarse-to-fine: Upsample and compute inter-level residual R l = T l – U(T l-1 ) Compress residual R l = compress(R l ) Replace approximation T l U(T l-1 ) + R l TlTlTlTl T l-1
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 T l = U(T l-1 ) + noise precomputed 50x50 noise texture
37
Importance of Letting U be C 1 bilinear interpolant (non-C 1 ) 16-point interpolant (C 1 )
38
Update Rate
39
Compression Error Puget Sound dataset( 普及灣 ) 537 MB to 8.5 MB rms error : 1.0m (PSNR=20log 10 (z max /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 e l (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.9 th percentile error,we see that it is also still smaller than a pixel.
43
Space Requirement
44
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
報告完畢
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.