KR20090020924A - Method and apparatus for ray tracing using adaptive multi-hierarchy kd-tree algorithm in 3d ray tracing system - Google Patents

Method and apparatus for ray tracing using adaptive multi-hierarchy kd-tree algorithm in 3d ray tracing system Download PDF

Info

Publication number
KR20090020924A
KR20090020924A KR1020070085564A KR20070085564A KR20090020924A KR 20090020924 A KR20090020924 A KR 20090020924A KR 1020070085564 A KR1020070085564 A KR 1020070085564A KR 20070085564 A KR20070085564 A KR 20070085564A KR 20090020924 A KR20090020924 A KR 20090020924A
Authority
KR
South Korea
Prior art keywords
data structure
acceleration data
tree
node
group node
Prior art date
Application number
KR1020070085564A
Other languages
Korean (ko)
Other versions
KR100903777B1 (en
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 KR1020070085564A priority Critical patent/KR100903777B1/en
Publication of KR20090020924A publication Critical patent/KR20090020924A/en
Application granted granted Critical
Publication of KR100903777B1 publication Critical patent/KR100903777B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/06Ray-tracing
    • 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
    • G06T9/00Image coding
    • G06T9/40Tree coding, e.g. quadtree, octree

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

A method and an apparatus for tracing a ray by using adaptive multi-hierarchy kd tree algorithm in a 3d ray tracing system are provided to reflect changed contents to the entire tree by updating only a sub tree which is affected due to a change of geographic information, thereby shortening an update time. An acceleration data structure generating unit(410) produces an adaptive multi-hierarchy acceleration data structure of binary space division like a kd-tree data structure. An acceleration data structure searcher(420) regards a group node as a primitive of one bounding type to perform a cross check with a ray if the acceleration data structure searcher meets the group node during a search process. If an acceleration data structure update unit(440) does not update the entire acceleration data structure which is generated, only data structure information to which an object having changed geographic information belongs is updated.

Description

3차원 광선 추적 시스템에서 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 방법 및 장치{METHOD AND APPARATUS FOR RAY TRACING USING ADAPTIVE MULTI-HIERARCHY KD-TREE ALGORITHM IN 3D RAY TRACING SYSTEM}Ray Tracing Method and Apparatus Using Adaptive Multi-Layer Cady-Tree Structure Algorithm in 3D Ray Tracing System

본 발명은 3차원 광선 추적 시스템에 관한 것으로서, 더욱 상세하게는 3차원 동적 영상을 위한 광선추적 시스템에 사용될 수 있는 적응형 다중 계층 케이디-트리 구조 알고리즘과 이를 이용한 광선 추적 방법 및 장치에 관한 것이다.The present invention relates to a three-dimensional ray tracing system, and more particularly, to an adaptive multi-layer Cady-tree structure algorithm that can be used in a ray tracing system for three-dimensional dynamic image, and a ray tracing method and apparatus using the same.

일반적으로, 3차원 광선추적 시스템은 고 수준의 3차원 영상을 생성할 수 있는 기술이다. 이 기술은 그 알고리즘의 특성상 고 수준의 영상을 생성하기 위해 극단적인 연산 시간을 필요로 한다. 이로 인해 대부분의 3차원 광선추적 시스템은 가속 자료구조를 이용해 영상 생성시간을 절약한다. 이러한 가속 자료구조로는 kd-tree([J. L. Bentley, “Multidimensional binary search tree used for associative searching," Communications of the ACM, Vol. 9 pp 509-517, 1975]), octree, Bounding Volume Hierarchy (BVH)등과 같은 다양한 기술들이 존재한다.In general, the three-dimensional ray tracing system is a technology that can generate a high-level three-dimensional image. This technique requires extreme computational time to produce high quality images due to the nature of the algorithm. As a result, most 3D ray tracing systems use accelerated data structures to save image generation time. Such accelerated data structures include kd-tree (JL Bentley, “Multidimensional binary search tree used for associative searching,” Communications of the ACM, Vol. 9 pp 509-517, 1975]), octree, Bounding Volume Hierarchy (BVH) Various techniques exist, such as.

상기 kd-tree 자료구조는 평균수행 능력이 가장 뛰어난 가속 자료구조로서 사용된다[D. S. Fussell, K. R. Subramanian, "Fast Ray Tracing Using K-d Trees," University of Texas at Austin : Techinical Report CS-TR-88-07, 1988].The kd-tree data structure is used as the acceleration data structure having the best average performance [D. S. Fussell, K. R. Subramanian, "Fast Ray Tracing Using K-d Trees," University of Texas at Austin: Techinical Report CS-TR-88-07, 1988].

상기 kd-tree 자료구조는 움직이는 3차원 영상을 만들기 위한 3가지의 중요한 단계로 구성된다. The kd-tree data structure consists of three important steps for creating a moving three-dimensional image.

첫 번째는 3차원공간을 kd-tree 자료 구조로 구축하기 위한 과정인 kd-tree 생성 단계이고, 두 번째는 kd-tree를 이용하여 광선과 그 공간에 속한 물체들과의 교차 여부 및 교차 위치를 찾아내기 위한 kd-tree 탐색 단계이며, 그리고 마지막으로 만약 3차원 공간 내의 물체들의 크기, 위치 등과 같은 지형 정보가 변형되었을 때 이 변경정보를 kd-tree에 적용시키기 위한 kd-tree 업데이트 단계이다.The first is the kd-tree generation step, which is a process for constructing a 3D space into a kd-tree data structure. The second is using kd-tree to determine the intersection and location of the rays and objects in the space. This is a kd-tree search step to find and finally, a kd-tree update step to apply this change information to the kd-tree when the terrain information such as the size and position of objects in the 3D space is deformed.

상기 kd-tree 생성 단계는 3차원 공간에 대해 x,y,z 3개의 좌표축 중 임의의 비용계산함수 값이 최소가 되는 하나의 축과 그 축에 수직인 분할 평면을 기준으로 두 개의 공간으로 나누고, 이렇게 나누어진 공간은 임의의 기준에 부합할 때 까지 재귀적으로 반복 분할하는 것이다. 반복 분할된 공간 중 더 이상 나누어지지 않는 단말노드는 자신의 공간 내에 존재하는 물체들에 대한 참조를 저장한다. 이렇게 생성된 kd-tree는 광선과 가장 처음 교차하는 물체를 찾기 위해 kd-tree의 루트(root)노드에서 탐색을 시작한다.The kd-tree generation step is divided into two spaces based on one axis having a minimum cost calculation function value among three coordinate axes of x, y, z coordinates for a three-dimensional space and a split plane perpendicular to the axis. In this way, the space is divided recursively until it meets certain criteria. The terminal node, which is no longer divided among the repeated divided spaces, stores a reference to objects existing in its space. The generated kd-tree starts its search at the root node of the kd-tree to find the first object that intersects the ray.

도 1은 kd-tree 탐색 방법을 나타내는 순서도이다.1 is a flowchart illustrating a kd-tree search method.

도 1을 참조하면, kd-tree 탐색 방법은 먼저, 루트노드의 두 자식노드 중 교차되는 자식노드를 찾고 이 노드에서 앞의 과정을 재귀적 방법으로 계속 탐색해 내려간다. Referring to FIG. 1, the kd-tree search method first finds an intersecting child node among two child nodes of a root node, and continues searching for the previous process in this node in a recursive manner.

만일, 두 개의 자식노드가 모두 광선과 교차하면 광선과 나중에 만나는 자식노드를 스텍(stack)에 저장하고 먼저 만나는 자식노드에 대하여 탐색을 계속한다. 최종적으로 단말노드에 도착하면 광선과 그 단말노드가 참조하고 있는 물체들의 교차검사를 수행해 가장 먼저 교차하는 물체를 찾는다. 만일, 가장 교차하는 물체를 찾지 못하면 stack에서 하나의 노드를 꺼내 동일한 과정을 통하여 탐색을 계속한다.If both child nodes intersect a ray, store the child node that meets the ray later on the stack and continue searching for the first child node that meets the ray. Finally, when arriving at the terminal node, cross-checking the beam and the objects referenced by the terminal node is performed to find the object that crosses first. If no intersecting object is found, one node is removed from the stack and the search continues through the same process.

도 2a 및 도 2b는 kd-tree 자료 구조의 노드 탐색 방법을 설명하기 위한 예시도이다.2A and 2B are exemplary diagrams for explaining a node searching method of a kd-tree data structure.

도 2a 및 도 2b를 참조하면, S2 노드가 S1보다 광선의 시점에서 먼 위치에 있으므로 S2를 스택에 넣고 S1을 방문한다. 도 2에 도시된 바와 같이, 반복적으로 탐색을 진행하고, 만일 단말노드에 다다르면, 단말노드에 포함된 프리미티브(primitive)들에 대한 교차검사를 수행해 교차되는 프리미티브를 찾는다. 교차 되는 프리미티브를 찾지 못하면, 스택에서 탐색을 수행하지 않는 하나의 노드를 꺼내서 탐색을 다시 수행한다.2A and 2B, since the S2 node is located farther from the point of view of light than S1, S2 is placed in the stack and visited S1. As shown in FIG. 2, the search is repeatedly performed, and if the terminal node is reached, cross-checking of primitives included in the terminal node is performed to find an intersecting primitive. If we don't find any primitives that intersect, we do a search again by taking one node off the stack that doesn't perform the search.

상기한 바와 같이, 노드 탐색이 완료되면, 탐색 정보를 이용하여 하나의 장면을 화면에 그릴 수 있게 된다. As described above, when the node search is completed, one scene can be drawn on the screen using the search information.

상기 kd-tree 업데이트는 일반적으로 상기한 kd-tree 생성 단계를 다시 수행함으로써 이루어진다. kd-tree 업데이트 과정은 3차원 공간에 존재하는 물체 중 지형정보가 변경된 물체의 양에 관계없이 전체 kd-tree를 재구축하므로 매우 낮은 성능 효율을 보이게 된다.The kd-tree update is generally accomplished by performing the kd-tree generation step again. The kd-tree update process shows very low performance efficiency because the kd-tree update rebuilds the entire kd-tree regardless of the amount of the object whose terrain information has been changed.

종래기술 1, [J. Lext, and T. Akenine-Moller, “Towards rapid reconstruction for animated ray tracing.,” In Eurographics Short Presentations, pp 311-318. 2001]는, 상기한 성능 효율 문제를 해결하기 위하여, 각 장면마다 지속적으로 변화가 되는 동적 물체들과 그렇지 않은 정적 물체들을 구분하고 이들을 각각의 레귤라그리드(Regular Grid)방식의 자료구조로 구성함으로써 부분적인 업데이트가 가능하도록 하고 있다.Prior art 1, [J. Lext, and T. Akenine-Moller, “Towards rapid reconstruction for animated ray tracing.,” In Eurographics Short Presentations, pp 311-318. To solve the above performance efficiency problem, 2001] distinguishes dynamic objects that are constantly changing from scene to scene and static objects, and organizes them into data structures of a regular grid. Updates are made possible.

또한, 종래기술 2, [I. Wald, C. Benthin, P. Slusallek, "Distributed Interactive Ray Tracing of Dynamic Scenes," Proceedings of the 2003 IEEE Symposium on Parallel and Large-Data Visualization and Graphics, pp 11, 2003]는, kd-tree를 이용한 두 단계 계층적 자료구조를 사용한다. Also, prior art 2, [I. Wald, C. Benthin, P. Slusallek, "Distributed Interactive Ray Tracing of Dynamic Scenes," Proceedings of the 2003 IEEE Symposium on Parallel and Large-Data Visualization and Graphics, pp 11, 2003], two steps using kd-tree Use hierarchical data structures.

도 3에 도시된 바와 같이, 상기 종래 기술 2는 전체 3차원 공간에 존재하는 각 물체 또는 몇몇 물체 그룹들에 대하여 개별적인 가속 자료구조를 구성하고, 이들을 최상위 가속 자료구조의 각 단말노드로 구성함으로써 2레벨(level)의 가속 자료구조를 구성한다. As shown in FIG. 3, the prior art 2 configures a separate acceleration data structure for each object or some object groups existing in the entire three-dimensional space, and configures them as respective terminal nodes of the highest acceleration data structure. Construct a leveled acceleration data structure.

상기 종래기술 2의 문제점은 3차원 공간상에서 특정 공간에 물체들이 몰려 있거나 또는 각 물체들의 복잡도가 서로 상이할 경우에도 각 물체들이 모두 각각의 가속 자료구조로 구성이 되므로 효율성이 떨어지게 되는 것이다.The problem of the prior art 2 is that even when objects are gathered in a specific space in three-dimensional space or the complexity of each object is different from each other because each object is composed of each of the acceleration data structure, the efficiency is reduced.

본 발명은 상술한 바와 같은 종래기술의 문제점을 해결하기 위해 안출된 것으로서, 본 발명의 목적은 다중 계층 가속 자료구조에 의하여 업데이트가 필요한 영역을 최소화함으로써 업데이트에 소요되는 시간을 줄일 수 있는 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 방법 및 장치를 제공하는 것이다.SUMMARY OF THE INVENTION The present invention has been made to solve the problems of the prior art as described above, and an object of the present invention is to reduce the time required for updating by minimizing an area requiring updating by a multi-layer accelerated data structure. A ray tracing method and apparatus using a hierarchical Cady-tree structure algorithm are provided.

또한, 본 발명은 3차원 공간상에 물체들이 불 균일하게 분포되어 있거나 각 물체들의 복잡도가 상이한 경우에도 효율적인 성능을 낼 수 있는 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 방법 및 장치를 제공하는 것이다.In addition, the present invention provides a method and apparatus for ray tracing using an adaptive multi-layer Cady-tree structure algorithm that can achieve efficient performance even when objects are unevenly distributed in three-dimensional space or the complexity of each object is different. It is.

상기의 목적을 달성하고 종래기술의 문제점을 해결하기 위하여, 본 발명은 3 차원 공간상에서 독립적으로 움직이는 물체를 포함할 수 있는 가장 작은 6면체 공간을 바운딩 박스로 갖는 적어도 하나의 그룹 노드를 생성하는 단계; 상기 그룹 노드를 포함하는 상기 3차원 공간 전체를 하나의 트리로 구성하여 가속 자료 구조를 생성하는 단계; 및 상기 생성된 가속 자료 구조를 탐색하는 단계를 포함하는 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 방법을 제공한다.In order to achieve the above object and solve the problems of the prior art, the present invention comprises the steps of creating at least one group node having the smallest hexahedral space as the bounding box, which can include objects moving independently in three-dimensional space ; Generating an accelerated data structure by organizing the entire 3D space including the group nodes into a tree; And it provides a ray tracing method using an adaptive multi-layer Cady-tree structure algorithm comprising the step of searching the generated acceleration data structure.

본 발명의 일 측면에 따르는 상기 가속 자료 구조의 업데이트 방법은, 상기 복수의 그룹 노드 중에서 지형 정보가 변경된 물체가 속한 그룹 노드만을 업데이트 하는 것을 특징으로 한다.The method of updating the acceleration data structure according to an aspect of the present invention is characterized in that only the group node to which the object whose terrain information is changed is updated among the plurality of group nodes.

본 발명의 다른 일 측면에 따르는 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 장치는, 그룹 노드 및 상기 그룹 노드를 포함하는 3차원 공간 전체를 하나의 트리로 구성하는 가속 자료 구조를 생성하는 가속 자료 구조 생성부; 상기 생성된 가속 자료 구조를 탐색하는 탐색부; 및 상기 가속 자료 구조의 탐색에 의하여 생성되는 참조 정보 및 상기 가속 자료 구조 정보를 저장하는 메모리를 포함한다.According to another aspect of the present invention, an apparatus for ray tracing using an adaptive multi-layer cad-tree structure algorithm may generate an acceleration data structure including a group node and an entire three-dimensional space including the group nodes as a tree. An acceleration data structure generation unit; A search unit for searching the generated acceleration data structure; And a memory storing reference information generated by the search of the acceleration data structure and the acceleration data structure information.

본 발명에 따른 부가적인 특징 및 장점은, 후술하는 본 발명의 실시를 위한 구체적인 내용의 상세한 설명에 의하여 보다 명료해 질 것이며, 본 발명은 비록 한정된 실시예와 도면에 의하여 설명되나, 본 발명의 권리범위는 이러한 실시예에 한정되는 것은 아니며, 이는 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능할 것이다.Additional features and advantages of the present invention will become more apparent from the following detailed description of the embodiments for carrying out the invention, which is to be understood by the embodiments and drawings, although the invention is not limited thereto. The scope of the present invention is not limited to these embodiments, which can be variously modified and modified by those skilled in the art.

본 발명에 따르면, 지형정보가 변경될 경우 이에 영향을 받는 서브 트리만의 업데이트로도 전체 트리에 변형된 내용을 반영할 수 있고, 결과적으로 업데이트 시간을 단축할 수 있다. According to the present invention, when the terrain information is changed, even the update of only the subtrees affected by the terrain information can be reflected in the entire tree, and as a result, the update time can be shortened.

또한, 본 발명은 3차원 공간상에 물체들이 불 균일하게 분포되어 있거나 각 물체들의 복잡도가 상이한 경우에도 효율적인 성능을 낼 수 있는 효과가 있다.In addition, the present invention has an effect that can be effective even when the objects are unevenly distributed in the three-dimensional space or the complexity of each object is different.

따라서, 본 발명은 각 장면별로 계속해서 물체의 지형정보가 변경되는 3차원 게임 또는 영화 3차원 애니메이션등과 같은 분야에 폭넓게 응용될 수 있다.Therefore, the present invention can be widely applied to a field such as a 3D game or a movie 3D animation in which terrain information of an object is continuously changed for each scene.

이하, 본 발명에 따른 바람직한 실시예를 첨부된 도면을 참조하여 상세하게 설명한다. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 4는 본 발명에 따르는 광선 추적 장치의 개략적인 구성을 나타내는 블럭도이다.4 is a block diagram showing a schematic configuration of a ray tracing apparatus according to the present invention.

도 4를 참조하면, 광선 추적 장치는, 그룹 노드 및 상기 그룹 노드를 포함하는 3차원 공간 전체를 하나의 트리로 구성하는 가속 자료 구조를 생성하는 가속 자료 구조 생성부(410)와, 상기 생성된 가속 자료 구조를 탐색하는 탐색부(420) 및 상기 가속 자료 구조의 탐색에 의하여 생성되는 참조 정보 및 상기 가속 자료 구조 정보를 저장하는 메모리(430)를 포함하여 구성된다.Referring to FIG. 4, the ray tracing apparatus includes an acceleration data structure generation unit 410 for generating an acceleration data structure including a group node and an entire three-dimensional space including the group nodes in a tree, and the generated data structure. And a search unit 420 for searching an acceleration data structure, and a memory 430 for storing reference information generated by the search of the acceleration data structure and the acceleration data structure information.

더욱 구체적으로, 상기 광선 추적 장치는 지형 정보가 변경된 물체가 속한 그룹 노드를 선택하여 상기 선택된 그룹 노드의 자료구조 정보를 업데이트하는 가속 자료구조 업데이트부(440)를 더 포함하여 구성될 수 있다.More specifically, the ray tracing apparatus may further include an acceleration data structure updater 440 that selects a group node to which the object whose terrain information is changed belongs and updates data structure information of the selected group node.

상기 가속 자료 구조 생성부(410)는 상기한 kd-tree 자료 구조와 같이 이진 공간 분할 tree 구조인 적응형 다중 계층 가속 자료구조를 생성한다.The acceleration data structure generation unit 410 generates an adaptive multi-layer acceleration data structure that is a binary spatial partition tree structure like the kd-tree data structure described above.

상기한 일반적인 kd-tree는 루트노드, 내부노드 및 단말노드로 구성된다. 그러나, 본 발명에 따른 적응형 다중 계층 가속 자료구조는 그룹 노드(group node)를 가진다. The general kd-tree includes a root node, an inner node, and a terminal node. However, the adaptive multi-layer acceleration data structure according to the present invention has a group node.

상기 그룹 노드는 내부노드이면서 동시에 트리 내에서 독립적으로 업데이트가 가능한 공간의 루트노드가 된다. The group node is an internal node and a root node of a space that can be independently updated in the tree.

즉, 상기 그룹 노드는 3차원 공간상에서 공간 전체를 대표하는 트리에 내부 노드로 구성되며, 상기 그룹 노드는 3 차원 공간상에서 독립적으로 움직이는 물체를 포함할 수 있는 가장 작은 6면체 공간을 바운딩 박스(bounding box)로 갖게 된다. 도 5는 상기 바운딩 박스의 예를 나타내는 도면이다.That is, the group node is composed of internal nodes in a tree representing the entire space in the three-dimensional space, and the group node bounds the smallest hexagonal space that can contain an object moving independently in the three-dimensional space. box). 5 is a diagram illustrating an example of the bounding box.

따라서, 상기 그룹 노드는 상기 3차원 공간상에서 서로 독립적으로 움직이는 두 개 이상의 물체가 있는 경우에, 각각의 물체는 그룹 노드를 루트로 하는 개별적인 자료 구조로 구성될 수 있다. 차원 공간상에서 서로 독립적으로 움직이는 물체에 대한 정보는 3차원 그래픽의 설계 단계에서 물체의 움직임에 대한 시나리오 등을 통해서 알 수 있게 된다.Thus, when the group node has two or more objects moving independently of each other in the three-dimensional space, each object may be composed of a separate data structure rooted in the group node. Information about objects moving independently in the dimensional space can be known through scenarios about the movement of objects in the design stage of 3D graphics.

상기 그룹 노드의 바운딩 박스 정보와 프리미티브 숫자 정보는 상기 메모리(430)에 저장되고 갱신될 수 있다.The bounding box information and the primitive number information of the group node may be stored and updated in the memory 430.

도 6은 본 발명에 따르는 가속 자료 구조의 예를 나타내는 도면이다.6 is a diagram illustrating an example of an acceleration data structure according to the present invention.

도 6을 참조하면, 예시된 가속 자료 구조는 최상위 노드(610)아래 3개의 그룹 노드(620, 630, 622)가 존재함을 알 수 있다.Referring to FIG. 6, it can be seen that the illustrated acceleration data structure includes three group nodes 620, 630, and 622 below the top node 610.

도 6에 도시된 바와 같이, 그룹 노드(620)는 그 하위에 또 다른 그룹 노 드(622)를 가질 수 있고, 또한 그룹 노드(630)와 같이 하위에 다른 그룹 노드를 갖지 않을 수 있다. As shown in FIG. 6, the group node 620 may have another group node 622 beneath it, and may not have another group node beneath it, such as the group node 630.

따라서, 본 발명에 따르는 가속 자료 구조는 각 물체의 복잡도에 따라서 서로 다른 깊이의 가속 자료 구조를 갖도록 생성될 수 있다.Therefore, the acceleration data structure according to the present invention can be generated to have acceleration data structures of different depths according to the complexity of each object.

상기 가속 자료 구조 탐색부(420)는 탐색 도중에 그룹 노드를 만나는 경우를 제외하면, 종래 기술에 따른 kd-tree 탐색 방법과 동일한 방식으로 광선 추적을 위한 탐색을 수행한다.The acceleration data structure search unit 420 performs a ray tracing in the same manner as the kd-tree search method according to the related art, except that the group node is encountered during the search.

상기 가속 자료 구조 탐색부(420)는 그룹 노드의 바운딩 박스와 광선이 교차하면 그룹 노드의 자식 노드에 대하여 탐색을 수행하고, 광선이 교차하지 않으면 탐색을 종료한다. The acceleration data structure search unit 420 searches for the child node of the group node when the bounding box of the group node intersects the ray, and terminates the search if the ray does not intersect.

더욱 구체적으로, 상기 가속 자료 구조 탐색부(420)는 탐색 과정에서 그룹 노드를 만나면 그룹 노드를 하나의 바운딩 박스 형태의 프리미티브로 간주하여 광선과의 교차 검사를 수행한다. More specifically, when the acceleration data structure search unit 420 encounters a group node in the search process, the acceleration data structure search unit 420 regards the group node as a primitive in the form of a bounding box and performs cross-check with the light beam.

도 7은 본 발명에 따르는 자료 구조 탐색 방법을 나타내는 순서도이다.7 is a flowchart illustrating a data structure search method according to the present invention.

도 7을 참조하면, 상기 가속 자료 구조 탐색부(420)는 먼저, 현재의 노드가 단말 노드(leaf node)인지를 판단하고(701), 단말 노드이면 종래 기술에 따르는 kd-tree 탐색 방법과 동일하게 탐색 과정을 수행한다(702~706). 설명의 편의상 종래 기술에 따르는 kd-tree 탐색 방법의 상세한 설명은 생략한다.Referring to FIG. 7, the acceleration data structure search unit 420 first determines whether the current node is a leaf node (701), and if the terminal node is the same as the kd-tree search method according to the prior art. The search process is performed (702 ~ 706). For convenience of description, a detailed description of the kd-tree search method according to the prior art will be omitted.

다음에, 현재의 노드가 단말노드가 아니면, 그룹 노드인지를 판단한 다(707). 만일, 현재의 노드가 그롭 노드이면 해당 그룹 노드의 바운딩 박스가 광선과 교차되는지를 판단한다(708). 해당 그룹 노드의 바운딩 박스가 광선과 교차되지 않으면 해당 그룹 노드에 대한 탐색은 종료하고, 스택(메모리에 구비됨)을 참조하여 다음 노드를 불러온다(705, 706).Next, if the current node is not a terminal node, it is determined whether the node is a group node (707). If the current node is a grow node, it is determined whether the bounding box of the corresponding group node intersects the ray (708). If the bounding box of the group node does not intersect the ray, the search for the group node is terminated, and the next node is called with reference to the stack (which is provided in the memory) (705 and 706).

현재의 노드가 그룹 노드이면서 광선과 교차 되면, 광선과 교차되는 노드를 찾아 종래 기술에 따르는 kd-tree 탐색 방법과 동일하게 탐색 과정을 수행한다(709~713).If the current node is a group node and intersects the ray, the node is found to intersect the ray and performs the search process in the same manner as the kd-tree search method according to the prior art (709 to 713).

상기 가속 자료 구조 업데이트부(440)는 상기 생성된 가속 자료 구조 전체에 대한 업데이트를 수행하지 않으며, 지형 정보가 변경된 물체가 속한 그룹 노드의 자료구조 정보만을 업데이트 하게 된다. 상기한 임의의 물체에 대한 지형 정보의 변경은 3차원 그래픽을 생성하기 위한 시나리오 등을 통하여 미리 알 수 있게 된다.The acceleration data structure updater 440 does not update the entire generated acceleration data structure, but updates only the data structure information of the group node to which the object whose terrain information is changed. The change of the terrain information on the arbitrary object can be known in advance through a scenario for generating 3D graphics.

따라서, 본 발명에 따른 가속 자료 구조의 업데이트 방법은 종래 기술에 비하여 빠른 업데이트 수행 시간을 줄일 수 있는 효과가 있다.Therefore, the update method of the acceleration data structure according to the present invention has an effect of reducing the fast update execution time compared to the prior art.

상기 가속 자료 구조 업데이트부(440)는 임의의 물체에 대한 지형 정보가 변경되면 그 물체를 포함하는 그룹 노드를 탐색한다. 상기한 지형 정보의 변경으로 인하여 그룹 노드의 바운딩 박스가 변경되어야 하는 경우에는 이를 그룹 노드의 바운딩 값에 반영한다. 이와 마찬가지로, 그룹 노드에 포함된 물체의 프리미티브 숫자가 변경되면 이를 반영한다.The acceleration data structure updater 440 searches for a group node including the object when the terrain information about the object is changed. If the bounding box of the group node is to be changed due to the change of the terrain information, it is reflected in the bounding value of the group node. Similarly, if the primitive number of an object included in the group node is changed, it is reflected.

상기한 바와 같이, 업데이트가 필요한 그룹 노드가 결정되면, 그룹 노드의 업데이트 방법은 kd-tree 업데이트 방법을 사용한다. 즉, 그룹 노드의 바운딩 박스 정보 또는 프리미티브 숫자 값이 변경되면, 변경된 그룹 노드를 포함하는 서브 트리에 대하여 업데이트를 수행하게 된다.As described above, when the group node that needs updating is determined, the updating method of the group node uses the kd-tree updating method. That is, when the bounding box information or the primitive numeric value of the group node is changed, the sub tree including the changed group node is updated.

상기 가속 자료 구조 업데이트부(440)는 전체 트리의 아래쪽에서 루트 노드 방향으로(bottom-up 방식) 재귀적인 업데이트를 진행한다. 상기 bottom-up 방식으로 업데이트를 진행하는 이유는 아래 쪽에 위치한 그룹 노드가 가지고 있는 바운딩박스와 프리미티브 숫자 정보가 있어야만 이 그룹 노드를 포함하는 서브트리 영역의 업데이트가 가능하기 때문이다 The acceleration data structure updater 440 performs a recursive update in the direction of the root node (bottom-up method) from the bottom of the entire tree. The reason for updating the bottom-up method is that the subtree area including the group node can be updated only if the bounding box and primitive number information of the group node located below is included.

도 8은 본 발명에 따르는 가속 자료 구조의 업데이트 과정의 예를 보여주는 도면이다.8 is a view showing an example of an update process of an acceleration data structure according to the present invention.

도 8을 참조하면, 먼저, 최하위 서브 트리 810이 업데이트 되면서 서브트리 820 내의 그룹 노드의 바운딩 박스와 프리미티브 정보가 업데이트 된다. Referring to FIG. 8, first, as the lowest subtree 810 is updated, the bounding box and the primitive information of the group node in the subtree 820 are updated.

다음에, 서브트리 820 과 서브 트리 830이 순차적으로 업데이트 되고, 최종적으로 최상위 서브 트리 840이 업데이트 된다. Next, the subtree 820 and the subtree 830 are sequentially updated, and finally, the highest subtree 840 is updated.

가속 자료 구조의 업데이트 과정에 있어서, 하위 서브 트리의 업데이트 이후에 업데이트된 서브 트리에 해당하는 그룹 노드의 바운딩 박스와 프리미티브 정보의 변경이 없는 경우에는 해당 그룹 노드를 포함하는 상위 서브 트리에 대해서는 업데이트를 수행할 필요가 없다. In the process of updating the accelerated data structure, if there is no change in the bounding box and primitive information of the group node corresponding to the updated subtree after the update of the lower subtree, the update is performed on the upper subtree including the group node. There is no need to do it.

또한, 상기 도 8에서 지형 정보가 변경된 서브 트리가 서브 트리 820인 경 우에는 서브 트리 810과 서브 트리 830은 업데이트를 수행할 필요가 없게 된다.In addition, when the subtree in which the terrain information is changed in FIG. 8 is the subtree 820, the subtree 810 and the subtree 830 do not need to be updated.

본 발명에 따른 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 상기 매체는 프로그램 명령, 데이터 구조 등을 지정하는 신호를 전송하는 반송파를 포함하는 광 또는 금속선, 도파관 등의 전송 매체일 수도 있다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 본 발명의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The ray tracing method using the adaptive multi-layer Cad-tree structure algorithm according to the present invention can be implemented in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. Program instructions recorded on the media may be those specially designed and constructed for the purposes of the present invention, or they may be of the kind well-known and available to those having skill in the computer software arts. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks, such as floppy disks. Magneto-optical media, and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. The medium may be a transmission medium such as an optical or metal wire, a waveguide, or the like including a carrier wave for transmitting a signal specifying a program command, a data structure, or the like. Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like. The hardware device described above may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.

이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다.As described above, the present invention has been described by way of limited embodiments and drawings, but the present invention is not limited to the above embodiments, and those skilled in the art to which the present invention pertains various modifications and variations from such descriptions. This is possible.

그러므로, 본 발명의 범위는 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.Therefore, the scope of the present invention should not be limited to the described embodiments, but should be determined not only by the claims below but also by the equivalents of the claims.

도 1은 kd-tree 탐색 방법을 나타내는 순서도이다.1 is a flowchart illustrating a kd-tree search method.

도 2a 및 도 2b는 kd-tree 자료 구조의 노드 탐색 방법을 설명하기 위한 예시도이다.2A and 2B are exemplary diagrams for explaining a node searching method of a kd-tree data structure.

도 3은 종래기술에 따른 가속 자료 구조의 구성을 나타내는 도면이다.3 is a diagram showing the configuration of an acceleration data structure according to the prior art.

도 4는 본 발명에 따르는 광선 추적 장치의 개략적인 구성을 나타내는 블럭도이다.4 is a block diagram showing a schematic configuration of a ray tracing apparatus according to the present invention.

도 5는 본 발명에 따르는 그룹 노드의 바운딩 박스 예를 나타내는 도면이다. 5 is a diagram illustrating an example of a bounding box of a group node according to the present invention.

도 6은 본 발명에 따르는 가속 자료 구조의 예를 나타내는 도면이다.6 is a diagram illustrating an example of an acceleration data structure according to the present invention.

도 7은 본 발명에 따르는 자료 구조 탐색 방법을 나타내는 순서도이다.7 is a flowchart illustrating a data structure search method according to the present invention.

도 8은 본 발명에 따르는 가속 자료 구조의 업데이트 과정의 예를 보여주는 도면이다.8 is a view showing an example of an update process of an acceleration data structure according to the present invention.

Claims (7)

3 차원 공간상에서 독립적으로 움직이는 물체를 포함할 수 있는 가장 작은 6면체 공간을 바운딩 박스로 갖는 적어도 하나의 그룹 노드를 생성하는 단계;Creating at least one group node having as its bounding box the smallest tetrahedral space that can contain an object moving independently in three-dimensional space; 상기 그룹 노드를 포함하는 상기 3차원 공간 전체를 하나의 트리로 구성하여 가속 자료 구조를 생성하는 단계; 및Generating an accelerated data structure by organizing the entire 3D space including the group nodes into a tree; And 상기 생성된 가속 자료 구조를 탐색하는 단계를 포함하는 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 방법.And a step of searching for the generated acceleration data structure. 제 1 항에 있어서, The method of claim 1, 상기 그룹 노드는 3 차원 공간상에서 독립적으로 움직이는 물체가 두개 이상인 경우에는 각각의 물체에 대하여 생성되는 것을 특징으로 하는 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 방법.And the group node is generated for each object when there are two or more independently moving objects in a three-dimensional space. 제 1 항에 있어서, 상기 생성된 가속 자료 구조를 탐색하는 단계는,The method of claim 1, wherein searching for the generated acceleration data structure comprises: 상기 그룹 노드의 바운딩 박스와 광선이 교차하면 그룹 노드의 자식 노드에 대하여 탐색을 수행하고, 광선이 교차하지 않으면 탐색을 종료하는 것을 특징으로 하는 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 방법.The ray tracing method using an adaptive multi-layer Cady-tree structure algorithm, wherein when the bounding box of the group node and the ray cross, the search is performed on the child node of the group node, and when the ray does not cross, the search is terminated. . 3 차원 공간상에서 독립적으로 움직이는 물체를 포함할 수 있는 가장 작은 6면체 공간을 바운딩 박스로 갖는 복수의 그룹 노드를 생성하는 단계;Creating a plurality of group nodes having the smallest hexahedral space as the bounding box, which can include objects moving independently in three-dimensional space; 상기 복수의 그룹 노드를 포함하는 상기 3차원 공간 전체를 하나의 트리로 구성하여 가속 자료 구조를 생성하는 단계;Generating an accelerated data structure by organizing the entire three-dimensional space including the plurality of group nodes into one tree; 상기 복수의 그룹 노드 중에서 지형 정보가 변경된 물체가 속한 그룹 노드를 찾는 단계; 및Finding a group node to which an object whose terrain information is changed among the plurality of group nodes belongs; And 상기 지형 정보가 변경된 물체가 속한 그룹 노드의 자료구조 정보를 업데이트하는 단계를 포함하는 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 방법.And updating the data structure information of the group node to which the object whose terrain information is changed belongs. 제 4 항에 있어서, 상기 업데이트하는 단계는,The method of claim 4, wherein the updating comprises: 하위 서브 트리로부터 루트 노드 방향으로 진행되는 것을 특징으로 하는 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 방법.A ray tracing method using an adaptive multi-layer caddie-tree structure algorithm characterized by progressing from a lower subtree toward a root node. 그룹 노드 및 상기 그룹 노드를 포함하는 3차원 공간 전체를 하나의 트리로 구성하는 가속 자료 구조를 생성하는 가속 자료 구조 생성부;An acceleration data structure generation unit for generating an acceleration data structure including a group node and the entire three-dimensional space including the group node as a tree; 상기 생성된 가속 자료 구조를 탐색하는 탐색부; 및A search unit for searching the generated acceleration data structure; And 상기 가속 자료 구조의 탐색에 의하여 생성되는 참조 정보 및 상기 가속 자료 구조 정보를 저장하는 메모리를 포함하는 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 장치.And a memory for storing the reference information generated by the search of the acceleration data structure and the acceleration data structure information. 제 6 항에 있어서, The method of claim 6, 지형 정보가 변경된 물체가 속한 그룹 노드를 선택하여 상기 선택된 그룹 노드의 자료구조 정보를 업데이트하는 가속 자료 구조 업데이트부를 더 포함하는 적응형 다중 계층 케이디-트리 구조 알고리즘을 이용한 광선 추적 장치.And an acceleration data structure updater configured to select a group node to which the object whose terrain information is changed belongs and update data structure information of the selected group node.
KR1020070085564A 2007-08-24 2007-08-24 Method and apparatus for ray tracing using adaptive multi-hierarchy kd-tree algorithm in 3d ray tracing system KR100903777B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020070085564A KR100903777B1 (en) 2007-08-24 2007-08-24 Method and apparatus for ray tracing using adaptive multi-hierarchy kd-tree algorithm in 3d ray tracing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020070085564A KR100903777B1 (en) 2007-08-24 2007-08-24 Method and apparatus for ray tracing using adaptive multi-hierarchy kd-tree algorithm in 3d ray tracing system

Publications (2)

Publication Number Publication Date
KR20090020924A true KR20090020924A (en) 2009-02-27
KR100903777B1 KR100903777B1 (en) 2009-06-19

Family

ID=40688141

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070085564A KR100903777B1 (en) 2007-08-24 2007-08-24 Method and apparatus for ray tracing using adaptive multi-hierarchy kd-tree algorithm in 3d ray tracing system

Country Status (1)

Country Link
KR (1) KR100903777B1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010137821A3 (en) * 2009-05-29 2011-03-31 주식회사 실리콘아츠 Ray tracing device and method
KR20120019720A (en) * 2010-08-26 2012-03-07 삼성전자주식회사 Image processing apparatus and method
KR101228118B1 (en) * 2010-12-22 2013-01-31 서강대학교산학협력단 Method for constructing a Kd-tree based on polygon importance
KR101284324B1 (en) * 2011-06-29 2013-07-08 세종대학교산학협력단 Ray tracing core and ray tracing method
KR20160002204A (en) * 2014-06-30 2016-01-07 삼성전자주식회사 Apparatus and method for processing ray tracing
US9367949B2 (en) 2012-09-17 2016-06-14 Samsung Electronics Co., Ltd. Apparatus and method for scheduling of ray tracing
US9390545B2 (en) 2012-05-04 2016-07-12 Samsung Electronics Co., Ltd. Apparatus and method for traversing hierarchical acceleration structure
CN108171785A (en) * 2018-01-22 2018-06-15 中南大学 For the SAH-KD tree design methods of ray trace

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06274648A (en) * 1993-03-22 1994-09-30 N T T Data Tsushin Kk Image generator
JP3931701B2 (en) 2002-03-15 2007-06-20 株式会社デンソー Image generating apparatus and program

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010137821A3 (en) * 2009-05-29 2011-03-31 주식회사 실리콘아츠 Ray tracing device and method
KR20120019720A (en) * 2010-08-26 2012-03-07 삼성전자주식회사 Image processing apparatus and method
US9355491B2 (en) 2010-08-26 2016-05-31 Samsung Electronics Co., Ltd. Ray tracing apparatus and method
KR101228118B1 (en) * 2010-12-22 2013-01-31 서강대학교산학협력단 Method for constructing a Kd-tree based on polygon importance
KR101284324B1 (en) * 2011-06-29 2013-07-08 세종대학교산학협력단 Ray tracing core and ray tracing method
US9390545B2 (en) 2012-05-04 2016-07-12 Samsung Electronics Co., Ltd. Apparatus and method for traversing hierarchical acceleration structure
US9367949B2 (en) 2012-09-17 2016-06-14 Samsung Electronics Co., Ltd. Apparatus and method for scheduling of ray tracing
KR20160002204A (en) * 2014-06-30 2016-01-07 삼성전자주식회사 Apparatus and method for processing ray tracing
US9569881B2 (en) 2014-06-30 2017-02-14 Samsung Electronics Co., Ltd. Method and apparatus processing ray bounding box intersection
CN108171785A (en) * 2018-01-22 2018-06-15 中南大学 For the SAH-KD tree design methods of ray trace

Also Published As

Publication number Publication date
KR100903777B1 (en) 2009-06-19

Similar Documents

Publication Publication Date Title
KR100903777B1 (en) Method and apparatus for ray tracing using adaptive multi-hierarchy kd-tree algorithm in 3d ray tracing system
KR101697238B1 (en) Image processing apparatus and method
US7002571B2 (en) Grid-based loose octree for spatial partitioning
US20220245111A1 (en) Hierarchy Merging in Computer Graphics
US7786991B2 (en) Applications of interval arithmetic for reduction of number of computations in ray tracing problems
Hwang et al. A fast path planning by path graph optimization
US8570322B2 (en) Method, system, and computer program product for efficient ray tracing of micropolygon geometry
Havran et al. On the fast construction of spatial hierarchies for ray tracing
US20090073167A1 (en) Cooperative Utilization of Spacial Indices Between Application and Rendering Hardware
KR20090091617A (en) 3d image processing method and apparatus for enabling efficient retrieval of neighbor point
US10460506B2 (en) Method and apparatus for generating acceleration structure
Hastings et al. Optimization of large-scale, real-time simulations by spatial hashing
CN109712227B (en) Voxel terrain management method
CN101297325B (en) Method and device for radio tracking
Larsson et al. Strategies for bounding volume hierarchy updates for ray tracing of deformable models
KR102467031B1 (en) Method for generating and traverse acceleration structure
KR101228118B1 (en) Method for constructing a Kd-tree based on polygon importance
Zuniga et al. Ray queries with wide object isolation and the de-tree
CN118247416A (en) Distributed optical path tracking method and system based on nerve geometry
CN116310119A (en) Self-adaptive distance field construction method based on bounding volume hierarchy
Kroiss Collision detection using hierarchical grid spatial partitioning on the GPU
CN115994976A (en) Construction method and system of AASDF based on GPU
Li et al. An improved dynamic-octree-based judging method of real-time node in moving geometry
Chhugani et al. vlod: A scalable system for interactive walkthroughs of very large virtual environments
Helmich Realtime Raytracing: Kd-Trees on graphics cards

Legal Events

Date Code Title Description
A201 Request for 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: 20130430

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20140414

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20150609

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20160714

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee