KR100935886B1 - A method for terrain rendering based on a quadtree using graphics processing unit - Google Patents

A method for terrain rendering based on a quadtree using graphics processing unit Download PDF

Info

Publication number
KR100935886B1
KR100935886B1 KR1020090054960A KR20090054960A KR100935886B1 KR 100935886 B1 KR100935886 B1 KR 100935886B1 KR 1020090054960 A KR1020090054960 A KR 1020090054960A KR 20090054960 A KR20090054960 A KR 20090054960A KR 100935886 B1 KR100935886 B1 KR 100935886B1
Authority
KR
South Korea
Prior art keywords
block
tree
photo
level
value
Prior art date
Application number
KR1020090054960A
Other languages
Korean (ko)
Inventor
신병석
이은석
강동수
Original Assignee
인하대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 인하대학교 산학협력단 filed Critical 인하대학교 산학협력단
Priority to KR1020090054960A priority Critical patent/KR100935886B1/en
Application granted granted Critical
Publication of KR100935886B1 publication Critical patent/KR100935886B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/08Volume rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/80Shading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/005Tree description, e.g. octree, quadtree
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • G06T17/205Re-meshing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Remote Sensing (AREA)
  • Image Generation (AREA)

Abstract

PURPOSE: A terrain rendering method based on a quadtree using a graphic processing unit is provided to render a geographical model based on a quadtree using only a graphic processing unit by using a quadtree for terrain rendering in the rendering pipeline of graphics hardware. CONSTITUTION: A normal map for a quadtree texture which includes a surface roughness value and shading is generated. Nodes composed of topography are searched. Visible vertices are generated(S100). A patch for removing a crack is generated(S200). Geographical image rendering is performed by performing shading on the normal map(S300).

Description

그래픽스 처리 유닛을 이용한 사진트리 기반의 지형 렌더링 방법{A METHOD FOR TERRAIN RENDERING BASED ON A QUADTREE USING GRAPHICS PROCESSING UNIT}Photo-based terrain rendering method using graphics processing unit {A METHOD FOR TERRAIN RENDERING BASED ON A QUADTREE USING GRAPHICS PROCESSING UNIT}

본 발명은 지형 렌더링 방법에 관한 것으로서, 보다 구체적으로는 그래픽스 처리 유닛(Graphics Processing Unit, 이하 GPU)을 이용한 사진트리 기반의 지형 렌더링 방법에 관한 것이다.The present invention relates to a terrain rendering method, and more particularly, to a phototree-based terrain rendering method using a graphics processing unit (GPU).

지형 렌더링은 컴퓨터 게임이나 비행 시뮬레이션 등에서 사실적인 야외 장면을 표현하는데 많이 사용된다. 지형 렌더링에서는 거대한 입력 데이터를 다루기 때문에, 이와 동일한 해상도의 메시를 생성하면 대용량의 비디오 메모리(video memory)를 탑재한 최신 그래픽스 하드웨어에서조차도 처리하기 힘들다. 따라서 결과 영상의 화질을 적절히 유지하는 메시 간략화 기법들을 적용해야 한다.Terrain rendering is often used to represent realistic outdoor scenes in computer games and flight simulation. Because terrain rendering handles huge input data, creating meshes of the same resolution can be difficult to handle, even on modern graphics hardware with large amounts of video memory. Therefore, we need to apply the mesh simplification techniques to properly maintain the quality of the resulting image.

사진트리(quadtree)는 2차원 공간을 효율적으로 표현하는 계층 자료구조이다. 사진트리는 지형 렌더링에서 많이 사용되는 메시 간략화 기법인 연속 상세단계(Continuous level of detail) 기법과 시각절두체 선별 기법에 효과적이다. 사진트리는 고화질의 지형 영상을 실시간으로 생성할 수 있게 하지만, 그래픽스 하드 웨어의 렌더링 파이프라인에서는 vertex array나 텍스처 등 순차데이터(sequential data)만 처리가 가능하므로, 사진트리와 같은 계층 자료구조는 사용할 수 없다. 따라서 사진트리를 이용하는 방법들은 CPU에서 수행되고 이로 인해 화질이 떨어지거나 속도가 저하되는 문제가 생긴다.A quadtree is a hierarchical data structure that efficiently represents a two-dimensional space. Photo tree is effective for continuous level of detail technique and visual frustum screening technique, which is a mesh simplification technique that is widely used in terrain rendering. The photo tree enables the generation of high quality terrain images in real time, but since the rendering pipeline of the graphics hardware can process only sequential data such as vertex arrays and textures, hierarchical data structures such as photo trees cannot be used. none. Therefore, the methods using the photo tree are performed in the CPU, which causes a problem of deterioration or speed of the image.

따라서 지형 렌더링에 필요한 사진트리를 그래픽스 하드웨어의 렌더링 파이프라인에서 사용 가능하도록 함으로써 GPU만을 이용하여 사진트리 기반의 지형 모델을 렌더링하는 기법을 고안할 필요성이 있다.Therefore, there is a need to devise a technique for rendering a photo tree-based terrain model using only the GPU by making the photo tree necessary for the terrain rendering available in the rendering pipeline of the graphics hardware.

본 발명은 기존에 제안된 방법들의 상기와 같은 문제점들을 해결하기 위해 제안된 것으로서, 지형 렌더링에 필요한 사진트리를 그래픽스 하드웨어의 렌더링 파이프라인에서 사용 가능하도록 함으로써, GPU만을 이용하여 사진트리 기반의 지형 모델을 렌더링하는 방법을 제공하는 것을 그 목적으로 한다.The present invention has been proposed to solve the above problems of the conventionally proposed methods, by making the photo tree required for the terrain rendering available in the rendering pipeline of the graphics hardware, using a GPU only the photo tree-based terrain model Its purpose is to provide a way to render.

상기한 목적을 달성하기 위한 본 발명의 특징에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법은,Photo-tree-based terrain rendering method using a GPU according to a feature of the present invention for achieving the above object,

(1) 상세단계(LOD) 조절을 위한 표면거칠기값을 포함하는 사진트리 텍스처(quadtree texture)와 쉐이딩(shading)을 위한 노말 맵(Normal Map)을 생성하는 단계;(1) generating a quadtree texture including a surface roughness value for adjusting the LOD and a normal map for shading;

(2) 상세단계(LOD) 선택을 통해 각 블록에 포함된 지형을 구성할 노드들을 탐색하고, 각 노드들에 대한 정점(Vertex)들을 사진트리로 증식시키며 복수의 가시 정점(visible vertices)들을 생성하는 단계;(2) Searching for nodes that will make up the terrain included in each block through LOD selection, multiplying vertices for each node into the photo tree, and creating a plurality of visible vertices Making;

(3) 상기 생성된 복수의 가시 정점들로부터 삼각 메시를 생성하고, 상기 생성된 메시들 간의 이웃 노드 검사를 통해 크랙 제거를 위한 패치를 생성하여 상기 메시를 패치된 블록 메시로 변환하는 단계; 및(3) generating a triangular mesh from the generated plurality of visible vertices, generating a patch for crack removal by inspecting neighbor nodes between the generated meshes, and converting the mesh into a patched block mesh; And

(4) 상기 패치된 블록들로 구성된 삼각 메시에 고도 필드로부터 높이 값을 적용하고, 노말 맵으로 쉐이딩하여 지형 영상으로 렌더링 하는 단계를 포함하는 것을 그 구성상의 특징으로 한다.(4) applying the height value from the altitude field to the triangular mesh of the patched blocks, shading to a normal map and rendering the terrain image.

바람직하게는, 상기 사진트리 텍스처는, 상기 사진트리를 구성하는 각 노드(node)마다의 블록의 레벨, 높이 값, 및 표면거칠기값(σ)을 포함하고,Preferably, the photo tree texture includes a level, a height value, and a surface roughness value σ of each block constituting the photo tree.

상기 표면거칠기값(σ)은, 다음 수학식을 만족하며,The surface roughness value σ satisfies the following equation,

Figure 112009037271474-pat00001
Figure 112009037271474-pat00001

여기서, δ는 사진트리에서 상위 단계의 정점(vn)과 하위 단계의 에지의 중점(vn')에 대한 고도 차이를 나타내는 기하 오차 값이고, l은 블록의 레벨, k는 사진트리의 레벨 단계를 각각 나타내며, 상기 기하 오차 값(δ)은, 다음 수학식을 만족할 수 있다.Here, δ is a geometric error value representing an altitude difference between the vertex of the upper stage (vn) and the midpoint (vn ') of the lower stage of the photo tree, l is the level of the block, k is the level level of the photo tree. Respectively, the geometric error value δ may satisfy the following equation.

Figure 112009037271474-pat00002
Figure 112009037271474-pat00002

여기서, vn은 사진트리에서 각 블록마다의 상위 단계 정점의 높이 값을 나타내고, vn'은 하위 단계의 에지의 중점에 대한 높이 값을 나타내며, w는 블록의 레벨에 따른 가중치를 나타낸다. 또한, l은 블록의 레벨, k는 사진트리의 레벨 단계를 각각 나타낸다.Here, vn represents the height value of the upper stage vertex for each block in the photo tree, vn 'represents the height value of the midpoint of the edge of the lower stage, w represents the weight according to the level of the block. Where l represents the level of the block and k represents the level of the photo tree.

바람직하게는, 상기 렌더링 파이프라인은, 기하 음영 단계(Geometry Shader stage, 이하 GS) 및 스트림 출력 단계(Stream Output stage, 이하 SO)를 포함하고,Advantageously, said rendering pipeline comprises a Geometry Shader stage (GS) and a Stream Output stage (SO),

복수의 가시 정점들을 생성하는 상기 단계 (2)는,The step (2) of generating a plurality of visible vertices,

(a) 상기 렌더링 파이프라인의 초기 값으로 상기 사진트리의 루트 노드에 해당하는 단일 정점을 입력받는 단계;(a) receiving a single vertex corresponding to a root node of the photo tree as an initial value of the rendering pipeline;

(b) 상기 GS에서 상기 입력받은 단일 정점이 각각의 노드에 대해 상위 레벨로의 탐색 여부를 판별하는 플래그 값(f)에 따른 탐색 조건을 만족하는지 상세단계(LOD) 선택을 하는 단계;(b) selecting a detailed step (LOD) to determine whether the single vertex received by the GS satisfies a search condition according to a flag value f for determining whether to search for each node to a higher level;

(c) 상기 상세단계(LOD) 선택 결과, 상기 단일 정점이 탐색 조건을 만족하지 않으면 상기 단일 정점을 기준으로 분할되는 4개의 서브블록의 중점에 자식 노드들의 정점을 생성하고, 상기 단일 정점 자신은 삭제하는 단계;(c) As a result of the LOD selection, if the single vertex does not satisfy the search condition, a vertex of child nodes is generated at a midpoint of four subblocks divided based on the single vertex, and the single vertex itself is Deleting;

(d) 상기 단계 (c)의 결과를 SO를 통해 1차원 버퍼에 저장하는 단계; 및(d) storing the result of step (c) in a one-dimensional buffer via SO; And

(e) 각 블록들이 위치할 장소에 각 블록의 레벨을 지정한 정점들을 생성하기 위하여 상기 저장된 결과를 다시 상기 렌더링 파이프라인으로 제공하여 상기 각 자식 노드들의 정점마다 생성해야 하는 사진트리의 깊이만큼 상기 단계 (a) 내지 단계 (d)의 과정을 반복 수행하는 단계를 포함할 수 있다.(e) providing the stored result back to the rendering pipeline in order to generate vertices specifying the level of each block in the place where each block is to be located, by the depth of the photo tree to be generated for each vertex of each child node. It may include repeating the process of (a) to (d).

더욱 바람직하게는, 상기 플래그 값(f)은 다음의 수학식을 만족할 수 있다.More preferably, the flag value f may satisfy the following equation.

Figure 112009037271474-pat00003
Figure 112009037271474-pat00003

여기서, v는 view point, p는 경계구(boundary sphere of a region), λ는 미리 지정된 임계값, ℓ은 블록의 레벨을 나타내며, e는 표면거칠기값을 각각 나타낸다.Here, v denotes a view point, p denotes a boundary sphere of a region, λ denotes a predetermined threshold value, ℓ denotes a level of a block, and e denotes a surface roughness value.

바람직하게는, 상기 렌더링 파이프라인은, 기하 음영 단계(Geometry Shader stage, 이하 GS) 및 스트림 출력 단계(Stream Output stage, 이하 SO)를 포함하고,Advantageously, said rendering pipeline comprises a Geometry Shader stage (GS) and a Stream Output stage (SO),

상기 단계 (3)은,Step (3),

(f) 상기 생성된 복수의 가시 정점들이 나타내는 블록의 상하좌우에 위치한 동일한 레벨의 블록을 갖는 4개의 이웃 정점들의 위치를 계산하는 단계;(f) calculating positions of four neighboring vertices having blocks of the same level located above, below, left and right of the block represented by the generated plurality of visible vertices;

(g) 상기 위치가 계산된 이웃 정점들에 대하여 다음의 수학식을 만족하는 플래그 값(f)을 이용하여 크랙 발생 여부를 판단하고, 상기 판단 결과에 따라 패치를 생성하여 상기 가시 정점들을 패치된 블록 메시로 변환하는 단계; 및(g) Determining whether cracks have occurred by using a flag value f that satisfies the following equation for the neighboring vertices whose position is calculated, and generating a patch according to the determination result to patch the visible vertices. Converting to a block mesh; And

(h) 상기 변환된 블록 메시를 상기 SO를 통해 다시 상기 렌더링 파이프라인으로 피드백시키는 단계를 포함할 수 있다.(h) feeding back the transformed block mesh to the rendering pipeline through the SO.

Figure 112009037271474-pat00004
Figure 112009037271474-pat00004

여기서, v는 view point, p는 경계구(boundary sphere of a region), λ는 미리 지정된 임계값, ℓ은 블록의 레벨을 나타내며, e는 표면거칠기값을 각각 나타낸다.Here, v denotes a view point, p denotes a boundary sphere of a region, λ denotes a predetermined threshold value, ℓ denotes a level of a block, and e denotes a surface roughness value.

더욱 바람직하게는, 상기 단계 (g) 중 패치를 생성하여 패치된 블록 메시로 변환하는 단계는,More preferably, in the step (g), generating a patch and converting it to a patched block mesh,

(i) 상기 위치가 계산된 이웃 정점들에 해당하는 각 삼각형(triangle)들을 입력받아 이웃 노드 검사를 실시한 결과, 크랙이 발생한 경우에는 T-정점이 발견된 위치를 기준으로 상기 삼각형을 2조각으로 쪼개는 단계; 및(i) As a result of performing neighbor node inspection by receiving triangles corresponding to the neighboring vertices whose position is calculated, when the crack occurs, the triangle is divided into two pieces based on the position where the T-vertex is found. Splitting step; And

(j) 상기 단계(i)을 상기 사진 트리의 최대 레벨(Lmax) - 1 번 반복하여 패치를 생성하는 단계를 포함하고,(j) repeating step (i) to generate a patch by repeating the maximum level (L max ) -one time of the photo tree,

상기 패치는,The patch,

상기 단계 (g)에서의 판단 결과, 크랙이 발생하지 않으면 상기 이웃 노드들을 이용하여 생성된 2개의 삼각형으로 구성된 블록 메시이고, 크랙이 발생하면 상기 이웃 노드들을 이용하여 생성된 4개의 삼각형으로 구성된 블록 메시로 구성될 수 있다.As a result of the determination in step (g), if a crack does not occur, the block mesh is composed of two triangles generated using the neighboring nodes, and if a crack occurs, the block is composed of four triangles generated using the neighboring nodes. It may consist of a mesh.

본 발명에서 제안하고 있는 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에 따르면, 지형 렌더링에 필요한 사진트리를 그래픽스 하드웨어의 렌더링 파이프라인에서 사용 가능하도록 함으로써, GPU만을 이용하여 사진트리 기반의 지형 모델을 렌더링할 수 있다.According to the photo-tree-based terrain rendering method using the GPU proposed in the present invention, by rendering the photo tree required for the terrain rendering in the rendering pipeline of the graphics hardware, rendering the photo tree-based terrain model using only the GPU can do.

이하에서는 첨부된 도면들을 참조하여, 본 발명에 따른 실시예에 대하여 상 세하게 설명하기로 한다.Hereinafter, with reference to the accompanying drawings, it will be described in detail with respect to the embodiment according to the present invention.

도 1은 본 발명의 일실시예에 따른 그래픽스 처리 유닛(Graphics Processing Unit, 이하 GPU)을 이용한 사진트리 기반의 지형 렌더링 방법의 흐름도이다. 도 1에 도시된 바와 같이, 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법은, 그래픽스 하드웨어의 렌더링 파이프라인에서의 지형 렌더링 방법에 있어서, 상세단계(LOD) 조절을 위한 표면거칠기값을 포함하는 사진트리 텍스처(quadtree texture)와 쉐이딩(shading)을 위한 노말 맵(Normal Map)을 생성하는 단계(S100), 상세단계(LOD) 선택을 통해 각 블록에 포함된 지형을 구성할 노드들을 탐색하고, 각 노드들에 대한 정점(Vertex)들을 사진트리로 증식시키며 복수의 가시 정점(visible vertices)들을 생성하는 단계(S200), 생성된 복수의 가시 정점들로부터 삼각 메시를 생성하고, 생성된 메시들 간의 이웃 노드 검사를 통해 크랙 제거를 위한 패치를 생성하여 정점들을 패치된 블록 메시로 변환하는 단계(S300), 및 패치된 블록들로 구성된 삼각 메시에 고도 필드로부터 높이 값을 적용하고, 노말 맵으로 쉐이딩 하여 지형 영상으로 렌더링하는 단계(S400)를 포함한다. GPU의 렌더링 파이프라인에서는 계층 자료 구조를 사용하는데 필요한 재귀연산과 포인터를 지원하지 않기 때문에 기존 사진트리기반의 알고리즘들은 CPU 에서만 처리할 수 있었다. 따라서, 본 발명에서는 이러한 사진트리의 한계를 극복하기 위하여 GPU에서 사진트리 기반의 지형을 렌더링하는 방법을 제안한다.1 is a flowchart of a photo-tree based terrain rendering method using a graphics processing unit (GPU) according to an embodiment of the present invention. As shown in FIG. 1, a photo tree-based terrain rendering method using a GPU according to an embodiment of the present invention includes a method for adjusting a detailed level (LOD) in a terrain rendering method in a rendering pipeline of graphics hardware. Generating a terrain included in each block by selecting a quadtree texture including surface roughness values and a normal map for shading (S100) and selecting a detailed level (LOD) Searching for nodes to be performed, multiplying vertices for each node into a photo tree, and generating a plurality of visible vertices (S200), generating a triangular mesh from the generated plurality of visible vertices, Generating a patch for crack removal by inspecting neighbor nodes between the generated meshes and converting the vertices into a patched block mesh (S300), and a triangular mesh composed of the patched blocks. Also apply the height value from the field, and a step (S400) that the shading to the normal map rendering the topography image. The GPU's rendering pipeline does not support the recursion and pointers needed to use hierarchical data structures. Accordingly, the present invention proposes a method of rendering a photo tree based terrain on a GPU in order to overcome the limitation of the photo tree.

단계 S100은, 지형 영상의 렌더링을 위한 전처리 단계로서, 상세단계(LOD) 조절을 위한 표면거칠기값을 포함하는 사진트리 텍스처(quadtree texture)와 쉐이딩(shading)을 위한 노말 맵(Normal Map)을 생성한다. 사진트리는 각 노드(node)가 4개의 자식노드(child node)를 갖는 계층 자료 구조로서, 2차원 공간을 4개의 4분면으로 재귀적으로 분할하여 공간을 효율적으로 표현한다. 사진 트리는 각 노드마다 부모노드(parent node), 자식노드(child node), 그리고 이웃 노드(neighbor node)의 포인터(pointer) 정보들, 분할된 블록의 레벨값, 고도값(height value), 및 표면거칠기값(σ)을 포함하는 정보들을 갖는다. 사진트리 텍스처는 이러한 정보들을 렌더링 파이프 라인에서 사용하기 위해 사진트리를 2차원 텍스처 형태로 변환한 것을 말하며, 이러한 사진트리 텍스처의 구성은 도 2에 잘 나타나 있다.Step S100 is a preprocessing step for rendering the terrain image, and generates a quadtree texture including a surface roughness value for shaping the detail and a normal map for shading. do. The photo tree is a hierarchical data structure in which each node has four child nodes, and the two-dimensional space is recursively divided into four quadrants to efficiently represent the space. The picture tree contains pointer information of parent node, child node, and neighbor node, level of partitioned block, height value, and surface for each node. Information including the roughness value?. The photo tree texture refers to a transformation of the photo tree into a two-dimensional texture for use in the rendering pipeline. The configuration of the photo tree texture is shown in FIG. 2.

도 2는 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 생성되는 사진트리 텍스처를 나타낸 도면이다. 도 2에 도시된 본 발명의 일실시예에 따른 사진트리 텍스처는 전처리 단계인 단계 S100에서 생성되며 입력된 고도필드(height field)와 동일한 해상도를 갖는다. 이 텍스처는 도 2와 같이 중앙에 루트 노드(root node)가 저장되고, 이 노드를 중심으로 하여 4개로 분할된 정사각형 서브 블록(sub block)들의 중앙에 자식 노드들을 저장한다. 이것은 트리의 최대 레벨값(Lmax)만큼 재귀적으로 반복한다. 본 발명에서는 표면거칠기값(σ)을 가진 사진트리 텍스처를 생성한다. 표면거칠기값(σ)의 계산은 도 3 및 도 4를 통해 설명한다.2 is a diagram illustrating a photo tree texture generated in a photo tree based terrain rendering method using a GPU according to an embodiment of the present invention. The photo tree texture according to the embodiment of the present invention shown in FIG. 2 is generated in step S100, which is a preprocessing step, and has the same resolution as the input height field. In this texture, as shown in FIG. 2, a root node is stored at the center, and child nodes are stored at the center of the square sub blocks divided into four around the node. This recursively repeats the tree's maximum level value (L max ). In the present invention, a photo tree texture having a surface roughness value σ is generated. The calculation of the surface roughness value σ is described with reference to FIGS. 3 and 4.

도 3은 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 블록에 포함된 정점 및 기하오차값을 나타낸 도면이고, 도 4는 블록의 크기에 따라 가중치가 부여된 모습을 나타낸 도면이다. 도 3에 도시된 바와 같이, 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 표면거칠기값(σ)은 상위 단계의 정점(vertex)(vn)과 하위 단계의 에지(edge)(vn')에 대한 고도(height) 차이인 기하 오차 값(geometry error value)(δ)을 사용하여 계산된다. 이 기하 오차 값(δ)이 같은 값일 경우 큰 블록보다 작은 블록에서 상대적으로 더 차이가 커 보인다. 따라서 이러한 문제를 해결하기 위하여, 도 4와 같이 블록의 레벨에 따라 가중치(w) 값을 주며, 가중치 값은 상위 레벨일수록 큰 값을 갖는다. 가중치(w) 값이 주어진 기하 오차 값(δ)은 다음의 수학식 1을 통해 구할 수 있다.FIG. 3 is a view showing vertices and geometric error values included in blocks in a photo-tree-based terrain rendering method using GPUs according to an embodiment of the present invention, and FIG. 4 is a view showing weights according to block sizes. The figure shown. As shown in FIG. 3, in the photo-tree-based terrain rendering method using a GPU according to an embodiment of the present invention, the surface roughness value σ is a vertex vn of an upper level and an edge of a lower level. It is calculated using the geometry error value δ, which is the height difference for the edge vn '. If the geometric error value δ is the same value, the difference is relatively larger in the smaller block than the large block. Accordingly, in order to solve this problem, as shown in FIG. 4, a weight (w) is given according to the level of a block, and a weight value has a larger value as a higher level. The geometric error value δ given the weight w value can be obtained through Equation 1 below.

Figure 112009037271474-pat00005
Figure 112009037271474-pat00005

여기서, vn은 사진트리에서 각 블록마다의 상위 단계 정점의 고도값을 나타내고, vn'은 하위 단계의 에지의 중점에 대한 고도값을 나타내며, w는 블록의 레벨에 따른 가중치를 나타낸다. 또한, l은 블록의 레벨, k는 사진트리의 레벨 단계를 나타낸다.Here, vn represents an altitude value of the upper stage vertex for each block in the photo tree, vn 'represents an altitude value of the midpoint of the lower stage edge, and w represents a weight according to the level of the block. Where l is the level of the block and k is the level level of the photo tree.

이러한 과정을 거쳐 각 블록마다 4 개의 기하 오차 값들이 계산된다. 각 노드에 저장될 표면거칠기값은 노드 자신과 하위 노드들의 최대 기하 오차 값이다. 하위 레벨의 값들을 포함하는 이유는 상세단계(Level Of Detail, 이하 LOD)를 적용할 경우에 특정 상세단계의 오차 값(error value)이 더 큼에도 불구하고, 상위 레벨에서 탐색을 중단할 수 있기 때문이다. 수학식 1을 통해 구해진 기하 오차 값을 이용하여 표면거칠기값(σ)을 표시하면 다음의 수학식 2와 같이 표현할 수 있다.Through this process, four geometric error values are calculated for each block. The surface roughness value to be stored in each node is the maximum geometric error value of the node itself and subordinate nodes. The reason for including the lower level values is that when the level of detail (LOD) is applied, the search may be stopped at a higher level even though the error value of the specific level is larger. Because. If the surface roughness value σ is displayed using the geometric error value obtained through Equation 1, it may be expressed as Equation 2 below.

Figure 112009037271474-pat00006
Figure 112009037271474-pat00006

여기서, δ는 사진트리에서 상위 단계의 정점(vn)와 하위 단계의 에지의 중점(vn')에 대한 고도 차이를 나타내는 기하 오차 값이고, l은 블록의 레벨, k는 사진트리의 레벨 단계를 나타낸다.Here, δ is a geometric error value representing an altitude difference between the vertex of the upper stage (vn) and the midpoint (vn ') of the lower stage of the photo tree, l is the level of the block, k is the level level of the photo tree. Indicates.

이렇게 단계 S100에서는 지형 렌더링 시에 지형을 더욱 상세하게 표현하기 위해 표면거칠기값이 포함된 사진 트리 텍스처와 렌더링의 대상이 되는 지형을 표현한 노말 맵(normal map)를 생성하게 된다.Thus, in step S100, in order to express the terrain in detail when the terrain is rendered, a photo tree texture including a surface roughness value and a normal map representing the terrain to be rendered are generated.

단계 S200은, 상세단계(LOD) 선택을 통해 각 블록에 포함된 지형을 구성할 노드들을 탐색하고, 각 노드들에 대한 정점(Vertex)들을 사진트리로 증식시키며 복수의 가시 정점(visible vertices)들을 생성한다. 일반적으로 사진트리는 2차원 공간을 효율적으로 표현하는 계층 자료 구조로서, 지형 렌더링에서 많이 사용되는 메쉬 간략화 기법인 연속 상세단계(Continuous Level Of Detail, 이하 CLOD)와 시각절두체 선별 기법에 효과적이다. 여기서 상세단계(LOD)란 어떤 물체가 작거나 렌더링 이미지에 별로 기여하는 것이 없을 경우에 좀 더 간략하게 표현된 것을 사용하자는 것을 말한다. 먼 거리의 모델은 덜 정밀하게 표현되어도 시각적으로 큰 차이가 없으며, 이렇게 그래픽 파이프라인으로 넘어가는 다각형(polygon)의 개수를 줄여 렌더링의 성능을 향상시키는 기법을 말한다. 그 중 연속 상세단계(CLOD)는 지형 데이터를 시각화하는 기법 중의 하나로서 시점의 위치와 거리에 따라 동적으로 모델의 상세단계를 조절하게 된다. 고도 필드(height field)로 표현되는 지형 데이터의 경우 실행 시간에 삼각형 집합을 동적으로 생성하는 것이 가능하기 때문에 거리가 변함에 따라 지형의 정점들을 나누거나 합치는 방법으로 상세단계를 동적으로 조절할 수 있다. 사진트리 기반의 연속 상세단계(CLOD)를 이용한 지형의 표현은 지형과 시점 사이의 거리와 관측방향에 따라 능동적으로 지형의 상세단계를 결정하여 실시간 지형 영상을 얻을 수 있다는 장점이 있다. 본 발명에서 제안하는 연속 상세단계(CLOD) 방법에는 두 가지 기준이 적용되는데, 그 첫 번째는 관측자와의 거리이고, 두 번째는 표면 거칠기이다. 표현 거칠기를 고려한 방법은 도 5와 도 6을 통해 설명한다. Step S200 searches for nodes constituting the terrain included in each block through LOD selection, multiplies vertices for each node into a photo tree, and selects a plurality of visible vertices. Create In general, the photo tree is a hierarchical data structure that efficiently represents two-dimensional space, and is effective for continuous level of detail (CLOD) and visual frustum screening techniques, which are frequently used in terrain rendering. In this case, LOD means using a more simplified representation when an object is small or does not contribute much to the rendered image. Long-distance models are less visually significant, even if they are less precise, and this is a technique that improves rendering performance by reducing the number of polygons that go into the graphics pipeline. Among them, the continuous detail level (CLOD) is one of techniques for visualizing the terrain data, and dynamically adjusts the detail level of the model according to the position and distance of the viewpoint. In the case of terrain data represented as a height field, it is possible to dynamically generate a set of triangles at runtime, so that the detail level can be dynamically adjusted by dividing or combining the vertices of the terrain as the distance changes. . Representation of terrain using the Phototree-based Continuous Detail Level (CLOD) has the advantage that the real-time terrain image can be obtained by actively determining the detail level of the terrain according to the distance between the terrain and the viewpoint and the viewing direction. Two criteria are applied to the CLOD method proposed in the present invention, the first of which is the distance from the observer and the second of which is the surface roughness. The method considering the expression roughness will be described with reference to FIGS. 5 and 6.

도 5는 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 시점 거리를 갖는 상세단계(LOD)의 와이어프레임의 이미지를 나타낸 도면이고, 도 6은 표면거칠기값이 적용된 연속 상세단계(CLOD)에서의 이미지를 나타낸 도면이다. 도 5에 도시된 바와 같이, 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 시점 종속적 상세단계(View dependent LOD)는 관측자로부터 가까운 부분은 자세히, 먼 부분은 덜 자세하게 표현하는 기법으로서, 다음과 같은 수학식 3에 의해 더 상위 레벨로의 탐색 여부를 판별하는 플래그 값 (f)을 구한다.5 is a view showing an image of a wireframe of the detailed step (LOD) having a viewpoint distance in the photo-tree-based terrain rendering method using a GPU according to an embodiment of the present invention, Figure 6 is a continuous surface roughness value applied It is a figure which shows the image in the detailed step CLOD. As shown in FIG. 5, in the photo-tree-based terrain rendering method using a GPU according to an embodiment of the present invention, a view dependent LOD may be expressed in detail near and far in detail from a viewer. As a technique of doing this, a flag value (f) for determining whether to search for a higher level is obtained by the following equation (3).

Figure 112009037271474-pat00007
Figure 112009037271474-pat00007

여기서, v는 관측지점(view point), p는 경개구역(boundary sphere of a region), λ는 미리 정해진 문턱값(predefined threshold), ℓ은 블록의 레벨(Block's level)을 나타낸다.Where v is a view point, p is a boundary sphere of a region, λ is a predefined threshold, and l is the block's level.

연속 상세단계(CLOD) 방법에서 표면거칠기를 고려한 방법은 전처리단계인 단계 S100에서 생성한 사진트리 텍스처에 저장된 값을 이용한다. 이 방법은 도 6과 같이 블록의 표면거칠기값이 작은 경우엔 관측자가 가까워도 덜 자세하게 보여주고, 큰 경우엔 관측자와의 거리가 멀어도 자세하게 보여주는 문제가 생긴다. 따라서, 본 발명에서는 연속 상세단계(CLOD)에서 표면거칠기를 고려한 방법을 시점 종 속적 상세단계(View dependent LOD)와 같이 관측자로부터 가까운 부분은 자세히, 먼 부분은 덜 자세하게 나타내기 위해 수학식 3을 다음 수학식 4와 같이 변형한다. 수학식 4에서는 수학식 3을 통해 구한 더 상위 레벨로의 탐색 여부를 판별하는 플래그 값 (f)을 전처리 단계인 S100에서 구한 표면거칠기값(e)으로 나누어 구한 값을 플래그 (f)값으로 한다.The method considering surface roughness in the continuous detail step (CLOD) method uses a value stored in the photo tree texture generated in step S100, which is a preprocessing step. In this method, when the surface roughness value of the block is small, as shown in FIG. 6, the viewer shows less detail even if the observer is close, and when the distance is far from the observer, the problem occurs in detail. Therefore, in the present invention, the method considering the surface roughness in the continuous detail step (CLOD), as shown in the view dependent LOD, the part closer to the observer in detail, the far part less in detail to the following equation (3) It is modified as in Equation 4. In Equation 4, a flag value (f) obtained by dividing a flag value (f) for determining whether to search to a higher level obtained by Equation 3 by the surface roughness value (e) obtained in the preprocessing step S100 is used as a flag (f) value. .

Figure 112009037271474-pat00008
Figure 112009037271474-pat00008

여기서, v는 관측지점(view point), p는 경개구역(boundary sphere of a region), λ는 미리 정해진 문턱값(predefined threshold), ℓ은 블록의 레벨(Block's level)을 나타내며, e는 표면거칠기값을 나타낸다.Where v is the view point, p is the boundary sphere of a region, λ is the predefined threshold, ℓ is the block's level, and e is the surface roughness. Indicates a value.

단계 S200에서는 상세단계(LOD) 검사를 통해 각 블록에 포함된 노드들을 탐색하고, 각 노드들에 대한 정점(Vertex)들을 사진트리로 증식시키며 복수의 가시 정점(visible vertices)들을 생성한다. 이를 위해 본 발명에서는 그래픽스 하드웨어의 렌더링 파이프라인에서 기하 음영 단계(Geometry Shader stage, 이하 GS) 및 스트림 출력 단계(Stream Output stage, 이하 SO)를 이용하여 병렬적으로 지형을 구성할 노드를 탐색하는 방법을 제안한다. 이 방법은 효과적으로 지형을 렌더링하기 위해 탑-다운(top-down) 방식으로 노드를 탐색한다. GS는 정점들로 구성된 point, line segment, 또는 triangle 등과 같이 이미지를 구성하는 프리미티 브(primitive)를 입력받아 기하정보를 수정하거나 하나 이상의 프리미티브를 구성하는 정점들을 생성하거나 삭제할 수 있다. 렌더링 파이프라인의 특성상 GS에서 각 프리미티브는 병렬적으로 처리되다. GS를 통해 새로 생성되거나 수정된 정점 정보들을 담은 서브셋(subset)은 SO를 통하여 1D 출력 버퍼(Output Buffer)로 순차적으로 출력된다. 이러한 GS와 SO의 기능과 각 정점의 (x,y) 좌표값을 사용해 기존 사진트리에서 문제가 되었던 재귀연산과 포인터 문제를 해결할 수 있다. 복수의 가시 정점들을 생성하는 과정은 도 7과 같은 흐름에 의해 이루어진다.In step S200, the nodes included in each block are searched through the LOD inspection, the vertices of the nodes are propagated into the photo tree, and a plurality of visible vertices are generated. To this end, in the present invention, a method for searching for nodes to form terrain in parallel using a geometry shader stage (GS) and a stream output stage (SO) in a rendering pipeline of graphics hardware. Suggest. This method traverses nodes in a top-down fashion to effectively render the terrain. GS can receive primitives that make up an image, such as points, line segments, or triangles, which can be used to modify geometry or create or delete vertices that make up one or more primitives. Due to the nature of the rendering pipeline, each primitive in GS is processed in parallel. The subset containing the newly created or modified vertex information through the GS is sequentially output to the 1D output buffer through the SO. Using these GS and SO functions and the (x, y) coordinates of each vertex, we can solve the problem of recursion and pointers, which was a problem in the existing photo tree. The process of generating a plurality of visible vertices is performed by the flow as shown in FIG. 7.

도 7은 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 가시 정점을 생성하는 방법을 나타낸 흐름도이다. 도 7에 도시된 바와 같이, 본 발명의 일실시예에 따른 복수의 가시 정점을 생성하는 단계(S200)는, 렌더링 파이프라인의 초기 값으로 사진트리의 루트 노드에 해당하는 단일 정점을 입력받는 단계(S210), GS에서 입력받은 단일 정점이 각각의 노드에 대해 상위 레벨로의 탐색 여부를 판별하는 플래그 값(f)에 따른 탐색 조건을 만족하는지 상세단계(LOD) 선택을 하는 단계(S220), 상세단계(LOD) 선택 결과, 단일 정점이 탐색 조건을 만족하지 않으면 단일 정점을 기준으로 분할되는 4개의 서브블록의 중점에 자식 노드들의 정점을 생성하고, 단일 정점 자신은 삭제하는 단계(S230), 단계 S230에서 생성 및 삭제된 결과를 SO를 통해 1차원 버퍼에 저장하는 단계(S240), 및 각 블록들이 위치할 장소에 각 블록의 레벨을 지정한 정점들을 생성하기 위하여 저장된 결과를 다시 렌더링 파이프라인으로 제공하여 각 자식 노드들의 정점마다 생성 해야 하는 사진트리의 깊이만큼 단계 S210 내지 단계 S240의 과정을 반복 수행하는 단계(S250)를 포함한다.7 is a flowchart illustrating a method of generating visible vertices in a photo tree-based terrain rendering method using a GPU according to an embodiment of the present invention. As shown in FIG. 7, in operation S200 of generating a plurality of visible vertices according to an embodiment of the present invention, a single vertex corresponding to a root node of a photo tree is input as an initial value of a rendering pipeline. (S210), step S220 of selecting whether a single vertex received from GS satisfies a search condition according to a flag value f for determining whether to search for each node to a higher level (S220), As a result of the LOD selection, when a single vertex does not satisfy the search condition, a vertex of child nodes is generated at a midpoint of four subblocks divided based on a single vertex, and the single vertex is deleted itself (S230). Storing the result generated and deleted in the step S230 in the one-dimensional buffer through the SO (S240); Providing a ring pipeline includes the step (S250) to repeat the deep processing of step S210 to step S240 as long as the photo-tree needs to be generated for each vertex of each of the child nodes.

단계 S210은, 렌더링 파이프라인의 초기 값으로 사진트리의 루트 노드에 해당하는 단일 정점을 입력받는 단계 과정이다. 렌더링 파이프라인은 초기 값으로 사진트리의 루트 노드에 해당하는 단일 정점(single vertex)을 입력받는다. 이 정점은 사진트리 텍스처에서와 같이 노드가 의미하는 블록의 중심 포인트(center point)에 위치한다.Step S210 is a step of receiving a single vertex corresponding to the root node of the photo tree as an initial value of the rendering pipeline. The rendering pipeline receives a single vertex corresponding to the root node of the photo tree as an initial value. This vertex is located at the center point of the block that the node implies, as in the phototree texture.

단계 S220은, GS에서 입력받은 단일 정점이 각각의 노드에 대해 상위 레벨로의 탐색 여부를 판별하는 플래그 값(f)에 따른 탐색 조건을 만족하는지 상세단계(LOD) 선택을 하는 단계이다. 루트 노드에 해당하는 정점은 GS에서 각각의 노드에 대해 앞의 수학식 3 및 수학식 4의 플래그 값(f), 즉, 더 상위 레벨로의 탐색 여부를 판별하는 플래그 값 (f)에 따라 탐색 조건을 만족하는지를 판단한다. 만약 단계 S220에서의 탐색 결과에 따라 다음 단계에서 더 상위 레벨이 존재하면 탐색을 계속하고, 그렇지 않은 경우는 트리의 최대 레벨까지 탐색된 경우이므로 처음으로 회귀하게 된다.In step S220, a detailed step (LOD) is selected to determine whether a single vertex inputted from GS satisfies a search condition according to a flag value f for determining whether to search for each node to a higher level. The vertex corresponding to the root node is searched according to the flag value (f) of the preceding Equations 3 and 4, i.e., the flag value (f) that determines whether to navigate to a higher level for each node in GS. Determine if the condition is met. If there is a higher level in the next step according to the search result in step S220, the search continues. Otherwise, the search is performed to the maximum level of the tree, and thus the first regression is performed.

단계 S230은, 단계 S220에서 상세단계(LOD) 선택 결과, 단일 정점이 탐색 조건을 만족하지 않으면 단일 정점을 기준으로 분할되는 4개의 서브블록의 중점에 자 식 노드들의 정점을 생성하고, 단일 정점 자신은 삭제한다. 이때, 탐색 조건을 만족하지 않는 노드는 자기 자신을 반환한다.In step S230, as a result of the LOD selection in step S220, if the single vertex does not satisfy the search condition, the vertex of the child nodes is generated at the midpoints of the four subblocks divided based on the single vertex, and the single vertex itself is generated. Delete it. At this time, the node that does not satisfy the search condition returns itself.

단계 S240은, 단계 S230에서의 생성 및 삭제된 결과를 SO를 통해 1차원 버퍼에 저장한다.In step S240, the result generated and deleted in step S230 is stored in the one-dimensional buffer through the SO.

단계 S250은, 각 블록들이 위치할 장소에 각 블록의 레벨을 지정한 정점들을 생성하기 위하여 저장된 결과를 다시 렌더링 파이프라인으로 제공하여 각 자식 노드들의 정점마다 생성해야 하는 사진트리의 깊이만큼 단계 S210 내지 단계 S240의 과정을 반복 수행한다. 단계 S240에서 저장된 결과는 다시 렌더링 파이프라인으로 피드백되어 각 정점마다 생성해야 하는 사진트리의 깊이(depth)만큼 같은 일을 반복 수행한다. 이 결과로 지형 데이터를 분할한 각 블록들이 위치할 장소에 블록의 레벨을 지정한 정점들이 생성된다. GS의 특징상 각각의 정점마다 병렬 알고리즘이 처리되기 때문에 CPU에서 트리를 검색(traverse)하는 방법보다 빠르다. Step S250 provides the stored results back to the rendering pipeline in order to generate the vertices that specify the level of each block in the place where each block is to be located, so that the depth of the picture tree that should be generated for each vertex of each child node is the step S210 to the step. Repeat the process of S240. The result stored in step S240 is fed back to the rendering pipeline and the same thing is repeated as much as the depth of the photo tree to be generated for each vertex. As a result, the vertices that designate the level of the block are generated in the place where each block which divided the terrain data is located. The GS feature is faster than traversing a tree on the CPU because a parallel algorithm is processed for each vertex.

단계 S300은, 단계 S200에서 생성된 복수의 가시 정점들로부터 삼각 메시를 생성하고, 생성된 메시들 간의 이웃 노드 검사를 통해 크랙 제거를 위한 패치를 생성하여 생성된 메시를 패치된 블록 메시로 변환한다. 단계 S200에서 생성된 복수의 가시 정점들은 이웃(neighbor) 노드들과 블록 레벨(block level)을 비교한 후, 패치된 블록(pached block)으로 변환된다. 이 과정에서 각 노드들 간의 레벨 차로 인하여 크랙(crack)이 발생하게 되는데, 이는 도 8을 통해 알 수 있다.In operation S300, a triangular mesh is generated from the plurality of visible vertices generated in operation S200, and a patch for crack removal is generated by checking neighboring nodes between the generated meshes, and the generated mesh is converted into a patched block mesh. . The plurality of visible vertices generated in operation S200 are converted into patched blocks after comparing block levels with neighbor nodes. In this process, a crack occurs due to the level difference between the nodes, which can be seen from FIG. 8.

도 8은 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 메시 생성 시에 각 노드들 간의 레벨 차로 인하여 크랙이 발생한 것을 나타낸 도면이다. 도 8에 도시된 것과 같은 크랙의 발생을 없애기 위해서 이웃(neighbor) 정점들을 검사해야 한다. 기존의 방법들에서는 크랙 제거를 위해 가시성 전파 작업을 수행했는데 이 작업은 CPU에서만 이루어졌다. 따라서 본 발명에서는 GPU에서 크랙을 제거하기 위한 방법을 제안하며, 이는 도 9 내지 도 12를 통해 설명한다.FIG. 8 is a diagram illustrating a crack occurring due to a level difference between nodes during mesh generation in a phototree-based terrain rendering method using a GPU according to an embodiment of the present invention. Neighbor vertices should be inspected to eliminate the occurrence of cracks as shown in FIG. Existing methods performed visibility propagation to eliminate cracks, which were only done on the CPU. Therefore, the present invention proposes a method for removing cracks in the GPU, which will be described with reference to FIGS. 9 to 12.

도 9는 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 크랙 제거를 위한 패치를 생성하여 블록을 변환하는 과정을 나타낸 흐름도이고, 도 10은 크랙의 발생여부에 따라 각각 생성되는 패치를 나타낸 도면이다. 또한, 도 11은 이웃 체크(Neighbor Check)로 찾는 T-정점(T-vertex)를 나타낸 도면이고, 도 12는 패치가 생성되는 과정을 나타낸 흐름도 및 도면이다. 도 9에 도시된 바와 같이, 본 발명의 일실시예에 따른 크랙 제거를 위한 패치를 생성하여 블록을 변환하는 과정은, 단계 S200에서 생성된 복수의 가시 정점들이 나타내는 블록의 상하좌우에 위치한 동일한 레벨의 블록을 갖는 4개의 이웃 정점들의 위치를 계산하는 단계(S310), 위치가 계산된 이웃 정점들에 대하여 수학식 d를 만족하는 플래그 값(f)을 이용하여 크랙 발생 여부를 판단하고, 판단 결과에 따라 패치를 생 성하여 가시 정점들을 패치된 블록 메시로 변환하는 단계(S330), 변환된 블록 메시를 SO를 통해 다시 렌더링 파이프라인으로 피드백하는 단계(S350)를 포함한다.9 is a flowchart illustrating a process of converting a block by generating a patch for removing a crack in a photo-tree-based terrain rendering method using a GPU according to an embodiment of the present invention, and FIG. 10 is a view illustrating whether cracks are generated. It is a figure which shows the patch which is created. FIG. 11 is a diagram illustrating a T-vertex found by a neighbor check, and FIG. 12 is a flowchart and a diagram illustrating a process of generating a patch. As shown in FIG. 9, the process of transforming a block by generating a patch for crack removal according to an embodiment of the present invention includes the same level located on the top, bottom, left, and right sides of the block represented by the plurality of visible vertices generated in step S200. Computing the positions of the four neighboring vertices having the block of (S310), using the flag value (f) that satisfies the equation d for the neighboring vertices whose position is calculated, it is determined whether the crack has occurred, the determination result Generating a patch to convert the visible vertices into the patched block mesh (S330), and feeding back the transformed block mesh to the rendering pipeline through the SO (S350).

단계 S310은, 단계 S200에서 생성된 복수의 가시 정점들이 나타내는 블록의 상하좌우에 위치한 동일한 레벨의 블록을 갖는 4개의 이웃 정점들의 위치를 계산한다. 각 정점은 도 10의 (a)와 같이 자신이 의미하는 블록의 상하좌우에 위치한 동일한 레벨의 블록을 갖는 4개의 이웃 노드들의 위치를 계산할 수 있다.In operation S310, the positions of four neighboring vertices having blocks of the same level located on the top, bottom, left, and right sides of the block represented by the plurality of visible vertices generated in step S200 are calculated. Each vertex may calculate positions of four neighboring nodes having blocks of the same level located on the top, bottom, left, and right sides of the block as shown in FIG.

단계 S330은, 위치가 계산된 이웃 정점들에 대하여 앞의 수학식 4를 만족하는 플래그 값(f)을 이용하여 크랙 발생 여부를 판단하고, 판단 결과에 따라 패치를 생성하여 가시 정점들로 구성된 메시를 패치된 블록 메시로 변환한다. 단계 S330에 대하여는 도 12를 통해 설명한다.In step S330, it is determined whether a crack has occurred using the flag value f that satisfies Equation 4 with respect to the neighboring vertices whose position is calculated, and generates a patch according to the determination result to generate a mesh composed of visible vertices. Convert to a patched block mesh. Operation S330 will be described with reference to FIG. 12.

도 12에 도시된 바와 같이, 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 패치를 생성하여 패치된 블록 메시로 변환하는 단계 S330은, 위치가 계산된 이웃 정점들에 해당하는 각 삼각형(triangle)들을 입력받아 이웃 노드 검사를 실시한 결과, 크랙이 발생한 경우에는 T-정점이 발견된 위치를 기준으로 상기 삼각형을 2조각으로 쪼개는 단계(S332), 및 단계 S332를 사진 트리의 최대 레벨(Lmax) - 1 번 반복하여 패치를 생성하는 단계(S334)를 포함한다.As shown in FIG. 12, in operation S330 of generating a patch and converting the patch into a patched block mesh in the photo-tree-based terrain rendering method using the GPU, the position is calculated in neighboring vertices. As a result of performing neighbor node inspection by receiving the corresponding triangles, if a crack occurs, the triangle is divided into two pieces based on the location where the T-vertex is found (S332), and step S332 is performed in the photo tree. Maximum level (L max ) of-repeats 1 time to generate a patch (S334).

단계 S332는, 위치가 계산된 이웃 정점들에 해당하는 각 삼각형(triangle)들을 입력받아 이웃 노드 검사를 실시한 결과, 크랙이 발생한 경우에는 T-정점이 발견된 위치를 기준으로 삼각형을 2조각으로 쪼갠다. 단계 S332는 단계 S310에서 계산된 이웃 노드들의 위치에 상세단계(LOD)에서 구해진 식을 적용했을 때 더 탐색이 가능한지를 판별한다. 전부 탐색이 불가능하다면 이웃한 블록들이 자신보다 하위 레벨이므로 T-정점(T-vertex)이 발생하지 않는다. 이 경우엔 정점을 도 10(b)의 하단과 같이 2개의 삼각형으로 된 블록 메시로 변환하여 준다. 그리고 더 탐색이 가능하다면 도 11과 같이 하위 레벨 블록의 한 변 위에 T-정점이 생성되기 때문에 크랙이 발생할 수 있다. 도 11에서 T는 T-정점이고, N은 이웃(Neighbor)이다. 이 경우엔 도 10(b)의 상단과 같이 4개의 삼각형으로 구성된 블록 메시로 변환한다. 이와 같이 변환된 메시는 SO를 통하여 다시 렌더링 파이프라인으로 피드백되는데, 이때 이웃 검사 결과 크랙이 발생하므로 4개의 삼각형으로 생성된 블록에 패치를 생성해줘야 한다.In step S332, when the triangles corresponding to the computed neighboring vertices are input and neighbor node inspection is performed, when the crack occurs, the triangle is divided into two pieces based on the location where the T-vertex is found. . Step S332 determines whether further searching is possible when the equation obtained in the detailed step LOD is applied to the positions of neighboring nodes calculated in step S310. If the whole is impossible to search, T-vertex does not occur because neighboring blocks are lower level than themselves. In this case, the vertices are converted into a block mesh of two triangles as shown in the lower part of FIG. If further search is possible, a crack may occur because the T-vertex is generated on one side of the lower level block as shown in FIG. 11. In FIG. 11, T is a T-peak and N is a neighbor. In this case, as shown in the upper part of FIG. The transformed mesh is fed back to the rendering pipeline through the SO. In this case, a crack is generated as a result of neighbor inspection, so a patch must be generated in a block formed of four triangles.

단계 S334는 단계 S332를 사진 트리의 최대 레벨(Lmax) - 1 번 반복하여 패치를 생성하는 과정으로서, 이때 생성되는 패치는, 단계 S330에서의 판단 결과, 크랙이 발생하지 않으면 이웃 노드들을 이용하여 생성된 2개의 삼각형으로 구성된 블록 메시이고, 크랙이 발생하면 이웃 노드들을 이용하여 생성된 4개의 삼각형으로 구성 된 블록 메시이다. 도 12는 패치를 생성하는 모습을 나타낸다. GS에선 각 삼각형들을 입력받아 이웃검사를 한 번씩만 한다. 이웃은 도 11의 AB의 중점에서 AT 혹은 BT의 길이만큼 AB에 수직한 정점으로 계산한다. 이 이웃노드가 더 탐색이 가능하다면 T-정점이 발견된 위치를 기준으로 삼각형을 2조각으로 쪼갠다. 이 결과를 트리의 Lmax - 1번 반복해주어 발생할 모든 크랙에 대해서 패치를 생성해 준다. 그러나 만약 관측자와의 거리만 고려하였다면 이웃과의 상세 레벨 차이는 1 이상 나지 않는다. 그러므로 관측자와의 거리만 고려한 경우에는 1번만 수행하여 연산량을 줄인다. 도 13은 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 크랙이 제거된 모습을 나타낸 도면이다.Step S334 is a process of generating a patch by repeating step S332 at the maximum level L max of the photo tree-one time, wherein the generated patch uses neighboring nodes if no crack occurs as a result of the determination in step S330. It is a block mesh composed of two triangles, and when a crack occurs, it is a block mesh composed of four triangles created using neighboring nodes. 12 shows how to create a patch. In GS, each triangle is input and the neighbor test is performed only once. Neighbors are computed as vertices perpendicular to AB by the length of AT or BT at the midpoint of AB in FIG. If this neighbor can be further explored, the triangle is split into two pieces based on where the T-vertex is found. Repeat this result L max -1 time in the tree to create a patch for every crack that will occur. However, if only the distance from the observer is taken into account, the level of detail difference from the neighbor is not more than one. Therefore, if only the distance from the observer is taken into account, it is executed only once to reduce the amount of computation. FIG. 13 is a diagram illustrating a state in which a crack is removed in a photo tree-based terrain rendering method using a GPU according to an embodiment of the present invention.

단계 S400은, 단계 S300에서 패치된 블록들로 구성된 메시에 고도 필드(height field)에 저장된 높이 값을 적용하고, 노말 맵으로 쉐이딩(shading)하여 지형 영상으로 렌더링한다.In operation S400, a height value stored in a height field is applied to a mesh composed of blocks fetched in operation S300, and shaded with a normal map to render a terrain image.

본 발명은 Intel Core2Duo E8400 CPU에 4GB main memory 를 갖는 시스템에서 수행되었다. 그래픽스 하드웨어는 1GB의 Video memory를 갖는 nVidia 9800GTX(+)를 사용하였고, DirectX 10 라이브러리와 Shader4.0모델을 사용하였다. viewport의 크기는 1024768로 하였으며, Puget Sound(20492049)와 Grand Canyon(20492049) Data를 사용하였다.The present invention was performed in a system with 4GB main memory in the Intel Core2Duo E8400 CPU. The graphics hardware uses nVidia 9800GTX (+) with 1GB of video memory, DirectX 10 library and Shader 4.0 model. Viewport size was 1024768 and Puget Sound (20492049) and Grand Canyon (20492049) data were used.

다음 표 1은 Puget Sound(20492049)를 렌더링 시에 임계값(Threshold)에 따른 프레임, 삼각형(triangle)수 그리고 CPU의 이용 빈도들의 변화를 나타낸다. 이 값들은 카메라의 이동에 따라 바뀌므로 같은 시점에서 바라본 경우를 체크했다.Table 1 below shows the change in the frame, the number of triangles, and the frequency of use of the CPU according to a threshold when rendering the Puget Sound 20492049. These values change as the camera moves, so we checked the view from the same point of view.

ThresholdThroshold FPSFPS TriangleTriangle CPU 이용율CPU utilization 2000020000 236236 24k24k 2%2% 3000030000 139139 46k46k 1%One% 4000040000 101101 65k65k 1%One% 5000050000 7474 78k78k 0%0% 6000060000 6060 102k102k 0%0% 7000070000 4545 130k130k 0%0%

도 14는 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 74 프레임을 보이는 Threshold=5000의 스크린 샷을 나타낸 도면이다. Threshold 값이 늘어나면 상세단계 간격이 커져 정교한 지형을 렌더링할 수 있게 되고 값을 줄이면 상세단계 간격이 촘촘해져 상대적으로 덜 세밀한 지형이 생성된다. CPU에서는 카메라 행렬과 관측 평면(View plane)을 매 프레임 생성을 하기 때문에 GPU에서 하는 연산을 줄여 Frame rate를 높이면 CPU의 사용빈도가 높아진다.FIG. 14 is a diagram illustrating a screen shot of Threshold = 5000 showing 74 frames in a phototree-based terrain rendering method using a GPU according to an embodiment of the present invention. Increasing the Threshold value increases the detail level spacing to render fine terrain, and decreasing the value narrows the detail level spacing to produce relatively less detailed terrain. Since the CPU generates the camera matrix and the view plane every frame, increasing the frame rate by reducing the operation performed by the GPU increases the frequency of CPU usage.

VS는 생성된 vertex들의 geometry morphing, PS는 normal-map을 이용한 shading에만 사용된다. 즉, VS와 PS는 총 4개의 pass중에서 마지막 1개의 Pass에서만 사용되므로 활용빈도가 낮다. 이에 반하여, GS는 총 3개의 패스에서 사용이 되며 SO를 통한 반복수행도 많기 때문에 가장 활용 비율이 높다.VS is only used for geometry morphing of the generated vertices, and PS is used only for shading using normal-maps. That is, VS and PS are used only in the last one of a total of four passes, so the utilization is low. On the other hand, GS is the most utilized since it is used in a total of three passes and there are many iterations through SO.

다음 표 2와 표 3은 LOD 방법에 따른 성능차이를 비교한 것이다. 표 3의 threshold값은 표 2의 threshold값을 표면거칠기(e)값으로 나눈 숫자이다. 사진트리 텍스처에 저장된 표면거칠기값들의 평균이 0.00231이므로 대략 400배를 해준 값으로 비교하였다. 표면거칠기가 적용된 경우 적용되지 않은 경우에 비하여 Threshold의 변화에 따른 삼각형 개수와 FPS의 변화폭이 안정적인 수치를 보였다. 렌더링 수행 중에도 geometry popping이 표면거칠기를 적용한 방법이 훨씬 적게 나타났다. 하지만 표면 거칠기를 고려하기 위해 사진트리 텍스처에 접근하는 과정이 추가가 되었기 때문에 같은 triangle 수를 렌더링했을 때 렌더링 속도가 관측자와의 거리만 고려한 방법보다 떨어진다.Table 2 and Table 3 compare the performance differences according to the LOD method. The threshold value in Table 3 is the number obtained by dividing the threshold value in Table 2 by the surface roughness ( e ). Since the average of the surface roughness values stored in the photo tree texture is 0.00231, the comparison was made with a value of approximately 400 times. When the surface roughness was applied, the number of triangles and the variation of FPS were more stable than the thresholds. Much less geometry popping applied surface roughness during rendering. However, since the process of accessing the photo tree texture has been added to take into account the surface roughness, the rendering speed is lower than the method considering only the distance to the observer when rendering the same triangle number.

ThresholdThroshold TriangleTriangle FPSFPS CPU 이용율 CPU utilization 100100 10k10k 327327 3%3% 200200 65k65k 143143 1%One% 300300 85k85k 7676 0%0% 400400 130k130k 5555 0%0% 500500 200k200k 3434 0%0% 600600 260k260k 2424 0%0%

ThresholdThroshold TriangleTriangle FPSFPS CPU 이용율 CPU utilization 4000040000 45k45k 102102 1%One% 5000050000 56k56k 7878 0%0% 6000060000 70k70k 6565 0%0% 7000070000 85k85k 5252 0%0% 8000080000 110k110k 4646 0%0% 9000090000 125k125k 3636 0%0%

도 15는 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 LOD 방식에 따른 결과 이미지를 나타낸 도면이다. 여기서 (a)는 시각 종속적 LOD만 적용된 (2049 x 2049) puget sound의 모습이고, (b)는 표면거칠기가 고려된 (2049 x 2049) puget sound의 모습이다. 여기서 상단 (a)image는 threshold가 작을 때의 결과이고 하단 (b)image는 threshold를 크게 했을 때의 결과이다. 본 발명에 따른 사진 트리 기반 지형을 그래픽스 하드웨어의 렌더링 pipeline만으로 시각화하는 방법에 의하면 Shader Model 4.0의 GS와 SO를 통하여 parallel하게 트리 탐색을 하여 GPU만을 이용하여 사진트리 기반의 지형 모델을 렌더링할 수 있음을 확인할 수 있었다.FIG. 15 is a diagram illustrating a resultant image according to an LOD method in a photo tree-based terrain rendering method using a GPU according to an embodiment of the present invention. Where (a) is the (2049 x 2049) puget sound with only visually dependent LOD applied, and (b) is the (2049 x 2049) puget sound with surface roughness considered. The upper (a) image is the result when the threshold is small and the lower (b) image is the result when the threshold is increased. According to the method of visualizing a photo tree-based terrain using only the rendering pipeline of graphics hardware according to the present invention, the tree can be rendered parallel using GS and SO of Shader Model 4.0 to render a photo tree-based terrain model using only a GPU. Could confirm.

이상 설명한 본 발명은 본 발명이 속한 기술분야에서 통상의 지식을 가진 자에 의하여 다양한 변형이나 응용이 가능하며, 본 발명에 따른 기술적 사상의 범위는 아래의 특허청구범위에 의하여 정해져야 할 것이다.The present invention described above may be variously modified or applied by those skilled in the art, and the scope of the technical idea according to the present invention should be defined by the following claims.

도 1은 본 발명의 일실시예에 따른 그래픽스 처리 유닛(Graphics Processing Unit, 이하 GPU)을 이용한 사진트리 기반의 지형 렌더링 방법의 흐름도.1 is a flowchart of a photo-tree based terrain rendering method using a graphics processing unit (GPU) according to an embodiment of the present invention.

도 2는 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 생성되는 사진트리 텍스처를 나타낸 도면.2 is a diagram illustrating a photo tree texture generated in a photo tree-based terrain rendering method using a GPU according to an embodiment of the present invention.

도 3은 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 블록에 포함된 정점 및 기하오차값을 나타낸 도면.3 is a view showing vertices and geometric error values included in blocks in a photo-tree-based terrain rendering method using a GPU according to an embodiment of the present invention.

도 4는 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 블록의 크기에 따라 가중치가 부여된 모습을 나타낸 도면.4 is a diagram showing a weighted value according to a block size in a photo-tree based terrain rendering method using a GPU according to an embodiment of the present invention.

도 5는 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 시점 거리를 갖는 상세단계(LOD)의 와이어프레임의 이미지를 나타낸 도면.5 is a view showing an image of a wireframe of a detailed step (LOD) having a viewpoint distance in the photo-tree-based terrain rendering method using a GPU according to an embodiment of the present invention.

도 6은 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 표면거칠기값이 적용된 연속 상세단계(CLOD)에서의 이미지를 나타낸 도면.FIG. 6 is a view showing an image in a continuous detail step (CLOD) to which surface roughness values are applied in a photo-tree based terrain rendering method using a GPU according to an embodiment of the present invention. FIG.

도 7은 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 가시 정점을 생성하는 방법을 나타낸 흐름도.7 is a flowchart illustrating a method of generating visible vertices in a photo tree-based terrain rendering method using a GPU according to an embodiment of the present invention.

도 8은 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 메시 생성 시에 각 노드들 간의 레벨 차로 인하여 크랙이 발생한 것을 나타낸 도면.8 is a view showing that a crack occurs due to a level difference between nodes when generating a mesh in a phototree-based terrain rendering method using a GPU according to an embodiment of the present invention.

도 9는 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 크랙 제거를 위한 패치를 생성하여 블록을 변환하는 과정을 나타낸 흐름도.9 is a flowchart illustrating a process of converting a block by generating a patch for removing a crack in a photo-tree-based terrain rendering method using a GPU according to an embodiment of the present invention.

도 10은 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 크랙의 발생 여부에 따라 각각 생성되는 패치를 나타낸 도면.FIG. 10 is a view illustrating patches generated according to whether cracks are generated in a photo tree-based terrain rendering method using a GPU according to an embodiment of the present invention. FIG.

도 11은 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 이웃 체크(Neighbor Check)로 찾는 T-정점(T-vertex)를 나타낸 도면.FIG. 11 is a diagram illustrating a T-vertex searched by a neighbor check in a phototree-based terrain rendering method using a GPU according to an embodiment of the present invention.

도 12는 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 패치가 생성되는 과정을 나타낸 흐름도 및 도면.12 is a flowchart and a diagram illustrating a process of generating a patch in a photo tree-based terrain rendering method using a GPU according to an embodiment of the present invention.

도 13은 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 크랙이 제거된 모습을 나타낸 도면.FIG. 13 is a view illustrating a state in which cracks are removed in a photo tree-based terrain rendering method using a GPU according to an embodiment of the present invention. FIG.

도 14는 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 74 프레임을 보이는 threshold = 5000의 스크린 샷을 나타낸 도면.FIG. 14 is a diagram illustrating a screen shot of threshold = 5000 showing 74 frames in a photo-tree-based terrain rendering method using a GPU according to an embodiment of the present invention. FIG.

도 15는 본 발명의 일실시예에 따른 GPU를 이용한 사진트리 기반의 지형 렌더링 방법에서 LOD 방식에 따른 결과 이미지를 나타낸 도면.15 is a view showing a resultant image according to the LOD method in the photo-tree-based terrain rendering method using a GPU according to an embodiment of the present invention.

<도면 중 주요 부분에 대한 부호의 설명><Explanation of symbols for main parts of the drawings>

S100 : 사진트리 텍스처(quadtree texture)와 쉐이딩(shading)을 위한 노말 맵(Normal Map)을 생성하는 단계S100: step of generating a normal map for quadtree texture and shading

S200 : 복수의 가시 정점(visible vertices)들을 생성하는 단계S200: generating a plurality of visible vertices

S300 : 가시 정점들로 구성된 블록을 변환하는 단계S300: transforming a block composed of visible vertices

S400 : 구성된 메시에 높이 값을 적용하고, 지형 영상으로 렌더링하는 단계S400: applying a height value to the constructed mesh and rendering the terrain image

Claims (5)

그래픽스 처리 유닛(Graphics Processing Unit, 이하 GPU)을 이용한 사진트리 기반의 지형 렌더링 방법으로서,A phototree based terrain rendering method using a graphics processing unit (GPU), (1) 상세단계(LOD) 조절을 위한 표면거칠기값을 포함하는 사진트리 텍스처(quadtree texture)와 쉐이딩(shading)을 위한 노말 맵(Normal Map)을 생성하는 단계;(1) generating a quadtree texture including a surface roughness value for adjusting the LOD and a normal map for shading; (2) 상세단계(LOD) 선택을 통해 각 블록에 포함된 지형을 구성할 노드들을 탐색하고, 각 노드들에 대한 정점(Vertex)들을 사진트리로 증식시키며 복수의 가시 정점(visible vertices)들을 생성하는 단계;(2) Searching for nodes that will make up the terrain included in each block through LOD selection, multiplying vertices for each node into the photo tree, and creating a plurality of visible vertices Making; (3) 상기 생성된 복수의 가시 정점들로부터 삼각 메시를 생성하고, 상기 생성된 메시들 간의 이웃 노드 검사를 통해 크랙 제거를 위한 패치를 생성하여 상기 생성된 메시를 패치된 블록 메시로 변환하는 단계; 및(3) generating a triangular mesh from the generated plurality of visible vertices, generating a patch for crack removal by inspecting neighbor nodes between the generated meshes, and converting the generated mesh into a patched block mesh ; And (4) 상기 패치된 블록들로 구성된 삼각 메시에 고도 필드로부터 높이 값을 적용하고, 노말 맵으로 쉐이딩 하여 지형 영상으로 렌더링 하는 단계(4) applying a height value from an altitude field to the triangular mesh composed of the patched blocks, shading as a normal map and rendering the terrain image; 를 포함하는 것을 특징으로 하는 GPU를 이용한 사진트리 기반의 지형 렌더링 방법.Photo-tree-based terrain rendering method using a GPU comprising a. 제1항에 있어서, 상기 사진트리 텍스처는, 상기 사진트리를 구성하는 각 노드(node)마다의 블록의 레벨, 높이 값, 및 표면거칠기값(σ)을 포함하고,The photographic tree texture of claim 1, wherein the phototree texture comprises a level, a height value, and a surface roughness value σ of each node constituting the phototree. 상기 표면거칠기값(σ)은, 다음 수학식을 만족하는 것을 특징으로 하는 GPU를 이용한 사진트리 기반의 지형 렌더링 방법.The surface roughness value (σ) satisfies the following equation, wherein the terrain rendering method based on a photo tree using a GPU.
Figure 112009037271474-pat00009
Figure 112009037271474-pat00009
여기서, δ는 사진트리에서 상위 단계의 정점(vn)과 하위 단계의 에지의 중점(vn')에 대한 고도 차이를 나타내는 기하 오차 값이고, l은 블록의 레벨, k는 사진트리의 레벨 단계를 각각 나타내며, 상기 기하 오차 값(δ)은, 다음 수학식을 만족한다.Here, δ is a geometric error value representing an altitude difference between the vertex of the upper stage (vn) and the midpoint (vn ') of the lower stage of the photo tree, l is the level of the block, k is the level level of the photo tree. Respectively, the geometric error value δ satisfies the following equation.
Figure 112009037271474-pat00010
Figure 112009037271474-pat00010
여기서, vn은 사진트리에서 각 블록마다의 상위 단계 정점의 높이 값을 나타내고, vn'은 하위 단계의 에지의 중점에 대한 높이 값을 나타내며, w는 블록의 레벨에 따른 가중치를 나타낸다. 또한, l은 블록의 레벨, k는 사진트리의 레벨 단계를 각각 나타낸다.Here, vn represents the height value of the upper stage vertex for each block in the photo tree, vn 'represents the height value of the midpoint of the edge of the lower stage, w represents the weight according to the level of the block. Where l represents the level of the block and k represents the level of the photo tree.
제1항에 있어서, 상기 렌더링 파이프라인은, 기하 음영 단계(Geometry Shader stage, 이하 GS) 및 스트림 출력 단계(Stream Output stage, 이하 SO)를 포 함하고,The method of claim 1, wherein the rendering pipeline comprises a geometry shader stage (GS) and a stream output stage (SO), 복수의 가시 정점들을 생성하는 상기 단계 (2)는,The step (2) of generating a plurality of visible vertices, (a) 상기 렌더링 파이프라인의 초기 값으로 상기 사진트리의 루트 노드에 해당하는 단일 정점을 입력받는 단계;(a) receiving a single vertex corresponding to a root node of the photo tree as an initial value of the rendering pipeline; (b) 상기 GS에서 상기 입력받은 단일 정점이 각각의 노드에 대해 상위 레벨로의 탐색 여부를 판별하는 플래그 값(f)에 따른 탐색 조건을 만족하는지 상세단계(LOD) 선택을 하는 단계;(b) selecting a detailed step (LOD) to determine whether the single vertex received by the GS satisfies a search condition according to a flag value f for determining whether to search for each node to a higher level; (c) 상기 상세단계(LOD) 선택 결과, 상기 단일 정점이 탐색 조건을 만족하지 않으면 상기 단일 정점을 기준으로 분할되는 4개의 서브블록의 중점에 자식 노드들의 정점을 생성하고, 상기 단일 정점 자신은 삭제하는 단계;(c) As a result of the LOD selection, if the single vertex does not satisfy the search condition, a vertex of child nodes is generated at a midpoint of four subblocks divided based on the single vertex, and the single vertex itself is Deleting; (d) 상기 단계 (c)의 결과를 SO(Stream Output stage)를 통해 1차원 버퍼에 저장하는 단계; 및(d) storing the result of step (c) in a one-dimensional buffer through a stream output stage (SO); And (e) 각 블록들이 위치할 장소에 각 블록의 레벨을 지정한 정점들을 생성하기 위하여 상기 저장된 결과를 다시 상기 렌더링 파이프라인으로 제공하여 상기 각 자식 노드들의 정점마다 생성해야 하는 사진트리의 깊이만큼 상기 단계 (a) 내지 단계 (d)의 과정을 반복 수행하는 단계를 포함하는 것을 특징으로 하는 GPU를 이용한 사진트리 기반의 지형 렌더링 방법.(e) providing the stored result back to the rendering pipeline in order to generate vertices specifying the level of each block in the place where each block is to be located, by the depth of the photo tree to be generated for each vertex of each child node. Photo-based terrain rendering method using a GPU comprising the steps of (a) to (d) to repeat the process. 제1항에 있어서, 상기 렌더링 파이프라인은, 기하 음영 단계(Geometry Shader stage, 이하 GS) 및 스트림 출력 단계(Stream Output stage, 이하 SO)를 포함하고,The method of claim 1, wherein the rendering pipeline includes a geometry shader stage (GS) and a stream output stage (SO), 상기 단계 (3)은,Step (3), (f) 상기 생성된 복수의 가시 정점들이 나타내는 블록의 상하좌우에 위치한 동일한 레벨의 블록을 갖는 4개의 이웃 정점들의 위치를 계산하는 단계;(f) calculating positions of four neighboring vertices having blocks of the same level located above, below, left and right of the block represented by the generated plurality of visible vertices; (g) 상기 위치가 계산된 이웃 정점들에 대하여 아래 수학식을 만족하는 플래그 값(f)을 이용하여 크랙 발생 여부를 판단하고, 상기 판단 결과에 따라 패치를 생성하여 상기 가시 정점들을 패치된 블록 메시로 변환하는 단계; 및(g) Determining whether or not a crack has occurred by using a flag value f that satisfies the following equation for neighboring vertices whose position is calculated, and generating a patch according to the determination result to patch the visible vertices. Converting to a mesh; And (h) 상기 변환된 블록 메시를 상기 SO를 통해 다시 상기 렌더링 파이프라인으로 피드백 시키는 단계를 포함하는 것을 특징으로 하는 GPU를 이용한 사진트리 기반의 지형 렌더링 방법.and (h) feeding back the transformed block mesh back to the rendering pipeline through the SO.
Figure 112009070705417-pat00011
Figure 112009070705417-pat00011
여기서, v는 view point, p는 경계구(boundary sphere of a region), λ는 미리 지정된 임계값, ℓ은 블록의 레벨을 나타내며, e는 표면거칠기값을 각각 나타낸다.Here, v denotes a view point, p denotes a boundary sphere of a region, λ denotes a predetermined threshold value, ℓ denotes a level of a block, and e denotes a surface roughness value.
제4항에 있어서, 상기 단계 (g) 중 패치를 생성하여 패치된 블록 메시로 변환하는 단계는,The method of claim 4, wherein the generating of the patch in step (g) and converting the patch into a patched block mesh comprises: (i) 상기 위치가 계산된 이웃 정점들에 해당하는 각 삼각형(triangle)들을 입력받아 이웃 노드 검사를 실시한 결과, 크랙이 발생한 경우에는 T-정점이 발견된 위치를 기준으로 상기 삼각형을 2조각으로 쪼개는 단계; 및(i) As a result of performing neighbor node inspection by receiving triangles corresponding to the neighboring vertices whose position is calculated, when the crack occurs, the triangle is divided into two pieces based on the position where the T-vertex is found. Splitting step; And (j) 상기 단계(i)을 상기 사진 트리의 최대 레벨(Lmax) - 1 번 반복하여 패치를 생성하는 단계를 포함하고,(j) repeating step (i) to generate a patch by repeating the maximum level (L max ) -one time of the photo tree, 상기 패치는,The patch, 상기 단계 (g)에서의 판단 결과, 크랙이 발생하지 않으면 상기 이웃 노드들을 이용하여 생성된 2개의 삼각형으로 구성된 블록 메시이고, 크랙이 발생하면 상기 이웃 노드들을 이용하여 생성된 4개의 삼각형으로 구성된 블록 메시인 것을 특징으로 하는 GPU를 이용한 사진트리 기반의 지형 렌더링 방법.As a result of the determination in step (g), if a crack does not occur, the block mesh is composed of two triangles generated using the neighboring nodes, and if a crack occurs, the block is composed of four triangles generated using the neighboring nodes. Photo-tree-based terrain rendering method using GPU, characterized in that the mesh.
KR1020090054960A 2009-06-19 2009-06-19 A method for terrain rendering based on a quadtree using graphics processing unit KR100935886B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020090054960A KR100935886B1 (en) 2009-06-19 2009-06-19 A method for terrain rendering based on a quadtree using graphics processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020090054960A KR100935886B1 (en) 2009-06-19 2009-06-19 A method for terrain rendering based on a quadtree using graphics processing unit

Publications (1)

Publication Number Publication Date
KR100935886B1 true KR100935886B1 (en) 2010-01-07

Family

ID=41809562

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020090054960A KR100935886B1 (en) 2009-06-19 2009-06-19 A method for terrain rendering based on a quadtree using graphics processing unit

Country Status (1)

Country Link
KR (1) KR100935886B1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976468A (en) * 2010-10-22 2011-02-16 中国科学院软件研究所 Method and system for visualizing multiresolution dynamic landform
KR101417714B1 (en) 2014-03-04 2014-07-16 인하대학교 산학협력단 Acceleration method of quad-tree triangulation for realtime terrain rendering using bimodal vertex splitting method
KR101491896B1 (en) 2013-02-18 2015-02-11 인하대학교 산학협력단 Method for terrain rendering using bimodal vertex splitting
KR101555426B1 (en) * 2014-02-07 2015-09-25 고려대학교 산학협력단 Method and apparatus for rendering terrain
KR20200055841A (en) * 2018-11-12 2020-05-22 한국전자통신연구원 Learning data set generating apparatus and method for machine learning
CN111507926A (en) * 2020-04-30 2020-08-07 九江精密测试技术研究所 Max L OD Map-based quadtree terrain crack repairing method
CN112862968A (en) * 2021-03-15 2021-05-28 网易(杭州)网络有限公司 Rendering display method, device and equipment of target vegetation model and storage medium
KR20220130925A (en) * 2021-03-19 2022-09-27 인하대학교 산학협력단 Method for realtime terrain modeling and rendering using hierarchical vertex cohesion map
CN114419256B (en) * 2022-01-24 2024-01-23 正元地理信息集团股份有限公司 Urban level BIM data light weight method and system based on multistage shell extraction algorithm

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060128803A (en) * 2006-11-24 2006-12-14 인하대학교 산학협력단 An improved method for selecting level-of-details using viewpoint adjustment in stereoscopic terrain visualization
KR20060131703A (en) * 2006-11-24 2006-12-20 인하대학교 산학협력단 An improved method for culling view frustum in stereoscopic terrain visualization

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060128803A (en) * 2006-11-24 2006-12-14 인하대학교 산학협력단 An improved method for selecting level-of-details using viewpoint adjustment in stereoscopic terrain visualization
KR20060131703A (en) * 2006-11-24 2006-12-20 인하대학교 산학협력단 An improved method for culling view frustum in stereoscopic terrain visualization

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976468A (en) * 2010-10-22 2011-02-16 中国科学院软件研究所 Method and system for visualizing multiresolution dynamic landform
CN101976468B (en) * 2010-10-22 2012-09-19 中国科学院软件研究所 Method and system for visualizing multiresolution dynamic landform
KR101491896B1 (en) 2013-02-18 2015-02-11 인하대학교 산학협력단 Method for terrain rendering using bimodal vertex splitting
KR101555426B1 (en) * 2014-02-07 2015-09-25 고려대학교 산학협력단 Method and apparatus for rendering terrain
US9959670B2 (en) 2014-02-07 2018-05-01 Korea University Research And Business Foundation Method for rendering terrain
KR101417714B1 (en) 2014-03-04 2014-07-16 인하대학교 산학협력단 Acceleration method of quad-tree triangulation for realtime terrain rendering using bimodal vertex splitting method
KR20200055841A (en) * 2018-11-12 2020-05-22 한국전자통신연구원 Learning data set generating apparatus and method for machine learning
KR102286037B1 (en) * 2018-11-12 2021-08-05 한국전자통신연구원 Learning data set generating apparatus and method for machine learning
CN111507926A (en) * 2020-04-30 2020-08-07 九江精密测试技术研究所 Max L OD Map-based quadtree terrain crack repairing method
CN111507926B (en) * 2020-04-30 2023-12-12 九江精密测试技术研究所 Quadtree terrain crack repairing method based on MaxLOD Map
CN112862968A (en) * 2021-03-15 2021-05-28 网易(杭州)网络有限公司 Rendering display method, device and equipment of target vegetation model and storage medium
CN112862968B (en) * 2021-03-15 2024-01-19 网易(杭州)网络有限公司 Rendering display method, device and equipment of target vegetation model and storage medium
KR20220130925A (en) * 2021-03-19 2022-09-27 인하대학교 산학협력단 Method for realtime terrain modeling and rendering using hierarchical vertex cohesion map
KR102497535B1 (en) 2021-03-19 2023-02-08 인하대학교 산학협력단 Method for realtime terrain modeling and rendering using hierarchical vertex cohesion map
CN114419256B (en) * 2022-01-24 2024-01-23 正元地理信息集团股份有限公司 Urban level BIM data light weight method and system based on multistage shell extraction algorithm

Similar Documents

Publication Publication Date Title
KR100935886B1 (en) A method for terrain rendering based on a quadtree using graphics processing unit
KR100959349B1 (en) A method for accelerating terrain rendering based on quadtree using graphics processing unit
US8810590B2 (en) Method and apparatus for spatial binning on a GPU and global path planning to avoid spatially binned objects
EP3080781B1 (en) Image rendering of laser scan data
US8411088B2 (en) Accelerated ray tracing
JP5371221B2 (en) Slice data structure for particle method simulation, and method for implementing particle method simulation on GPU using slice data structure
US9928643B2 (en) Hierarchical continuous level of detail for three-dimensional meshes
US20100289799A1 (en) Method, system, and computer program product for efficient ray tracing of micropolygon geometry
KR101555426B1 (en) Method and apparatus for rendering terrain
Ernst et al. Early split clipping for bounding volume hierarchies
Shopf et al. March of the Froblins: simulation and rendering massive crowds of intelligent and detailed creatures on GPU
US9123162B2 (en) Integration cone tracing
JP2017199354A (en) Rendering global illumination of 3d scene
Lee et al. Geometry splitting: an acceleration technique of quadtree-based terrain rendering using GPU
Favorskaya et al. Rendering of wind effects in 3D landscape scenes
KR20160068204A (en) Data processing method for mesh geometry and computer readable storage medium of recording the same
Lee et al. Bimodal vertex splitting: Acceleration of quadtree triangulation for terrain rendering
Chang et al. Hierarchical simplification of city models to maintain urban legibility.
Kuder et al. Point-based rendering optimization with textured meshes for fast LiDAR visualization
KR101228118B1 (en) Method for constructing a Kd-tree based on polygon importance
Masood et al. A novel method for adaptive terrain rendering using memory-efficient tessellation codes for virtual globes
Li Real-world large-scale terrain model reconstruction and real-time rendering
Shakaev et al. View-Dependent Level of Detail for Real-Time Rendering of Large Isosurfaces
CN111729303B (en) Large map baking and cutting method and restoration method
Cui Procedural cave generation

Legal Events

Date Code Title Description
A201 Request for examination
A302 Request for accelerated examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20121217

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20130913

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20140818

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20151001

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20160912

Year of fee payment: 8