Terrain 2001 11 27 Korea University Graphics Laboratory
Terrain 2001. 11. 27 김성남 Korea University Graphics Laboratory 1
Contents • Terrain Rendering Overview • What is DEM? • Lindstrom’s Algorithm – Block-Based Simplification – Vertex Dependencies • Other Issues – Memory Menagement • Summary Korea University Graphics Laboratory 2
Overview(1/3) • 응용분야 – Flight Simulator – Multi player 3 D network game Prince of Darkness(PM of Hoppe) Tribes(Lindstrom algorithm) Korea University Graphics Laboratory 3
Overview(2/3) • Terrain Data representation – TIN(Triangulated Irregular Network) – DEM(Digital Elevation Model) or Height Field TIN(x, y, z) DEM(x, y, h(x, y)) Korea University Graphics Laboratory 4
What is DEM? • Height Field – 높이 값만을 저장하고 있는 2차원 배열 – 배열의 Index가 x, y 좌표로 사용 – LOD 적용 용이 30 20 z 15 25 10 18 15 15 x y 7 15 30 25 20 10 15 18 15 7 Korea University Graphics Laboratory 6
Lindstrom’s Algorithm • Bottom-up LOD – Block-Based Simplification – Vertex Dependencies Korea University Graphics Laboratory 7
Quadtree • DEM Quadtree – 3 X 3 vertex들로 이루어진 영역 : Block – Level K block은 level K+1의 4개 Block을 자식으로 가짐 Level 1 Level 2 Level 3 low high Resolution Level high low Korea University Graphics Laboratory 8
Vertex-Based Simplification • 제거 후보 vertex – Corner vetex를 제외한 block내 5개의 vertex • 불필요한 vertex 제거 – 한 쌍(triangle, co-triangle)이 하나로 합쳐짐: base vertex 제거 Base vertex (Triangle, co-triangle) pair – Recursively !! Korea University Graphics Laboratory 9
Error Metric(1/5) • vertex 간략화(제거) 기준 – vertex 간략화를 통해 발생한 error가 어떤 임계치 τ 보다 작으면 vertex 제거 z C y x E B A Korea University Graphics Laboratory 10
Error Metric(2/5) • δ 선분의 중점 v가 눈 좌표계의 z축 상에 있다고 가정 d C e(view point) Eye coordinates E v+ v A Projection plane v. B Korea University Graphics Laboratory 11
Error Metric(3/5) • View matrix Korea University Graphics Laboratory 12
Error Metric(4/5) • Screen 에서 계산된 δ λ : world coordinates 단위 길이가 screen에서 차지하는 pixel 수 Korea University Graphics Laboratory 13
Error Metric(5/5) • δscreen을 τ 와 비교 • 속도 향상을 위해 제곱값 비교 Korea University Graphics Laboratory 14
Block-Based Simplification(1/2) • 모든 vertex에 대해 δscreen을 계산 – DEM 간략화를 수행하면 계산량이 방대해짐 • Block 내의 5개의 vertex를 한번에 제거 가능여부 검사 • 인접한 4개 block이 블록 간략화가 된다면 higher level로 이전 Korea University Graphics Laboratory 15
Crack • Quadtree의 인접영역에서 vertex 불일치 발생 Crack 생성 Block 간략화 결과 crack Vertex 간략화 결과 Korea University Graphics Laboratory 17
Vertex Dependencies(2/3) • Vertex dependencies 는 에 종속 ( depend on ) • 어떤 vertex가 제거되지 않는다고 결정되면, 그 vertex가 종속되 는 vertex가 반드시 존재 Korea University Graphics Laboratory 19
Vertex Dependencies(3/3) • Forced split – Vertex dependencies를 이용한 crack 제거 – Refinement 될 필요가 없는 추가적인 triangles 생성 Korea University Graphics Laboratory 20
Block Rendering • Binary tree 개념을 이용한 rendering • Triangle strip을 이용한 rendering Korea University Graphics Laboratory 21
Other Issues • Terrain Pages – To minimize memory usage, apply unsigned short type for height and queue indices – 광대한 지형을 한꺼번에 memory에 load할 수 없으므로, 효 율적으로 memory에 load, computation할 수 있는 적당한 크 기의 Terrain pages 생성 – View 이동에 따라 page in and out, crack 방지 • Memory Management – Height field를 제외하고, 가능한 한 많은 부분(texture coordinates , etc)을 pages간에 공유 – 현재 지형 모델에서 가장 많이 연구되고 있는 분야 Korea University Graphics Laboratory 22
Lindstrom Demo Peter Lindstrom et al. , “Real-Time, Continuous Level of Detail Rendering of Height Field”, SIGGRAPH 96 Korea University Graphics Laboratory 23
Summary • DEM(Digital Elevation Model) • Lindstrom’s Algorithm(Bottom-up LOD) – Block-Based Simplification – Vertex Dependencies(No crack and Forced Split) • Memory Management Korea University Graphics Laboratory 24
- Slides: 24