KR102261250B1 - Ray tracing device and method for reducing the amount of data transmitted between devices - Google Patents

Ray tracing device and method for reducing the amount of data transmitted between devices Download PDF

Info

Publication number
KR102261250B1
KR102261250B1 KR1020190159296A KR20190159296A KR102261250B1 KR 102261250 B1 KR102261250 B1 KR 102261250B1 KR 1020190159296 A KR1020190159296 A KR 1020190159296A KR 20190159296 A KR20190159296 A KR 20190159296A KR 102261250 B1 KR102261250 B1 KR 102261250B1
Authority
KR
South Korea
Prior art keywords
ray
unit
information
collision
software
Prior art date
Application number
KR1020190159296A
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 KR1020190159296A priority Critical patent/KR102261250B1/en
Application granted granted Critical
Publication of KR102261250B1 publication Critical patent/KR102261250B1/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
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining

Abstract

The present invention relates to a ray tracing device and method for reducing the bandwidth between devices. The ray tracing device comprises a software unit and a dedicated hardware unit, wherein the software unit, through software, processes (a) a ray information construction operation, (b) a ray generation operation, (c) a collision point calculation operation and (d) a shading operation, and the dedicated hardware unit, as dedicated hardware interlocking with the software unit, includes a ray generation unit, a traversal and intersection test unit, a reorder buffer unit, a collision point calculation unit and a ray setup unit. Therefore, the present invention allows the dedicated hardware to independently process the collision point calculation and the ray setup separately from the operations of the software, thereby minimizing data transmission between a hardware device and a software device.

Description

장치들 간의 대역폭을 줄이는 레이 트레이싱 장치 및 방법{RAY TRACING DEVICE AND METHOD FOR REDUCING THE AMOUNT OF DATA TRANSMITTED BETWEEN DEVICES}RAY TRACING DEVICE AND METHOD FOR REDUCING THE AMOUNT OF DATA TRANSMITTED BETWEEN DEVICES

본 발명은 장치들 간의 대역폭을 줄이는 레이 트레이싱 기술에 관한 것으로, 더욱 상세하게는 장치들 간에 대규모의 데이터 전송을 줄여 레이 트레이싱의 성능을 향상시키는 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치 및 방법에 관한 것이다.The present invention relates to a ray tracing technology for reducing bandwidth between devices, and more particularly, to a ray tracing apparatus and method for reducing bandwidth between devices for improving ray tracing performance by reducing large-scale data transmission between devices. .

레이 트레이싱(Ray Tracing)은 크게 레이 생성(ray generation), 트리 방문 & 교차 테스트(Tree Traversal & Intersection Test), 충돌 지점 계산(Hit Point Calculation), 쉐이딩(Shading)의 단계로 구성되며 반복적(recursive)으로 수행될 수 있다.Ray tracing is largely composed of the steps of ray generation, tree traversal & intersection test, hit point calculation, and shading, and is recursive. can be performed with

최근에 영화나 게임에서 고품질의 CG 영상이 요구되면서 레이 트레이싱에서 계산량을 가장 많이 필요로 하는 트리 방문 & 교차 테스트와 충돌 지점 계산 부분을 전용 하드웨어(HW)에서 처리하고, 나머지 부분인 레이 생성과 쉐이딩은 소프트웨어(SW)적으로 처리하는 방식이 생겨나고 있다.Recently, as high-quality CG images are required in movies and games, the tree visit & intersection test and collision point calculation, which require the most computational amount in ray tracing, are processed in dedicated hardware (HW), and the rest of the ray generation and shading is performed. A software (SW) method of processing is emerging.

특히, 쉐이딩은 고품질로 갈수록 다양한 조명 모델에 따른 복잡한 과정을 요구하기 때문에 모든 옵션을 하드웨어로 구현하기가 어려워 소프트웨어로 처리하기가 용이하다. 이러한 경우 두 개의 독립된 장치들이 병렬적으로 수행될 수 있기 때문에 성능 향상을 기대할 수 있으나, 두 개의 장치들 간에 대규모의 데이터 전송이 필요하게 되어 장치들 간에 대기시간이 늘어남으로 인해 성능이 저하될 수 있다.In particular, as shading requires a complex process according to various lighting models as the quality increases, it is difficult to implement all options in hardware, so it is easy to process with software. In this case, performance improvement can be expected because two independent devices can be performed in parallel, but large-scale data transmission is required between the two devices, and the performance can be degraded due to increased latency between devices. .

한국등록특허 제10-1076807(2011.10.19)호Korean Patent Registration No. 10-1076807 (2011.10.19)

본 발명의 일 실시예는 장치들 간에 대규모의 데이터 전송을 줄여 레이 트레이싱의 성능을 향상시키는 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치 및 방법을 제공하고자 한다.An embodiment of the present invention is to provide a ray tracing apparatus and method for reducing bandwidth between devices for improving ray tracing performance by reducing large-scale data transmission between devices.

본 발명의 일 실시예는 레이 트레이싱 과정에서 소프트웨어의 동작과 별개로 전용 하드웨어에서 충돌 지점 계산과 레이 셋업을 독립적으로 처리함으로써 하드웨어 장치와 소프트웨어 장치 간의 데이터 전송을 최소화할 수 있는 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치 및 방법을 제공하고자 한다.An embodiment of the present invention reduces the bandwidth between devices capable of minimizing data transmission between a hardware device and a software device by independently processing the collision point calculation and ray setup in dedicated hardware separately from the operation of software in the ray tracing process. An object of the present invention is to provide a ray tracing apparatus and method.

본 발명의 일 실시예는 레이 트레이싱을 위한 전용 하드웨어 장치로서 리오더 버퍼 유닛을 포함함으로써 소프트웨어적 처리를 담당하는 소프트웨어 장치와의 연동을 효율적으로 수행할 수 있는 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치 및 방법을 제공하고자 한다.An embodiment of the present invention is a ray tracing apparatus and method for reducing bandwidth between devices that can efficiently perform interworking with a software device in charge of software processing by including a reorder buffer unit as a dedicated hardware device for ray tracing would like to provide

실시예들 중에서, 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치는 소프트웨어를 통해, (a) 레이 생성을 위한 레이 정보(ray information)를 구축하는 레이 정보 구축 연산과 (b) 상기 레이 정보를 이용하여 레이 트레이싱(ray tracing)을 위한 제1 레이를 생성하는 레이 생성 연산과 (c) 제2 레이와 충돌하는 충돌 삼각형 정보를 기초로 충돌 지점을 계산하는 충돌 지점 계산 연산 및 (d) 상기 충돌 지점 상에서의 컬러 값을 산출하는 쉐이딩(shading) 연산을 각각 처리하는 소프트웨어 유닛부 및 상기 소프트웨어 유닛부와 연동하는 전용 하드웨어로서, 상기 레이 정보를 기초로 방문 교차 테스트를 위한 상기 제2 레이를 생성하는 레이 생성 유닛과 상기 제2 레이를 기초로 방문 교차 테스트 연산을 수행하는 방문 교차 테스트 유닛과 상기 방문 교차 테스트 연산으로 출력되는 아웃오브오더(out-of-order) 결과를 인오더(in-order) 결과로 변경하는 리오더 버퍼(reorder buffer) 유닛과 상기 제2 레이와 충돌 삼각형 정보를 기초로 충돌 지점을 계산하는 충돌 지점 계산 유닛 및 그림자(shadow) 레이 또는 세컨더리(secondary) 레이에 관한 정보를 생성하여 상기 레이 생성 유닛으로 전달하는 레이 셋업(Set-up) 유닛으로 구성된 전용 하드웨어 유닛부를 포함한다.Among the embodiments, the ray tracing device for reducing the bandwidth between devices is through software, (a) a ray information construction operation for building ray information for ray generation, and (b) a ray using the ray information A ray generation operation for generating a first ray for ray tracing, (c) a collision point calculation operation for calculating a collision point based on collision triangle information that collides with a second ray, and (d) a collision point calculation operation on the collision point A ray generating unit that generates the second ray for a visit intersection test based on the ray information as a software unit unit that processes a shading operation for calculating a color value, respectively, and dedicated hardware interworking with the software unit unit and a visited intersection test unit that performs a visited intersection test operation based on the second ray, and an out-of-order result output from the visited intersection test operation is changed to an in-order result A reorder buffer unit and a collision point calculation unit that calculates a collision point based on the second ray and collision triangle information and a shadow ray or secondary ray to generate information about the ray to generate the ray It includes a dedicated hardware unit unit composed of a lay-up unit that transmits to the unit.

상기 소프트웨어 유닛부는 상기 쉐이딩 연산 단계에서 그림자(shadow) 레이 또는 세컨더리(secondary) 레이의 발생이 검출되면 상기 그림자 레이 또는 상기 세컨더리 레이에 관한 레이 정보를 생성하여 상기 레이 정보 구축 연산 단계로 전달하는 레이 셋업(Set-up) 연산을 더 처리할 수 있다.The software unit unit generates ray information about the shadow ray or the secondary ray when the occurrence of a shadow ray or a secondary ray is detected in the shading operation step and transmits the ray information construction operation step to the ray setup ray setup (Set-up) operation can be further processed.

상기 소프트웨어 유닛부는 상기 레이 정보 구축 연산 단계에서 프레임 내의 각 픽셀에 대해 레이 생성을 위한 정보를 상기 레이 정보로서 구축하여 상기 레이 생성 연산 단계로 전달하면서 상기 전용 하드웨어 유닛부로 일방 전송하고, 상기 레이 정보가 상기 그림자 레이 또는 상기 세컨더리 레이와 연관된 경우에는 상기 일방 전송을 생략할 수 있다.The software unit builds information for ray generation for each pixel in the frame in the ray information construction operation step as the ray information and transmits it one-way to the dedicated hardware unit unit while passing it to the ray generation operation step, and the ray information is If it is associated with the shadow ray or the secondary ray, the one-way transmission may be omitted.

상기 소프트웨어 유닛부는 상기 레이 생성 연산 단계에서 상기 레이 정보를 기초로 시점 위치로부터 프라이머리(primary) 레이를 상기 제1 레이로서 생성하여 해당 프라이머리 레이의 데이터 값을 상기 충돌 지점 계산 연산 단계로 전달할 수 있다.The software unit may generate a primary ray as the first ray from a viewpoint based on the ray information in the ray generation operation step and transfer the data value of the primary ray to the collision point calculation operation step. have.

상기 소프트웨어 유닛부는 상기 충돌 지점 계산 연산 단계에서 상기 충돌 삼각형 정보와 상기 제1 레이를 기초로 충돌 삼각형과 상기 제1 레이 간의 충돌 지점의 좌표를 산출할 수 있다.The software unit may calculate the coordinates of the collision point between the collision triangle and the first ray based on the collision triangle information and the first ray in the collision point calculation operation step.

상기 방문 교차 테스트 유닛은 상기 제2 레이를 기초로 가속 구조(Acceleration Structure, AS)를 탐색하여 상기 제2 레이와 연관된 리프 노드를 결정하는 방문 연산과 상기 리프 노드에 포함된 모든 삼각형들에 관한 교차 테스트를 수행하여 상기 제2 레이와 충돌하는 충돌 삼각형을 결정하는 교차 테스트 연산을 각각 처리할 수 있다.The visited intersection test unit searches an Acceleration Structure (AS) based on the second ray to determine a leaf node associated with the second ray, and a visited operation for all triangles included in the leaf node. A test may be performed to each process an intersection test operation to determine a collision triangle that collides with the second ray.

상기 리오더 버퍼 유닛은 상기 레이 생성 유닛으로부터 출력되는 상기 제2 레이를 저장하는 제1 단계, 상기 방문 교차 테스트 유닛으로부터 출력되는 상기 충돌 삼각형 정보를 수신하는 제2 단계 및 상기 충돌 삼각형 정보와 연관된 제2 레이의 우선순위에 따라 해당 충돌 삼각형 정보를 출력하는 제3 단계를 순차적으로 수행함으로써 상기 소프트웨어 유닛부로부터 일방 전송되는 상기 레이 정보의 순서에 대응하여 상기 충돌 삼각형 정보를 일방 전송할 수 있다.The reorder buffer unit includes a first step of storing the second ray output from the ray generation unit, a second step of receiving the collision triangle information output from the visited intersection test unit, and a second step associated with the collision triangle information By sequentially performing the third step of outputting the corresponding collision triangle information according to the priority of the ray, the collision triangle information can be transmitted one way in accordance with the order of the ray information transmitted from the software unit unit.

상기 충돌 지점 계산 유닛은 상기 충돌 삼각형 정보와 상기 제2 레이를 기초로 충돌 삼각형과 상기 제2 레이 간의 충돌 지점의 좌표를 계산하고, 상기 레이 셋업 유닛은 상기 충돌 지점의 좌표에서 상기 그림자 레이 또는 상기 세컨더리 레이의 발생 여부를 결정하여 해당 레이에 관한 정보를 생성할 수 있다.The collision point calculation unit calculates the coordinates of the collision point between the collision triangle and the second ray based on the collision triangle information and the second ray, and the ray setup unit calculates the coordinates of the collision point between the shadow ray or the It is possible to determine whether the secondary ray is generated or not to generate information about the corresponding ray.

실시예들 중에서, 장치들 간의 대역폭을 줄이는 레이 트레이싱 방법은 (a) 상기 소프트웨어 유닛부를 통해, 레이 생성을 위한 레이 정보(ray information)를 구축하여 상기 전용 하드웨어 유닛부에게 일방 전송하는 단계, (b) 상기 전용 하드웨어 유닛부를 통해, 상기 레이 정보를 기초로 방문 교차 테스트를 위한 제2 레이를 생성하는 단계, (c) 상기 전용 하드웨어 유닛부를 통해, 상기 제2 레이를 기초로 방문 교차 테스트 연산을 수행하는 단계, (d) 상기 전용 하드웨어 유닛부를 통해, 상기 방문 교차 테스트 연산으로 출력되는 아웃오브오더(out-of-order) 결과를 인오더(in-order) 결과로 변경하여 상기 소프트웨어 유닛부에게 일방 전송하는 단계, (e) 상기 소프트웨어 유닛부를 통해, 상기 레이 정보를 이용하여 제1 레이를 생성하고 상기 제1 레이와 충돌 삼각형 정보를 기초로 충돌 지점을 계산하는 단계 및 (f) 상기 소프트웨어 유닛부를 통해, 상기 충돌 지점 상에서의 컬러 값을 산출하는 단계를 포함한다.In embodiments, the ray tracing method for reducing the bandwidth between devices includes (a) constructing ray information for ray generation through the software unit and one-way transmitting to the dedicated hardware unit, (b) ) through the dedicated hardware unit, generating a second ray for a visited intersection test based on the ray information, (c) through the dedicated hardware unit, performing a visited intersection test operation based on the second ray (d) changing the out-of-order result output from the visited intersection test operation to an in-order result through the dedicated hardware unit unit to give the software unit one-way transmitting, (e) through the software unit unit, generating a first ray using the ray information and calculating a collision point based on the first ray and collision triangle information, and (f) the software unit unit through, calculating a color value on the collision point.

상기 레이 트레이싱 방법은 (d') 상기 전용 하드웨어 유닛부를 통해, 상기 소프트웨어 유닛부의 동작과 별개로 상기 방문 교차 테스트 연산으로 출력되는 충돌 삼각형 정보와 상기 제2 레이 간의 충돌 지점을 계산하는 단계 및 (e') 상기 전용 하드웨어 유닛부를 통해, 상기 소프트웨어 유닛부의 동작과 별개로 상기 충돌 지점을 기준으로 그림자(shadow) 레이 또는 세컨더리(secondary) 레이에 관한 정보를 생성하여 상기 레이 생성 유닛으로 전달하는 단계를 더 포함할 수 있다.The ray tracing method includes the steps of (d') calculating a collision point between the second ray and the collision triangle information output from the visited intersection test operation independently of the operation of the software unit through the dedicated hardware unit unit, and (e) ') through the dedicated hardware unit unit, generating information about a shadow ray or secondary ray based on the collision point independently of the operation of the software unit unit and transferring the information to the ray generation unit further may include

상기 (a) 단계는 프레임 내의 각 픽셀에 대해 레이 생성을 위한 정보를 상기 레이 정보로서 구축하는 단계, 상기 레이 정보를 상기 레이 생성 연산 단계로 전달하는 단계 및 상기 레이 정보를 상기 전용 하드웨어 유닛부로 일방 전송하는 단계를 포함할 수 있다.The step (a) includes building information for ray generation as the ray information for each pixel in a frame, transferring the ray information to the ray generation operation step, and transmitting the ray information to the dedicated hardware unit unit It may include the step of transmitting.

상기 (c) 단계는 상기 방문 교차 테스트 연산의 결과를 상기 리오더 버퍼 유닛 및 상기 충돌 지점 계산 유닛 각각에게 전달하는 단계를 포함할 수 있다.The step (c) may include transmitting the result of the visited intersection test operation to the reorder buffer unit and the collision point calculation unit, respectively.

상기 (d) 단계는 상기 방문 교차 테스트 유닛으로 입력되는 상기 제2 레이를 저장하고, 상기 방문 교차 테스트 유닛으로부터 출력되는 상기 충돌 삼각형 정보를 수신하며, 상기 충돌 삼각형 정보와 연관된 제2 레이의 우선순위에 따라 해당 충돌 삼각형 정보를 출력함으로써 상기 소프트웨어 유닛부로부터 일방 전송되는 상기 레이 정보의 순서에 대응하여 상기 충돌 삼각형 정보를 일방 전송하는 단계를 포함할 수 있다.The step (d) stores the second ray input to the visited intersection test unit, receives the collision triangle information output from the visited intersection test unit, and the priority of the second ray associated with the collision triangle information It may include the step of transmitting the collision triangle information one way in response to the order of the ray information transmitted from the software unit by one side by outputting the corresponding collision triangle information according to the.

상기 (f) 단계는 그림자(shadow) 레이 또는 세컨더리(secondary) 레이의 발생이 검출되면 상기 그림자 레이 또는 상기 세컨더리 레이에 관한 레이 정보를 생성하여 상기 (a) 단계로 전달하는 단계를 더 포함할 수 있다.The step (f) may further include generating ray information about the shadow ray or the secondary ray when the occurrence of a shadow ray or a secondary ray is detected and transferring the generated ray information to the step (a). have.

상기 레이 트레이싱 방법은 (g) 상기 소프트웨어 유닛부를 통해, 프레임 내의 모든 픽셀에 대한 컬러 값이 결정된 경우 상기 프레임에 관한 이미지를 출력하는 단계를 더 포함할 수 있다.The ray tracing method may further include (g) outputting, through the software unit, an image of the frame when color values for all pixels in the frame are determined.

개시된 기술은 다음의 효과를 가질 수 있다. 다만, 특정 실시예가 다음의 효과를 전부 포함하여야 한다거나 다음의 효과만을 포함하여야 한다는 의미는 아니므로, 개시된 기술의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.The disclosed technology may have the following effects. However, this does not mean that a specific embodiment should include all of the following effects or only the following effects, so the scope of the disclosed technology should not be construed as being limited thereby.

본 발명의 일 실시예에 따른 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치 및 방법은 레이 트레이싱 과정에서 소프트웨어의 동작과 별개로 전용 하드웨어에서 충돌 지점 계산과 레이 셋업을 독립적으로 처리함으로써 하드웨어 장치와 소프트웨어 장치 간의 데이터 전송을 최소화할 수 있다.A ray tracing apparatus and method for reducing bandwidth between devices according to an embodiment of the present invention is a ray tracing process between a hardware device and a software device by independently processing the collision point calculation and ray setup in dedicated hardware separately from the operation of the software. Data transmission can be minimized.

본 발명의 일 실시예에 따른 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치 및 방법은 레이 트레이싱을 위한 전용 하드웨어 장치로서 리오더 버퍼 유닛을 포함함으로써 소프트웨어적 처리를 담당하는 소프트웨어 장치와의 연동을 효율적으로 수행할 수 있다.A ray tracing apparatus and method for reducing bandwidth between devices according to an embodiment of the present invention include a reorder buffer unit as a dedicated hardware device for ray tracing to efficiently perform interworking with a software device in charge of software processing. can

도 1은 레이 트레이싱 장치에 의해 수행되는 레이 트레이싱 과정의 일 실시예를 설명하는 도면이다.
도 2는 레이 트레이싱 과정에서 사용되는 가속 구조로서 KD 트리의 일 실시예를 설명하는 도면이다.
도 3은 레이 트레이싱 장치에서 수행되는 레이 트레이싱 과정의 일반적인 예를 설명하는 도면이다.
도 4는 SW 연산과 전용 HW의 연동을 통해 레이 트레이싱을 처리하는 일 실시예를 설명하는 도면이다.
도 5는 본 발명의 일 실시예에 따른 장치들 간에 대역폭을 줄이는 레이 트레이싱 장치를 설명하는 도면이다.
도 6 및 7은 도 5의 레이 트레이싱 장치에서 수행되는 장치들 간에 대역폭을 줄이는 레이 트레이싱 과정의 일 실시예를 설명하는 순서도이다.
1 is a view for explaining an embodiment of a ray tracing process performed by a ray tracing apparatus.
2 is a diagram for explaining an embodiment of a KD tree as an acceleration structure used in a ray tracing process.
3 is a view for explaining a general example of a ray tracing process performed in a ray tracing apparatus.
4 is a view for explaining an embodiment of processing ray tracing through interworking of SW operation and dedicated HW.
5 is a diagram illustrating a ray tracing apparatus for reducing bandwidth between apparatuses according to an embodiment of the present invention.
6 and 7 are flowcharts illustrating an embodiment of a ray tracing process for reducing bandwidth between devices performed in the ray tracing apparatus of FIG. 5 .

본 발명에 관한 설명은 구조적 내지 기능적 설명을 위한 실시예에 불과하므로, 본 발명의 권리범위는 본문에 설명된 실시예에 의하여 제한되는 것으로 해석되어서는 아니 된다. 즉, 실시예는 다양한 변경이 가능하고 여러 가지 형태를 가질 수 있으므로 본 발명의 권리범위는 기술적 사상을 실현할 수 있는 균등물들을 포함하는 것으로 이해되어야 한다. 또한, 본 발명에서 제시된 목적 또는 효과는 특정 실시예가 이를 전부 포함하여야 한다거나 그러한 효과만을 포함하여야 한다는 의미는 아니므로, 본 발명의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.Since the description of the present invention is merely an embodiment for structural or functional description, the scope of the present invention should not be construed as being limited by the embodiment described in the text. That is, since the embodiment may have various changes and may have various forms, it should be understood that the scope of the present invention includes equivalents capable of realizing the technical idea. In addition, since the object or effect presented in the present invention does not mean that a specific embodiment should include all of them or only such effects, it should not be understood that the scope of the present invention is limited thereby.

한편, 본 출원에서 서술되는 용어의 의미는 다음과 같이 이해되어야 할 것이다.On the other hand, the meaning of the terms described in the present application should be understood as follows.

"제1", "제2" 등의 용어는 하나의 구성요소를 다른 구성요소로부터 구별하기 위한 것으로, 이들 용어들에 의해 권리범위가 한정되어서는 아니 된다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.Terms such as “first” and “second” are for distinguishing one component from another, and the scope of rights should not be limited by these terms. For example, a first component may be termed a second component, and similarly, a second component may also be termed a first component.

어떤 구성요소가 다른 구성요소에 "연결되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결될 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다고 언급된 때에는 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 한편, 구성요소들 간의 관계를 설명하는 다른 표현들, 즉 "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.When a component is referred to as being “connected” to another component, it should be understood that the component may be directly connected to the other component, but other components may exist in between. On the other hand, when it is mentioned that a certain element is "directly connected" to another element, it should be understood that the other element does not exist in the middle. On the other hand, other expressions describing the relationship between elements, that is, "between" and "immediately between" or "neighboring to" and "directly adjacent to", etc., should be interpreted similarly.

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한 복수의 표현을 포함하는 것으로 이해되어야 하고, "포함하다"또는 "가지다" 등의 용어는 실시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이며, 하나 또는 그 이상의 다른 특징이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The singular expression is to be understood as including the plural expression unless the context clearly dictates otherwise, and terms such as "comprises" or "have" refer to the embodied feature, number, step, action, component, part or these It is intended to indicate that a combination exists, and it should be understood that it does not preclude the possibility of the existence or addition of one or more other features or numbers, steps, operations, components, parts, or combinations thereof.

각 단계들에 있어 식별부호(예를 들어, a, b, c 등)는 설명의 편의를 위하여 사용되는 것으로 식별부호는 각 단계들의 순서를 설명하는 것이 아니며, 각 단계들은 문맥상 명백하게 특정 순서를 기재하지 않는 이상 명기된 순서와 다르게 일어날 수 있다. 즉, 각 단계들은 명기된 순서와 동일하게 일어날 수도 있고 실질적으로 동시에 수행될 수도 있으며 반대의 순서대로 수행될 수도 있다.Identifiers (eg, a, b, c, etc.) in each step are used for convenience of description, and the identification code does not describe the order of each step, and each step clearly indicates a specific order in context. Unless otherwise specified, it may occur in a different order from the specified order. That is, each step may occur in the same order as specified, may be performed substantially simultaneously, or may be performed in the reverse order.

본 발명은 컴퓨터가 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현될 수 있고, 컴퓨터가 읽을 수 있는 기록 매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록 장치를 포함한다. 컴퓨터가 읽을 수 있는 기록 매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장 장치, HDD, SSD 등이 있다. 또한, 컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산 방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The present invention can be embodied as computer-readable codes on a computer-readable recording medium, and the computer-readable recording medium includes all types of recording devices in which data readable by a computer system is stored. . Examples of the computer-readable recording medium include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, HDD, SSD, and the like. In addition, the computer-readable recording medium may be distributed in a network-connected computer system, and the computer-readable code may be stored and executed in a distributed manner.

여기서 사용되는 모든 용어들은 다르게 정의되지 않는 한, 본 발명이 속하는 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한 이상적이거나 과도하게 형식적인 의미를 지니는 것으로 해석될 수 없다.All terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs, unless otherwise defined. Terms defined in the dictionary should be interpreted as being consistent with the meaning of the context of the related art, and cannot be interpreted as having an ideal or excessively formal meaning unless explicitly defined in the present application.

도 1은 레이 트레이싱 장치에 의해 수행되는 레이 트레이싱 과정의 일 실시예를 설명하는 도면이다.1 is a view for explaining an embodiment of a ray tracing process performed by a ray tracing apparatus.

도 1을 참조하면, 레이 트레이싱 방식은 전역 조명(global illumination)에 따른 렌더링(rendering) 방식에 해당할 수 있다. 이는 다른 물체에서 반사되거나 굴절된 빛(Light)도 현재 물체의 영상에 영향을 준다는 것을 의미할 수 있다. 이로 인하여 반사, 굴절, 그림자 효과가 자연적으로 제공되기 때문에 현실감 있는 3D 영상을 생성할 수 있다.Referring to FIG. 1 , the ray tracing method may correspond to a rendering method according to global illumination. This may mean that light reflected or refracted from another object also affects the image of the current object. As a result, reflection, refraction, and shadow effects are naturally provided, so that realistic 3D images can be created.

도 1에서, 레이 트레이싱 장치는 먼저 각 픽셀(pixel) 당 카메라(Camera) 위치로부터 프라이머리 레이(primary ray, P)를 생성하여 해당 레이와 만나는 물체를 찾기 위한 계산을 수행할 수 있다. 레이 트레이싱 장치는 레이와 만나게 된 물체가 반사나 굴절의 성질이 있으면 레이와 물체가 만난 위치에서 반사 효과를 위한 반사 레이(reflection ray, R)나 굴절 효과를 위한 굴절 레이(refraction ray, F)를 생성할 수 있고, 또한 그림자 효과를 위하여 빛(Light) 방향으로 그림자 레이(shadow ray, S)를 생성할 수 있다. In FIG. 1 , the ray tracing apparatus may first generate a primary ray (P) from a camera position for each pixel and perform a calculation to find an object that meets the corresponding ray. The ray tracing device generates a reflection ray (R) for a reflection effect or a refraction ray (F) for a refraction effect at the location where the ray and the object meet if the object that meets the ray has a property of reflection or refraction. You can create a shadow ray (S) in the light direction for a shadow effect.

이 때, 해당 빛(Light) 위치로 향한 그림자 레이와 어떤 물체가 만나면 그림자가 생성이 되며 그렇지 않을 경우는 그림자가 생성되지 않는다. 반사 레이와 굴절 레이는 세컨더리 레이(secondary ray)라고 불리며 레이 트레이싱 장치는 각각의 레이에 대해 해당 레이와 만나는 물체를 찾기 위한 계산을 수행할 수 있다. 이러한 과정은 레이 트레이싱 장치에 의해 반복적(recursive)으로 수행될 수 있다.At this time, when a shadow ray directed to the corresponding light position and an object meet, a shadow is created, otherwise a shadow is not created. Reflected ray and refractive ray are called secondary ray, and the ray tracing device can perform a calculation for each ray to find an object that intersects that ray. This process may be performed recursively by the ray tracing device.

도 2는 레이 트레이싱 과정에서 사용되는 가속 구조로서 KD 트리의 일 실시예를 설명하는 도면이다.2 is a diagram for explaining an embodiment of a KD tree as an acceleration structure used in a ray tracing process.

도 2를 참조하면, 레이 트레이싱을 수행하기 위하여 전체 지오메트리 데이터(geometry data)(triangle의 좌표들로 구성)를 가지고 생성된 kd-트리(k-depth tree)나 BVH(Bounding Volume Hierarchy)와 같은 가속 구조(Acceleration Structure, AS)가 필수적으로 요구된다. 따라서, 레이 트레이싱을 수행하기 이전에 AS를 구축(build)할 필요가 있다. 이러한 가속 구조 구축(AS build)에는 연산량이 많이 필요하기 때문에 시간이 많이 소요될 수 있다.Referring to FIG. 2 , acceleration such as a k-depth tree or BVH (Bounding Volume Hierarchy) generated with full geometry data (consisting of triangle coordinates) in order to perform ray tracing An Acceleration Structure (AS) is essential. Therefore, it is necessary to build the AS before performing ray tracing. Building such an acceleration structure (AS build) may take a lot of time because a large amount of computation is required.

도 2에서, kd-트리의 전체 구성도를 설명하고 있다. kd-트리는 분할한 공간에 대하여 계층적(hierarchy) 구조를 갖는 이진 트리(binary tree)에 해당할 수 있다. kd-트리는 내부 노드(inner node)(top node 포함)와 리프 노드(leaf node)로 구성될 수 있으며, 리프 노드는 해당 노드와 교차(intersection)되는 객체(object)들을 포함하고 있는 공간에 대응될 수 있다. 즉, kd-트리는 공간 분할 트리(spatial partitioning tree)의 일종에 해당할 수 있다.In FIG. 2, the overall configuration diagram of the kd-tree is described. The kd-tree may correspond to a binary tree having a hierarchical structure with respect to the divided space. A kd-tree can be composed of an inner node (including a top node) and a leaf node, and a leaf node corresponds to a space containing objects that intersect with the corresponding node. can That is, the kd-tree may correspond to a kind of spatial partitioning tree.

반면, 내부 노드는 바운딩 박스(bounding box) 기반의 공간 영역을 가질 수 있으며 해당 공간 영역은 다시 2개의 영역들로 나뉘어서 두 개의 하위 노드에 할당될 수 있다. 결과적으로 내부 노드는 분할 평면과 이를 통해 분할된 두 개의 영역의 서브-트리(sub-tree)로 구성될 수 있고, 리프 노드는 일련의 삼각형(triangle)들 만을 포함할 수 있다.On the other hand, an internal node may have a spatial region based on a bounding box, and the spatial region may be divided into two regions and allocated to two lower nodes. As a result, an inner node may be composed of a sub-tree of a division plane and two regions divided through it, and a leaf node may include only a series of triangles.

한편, 공간을 분할하는 위치 p는 임의의 레이와 충돌(hit)하는 삼각형을 찾기 위한 비용(cost)(노드 방문 횟수, 삼각형과 교차되는지 계산하는 횟수 등)이 최소가 되는 지점에 해당할 수 있고, 해당 위치 p를 찾기 위해 현재 가장 많이 사용되는 방법은 SAH(Surface area heuristic)에 해당할 수 있다.On the other hand, the position p that divides the space may correspond to a point where the cost (number of node visits, the number of times to calculate whether a triangle intersects, etc.) for finding a triangle that hits a random ray is minimized, , the currently most used method to find the corresponding position p may correspond to a surface area heuristic (SAH).

도 3은 레이 트레이싱 장치에서 수행되는 레이 트레이싱 과정의 일반적인 예를 설명하는 도면이다.3 is a view for explaining a general example of a ray tracing process performed in a ray tracing apparatus.

도 3을 참조하면, 레이 트레이싱 과정은 재귀적으로 수행될 수 있고, (i) 레이 생성(Ray Generation) 단계(S310), (ii) 방문(Traversal) & 교차 테스트(Intersection Test) 단계(S330), (iii) 충돌 지점 계산(Hit Point Calculation) 단계(S350) 및 (iv) 쉐이딩(Shading) & 레이 셋업(Next Ray Set-up) 단계(S370)를 포함할 수 있다.Referring to FIG. 3 , the ray tracing process may be performed recursively, (i) Ray Generation step (S310), (ii) Visit (Traversal) & Intersection Test step (S330) , (iii) a collision point calculation (Hit Point Calculation) step (S350) and (iv) shading (Shading) & ray setup (Next Ray Set-up) step (S370) may include.

먼저 레이 생성(ray generation) 단계에서는 각각의 픽셀(pixel)에 대하여 시점 위치로부터 프라이머리 레이(primary ray)를 생성할 수 있다(단계 S310). 다음 단계에서는 kd-트리(kd-tree)와 bounding volume hierarchy (BVH)와 같은 가속 구조(AS)를 탐색하여 레이와 만나는 리프 노드를 찾을 수 있다(단계 S330). 여기에서, 리프 노드에는 삼각형(triangle)의 정보들이 저장되어 있다. First, in the ray generation step, a primary ray may be generated from a viewpoint position for each pixel (step S310 ). In the next step, a leaf node that meets the ray can be found by searching an acceleration structure (AS) such as a kd-tree and a bounding volume hierarchy (BVH) (step S330). Here, triangle information is stored in the leaf node.

다음의 교차 테스트(intersection test) 단계에서는 만난 리프 노드에 있는 모든 삼각형에 대하여 레이와 만나는지를 테스트할 수 있다(단계 S330). 이러한 과정은 레이와 만나는 삼각형을 찾을 때까지 반복적으로 수행될 수 있다. 그 후, 레이와 만난 삼각형에 대하여 충돌 지점 계산(hit point calculation) 단계에서 충돌 지점(hit point)를 계산할 수 있다(단계 S350). In the next intersection test step, it is possible to test whether all triangles in the met leaf nodes meet the ray (step S330). This process can be repeated until a triangle that intersects the ray is found. After that, it is possible to calculate a hit point in the hit point calculation step for the triangle met with the ray (step S350).

다음 단계인 쉐이딩(shading) 단계에서 레이-삼각형 충돌 지점(ray-triangle hit point) 상에서의 컬러(color) 값을 계산할 수 있다(단계 S370). 만약 조명으로 인하여 그림자 레이(shadow ray)의 발생이 필요하거나 충돌된 삼각형의 재질로 인한 세컨더리 레이(secondary ray)의 발생이 필요하면 이러한 정보를 레이 셋업(next ray set-up) 단계에서 결정하여 레이 생성(ray generation) 단계로 전송될 수 있다. 레이 생성(ray generation) 단계에서는 이러한 정보를 기반으로 그림자 레이 및 세컨더리 레이를 발생시킬 수 있다(단계 S310).In the next step, shading, a color value on a ray-triangle hit point may be calculated (step S370). If it is necessary to generate a shadow ray due to lighting or a secondary ray due to the material of the collided triangle, this information is determined in the next ray set-up stage and the ray It may be transmitted to the generation (ray generation) step. In the ray generation step, a shadow ray and a secondary ray may be generated based on this information (step S310).

도 4는 SW 연산과 전용 HW의 연동을 통해 레이 트레이싱을 처리하는 일 실시예를 설명하는 도면이다.4 is a view for explaining an embodiment of processing ray tracing through interworking of SW operation and dedicated HW.

도 4를 참조하면, 레이 트레이싱 과정은 계산량을 가장 많이 필요로 하는 트리 방문 & 교차 테스트(tree traversal & intersection test)와 충돌 지점 계산(hit point calculation) 부분을 전용 하드웨어(HW)에서 처리하고, 나머지 부분인 레이 생성(ray generation)과 쉐이딩(shading)은 소프트웨어(SW)적으로 처리하는 방식으로 수행될 수 있다.Referring to FIG. 4 , the ray tracing process processes the tree traversal & intersection test and hit point calculation, which require the most amount of computation, in dedicated hardware (HW), and the rest Part ray generation and shading may be performed in a software (SW) manner.

먼저 소프트웨어 부분인 레이 생성 단계에서는 각각의 픽셀에 대하여 시점(view point) 위치로부터 프라이머리 레이를 생성할 수 있다. 이 레이들에 대한 데이터 값이 하드웨어(HW)로 전송될 수 있다. 이 값은 레이의 벡터(vector) 값, 레이의 종류(예를 들어, primary ray, secondary ray, shadow ray 등)를 구별하기 위한 레이 타입(ray type) 값 등을 포함할 수 있다. First, in the ray generation step, which is a part of the software, a primary ray may be generated from a position of a view point for each pixel. Data values for these lads may be transmitted to hardware (HW). This value may include a vector value of the ray, a ray type value for distinguishing the type of ray (eg, primary ray, secondary ray, shadow ray, etc.).

하드웨어 부분에는 트리 방문 & 교차 테스트(tree traversal & intersection test)와 충돌 지점 계산(hit point calculation)을 수행할 수 있다. 하드웨어 부분에서 수행된 결과인 충돌 지점(hit point) 정보와 충돌된 삼각형 정보가 소프트웨어 부분으로 전송될 수 있다. 이는 충돌 삼각형(hit triangle)이 입력된 레이의 순서대로 결정된다는 가정하에 유용하며, 만약 그렇지 않으면 추가적인 정보(예를 들어, 몇 번째 입력된 레이인지를 구별하기 위한 레이 식별자(ray id))가 더 필요할 수 있다.In the hardware part, tree traversal & intersection test and hit point calculation can be performed. Hit point information and collision triangle information, which are results performed in the hardware part, may be transmitted to the software part. This is useful under the assumption that hit triangles are determined in the order of the input ray, otherwise additional information (e.g. ray id to distinguish which ray is input) is more useful. may be needed

스프트웨어인 쉐이딩(shading) 단계에서는 레이-삼각형 충돌 지점(ray-triangle hit point) 상에서의 컬러(color) 값을 계산할 수 있다다. 만약 조명으로 인하여 그림자 레이(shadow ray)의 발생이 필요하거나 또는 충돌된 삼각형의 재질로 인한 세컨더리 레이(secondary ray)의 발생이 필요하면 이러한 정보를 레이 셋업(next ray set-up) 단계에서 결정하여 레이 생성(ray generation) 단계로 보내어 질 수 있다. 레이 생성(Ray generation) 단계에서는 이러한 정보를 기반으로 그림자 레이(shadow ray) 및 세컨더리 레이(secondary ray)를 발생시킬 수 있다. 발생된 레이에 대한 데이터 값은 다시 하드웨어 부분으로 보내질 수 있다.In the software shading step, it is possible to calculate a color value on a ray-triangle hit point. If it is necessary to generate a shadow ray due to lighting or to generate a secondary ray due to the material of the collided triangle, this information is determined in the next ray set-up stage. It can be sent to the ray generation stage. In the ray generation step, a shadow ray and a secondary ray may be generated based on this information. The data values for the generated ray can be sent back to the hardware part.

도 4에서, 하드웨어(HW) 부분과 소프트웨어(SW) 부분이 병렬적으로 수행될 수 있기 때문에 성능 향상을 기대할 수 있으나, 두 개의 장치들 간에 대규모의 데이터 전송이 필요하게 되어 장치들 간에 대기시간이 늘어남으로 인해 성능이 저하될 수 있다.In FIG. 4 , performance improvement can be expected because the hardware (HW) part and the software (SW) part can be performed in parallel, but large-scale data transmission is required between the two devices, so that the latency between the devices is reduced. Stretching can degrade performance.

도 5는 본 발명의 일 실시예에 따른 장치들 간에 대역폭을 줄이는 레이 트레이싱 장치를 설명하는 도면이다.5 is a diagram illustrating a ray tracing apparatus for reducing bandwidth between apparatuses according to an embodiment of the present invention.

도 5를 참조하면, 레이 트레이싱 장치(500)는 소프트웨어 유닛부(510) 및 전용 하드웨어 유닛부(530)를 포함할 수 있다. 소프트웨어 유닛부(510)는 레이 정보 구축 모듈(511), 레이 생성 모듈(513), 충돌 지점 계산 모듈(515) 및 쉐이딩 & 레이 셋업 모듈(516)을 포함할 수 있다. 전용 하드웨어 유닛부(530)는 레이 생성 유닛(531), 방문 교차 테스트 유닛(533), 리오더 버퍼 유닛(535), 충돌 지점 계산 유닛(537) 및 레이 셋업 유닛(539)을 포함할 수 있다. 일 실시예에서, 소프트웨어 유닛부(510)는 중앙 처리 유닛(CPU)을 포함하여 구현될 수 있고, 전용 하드웨어 유닛부(530)는 그래픽 처리 유닛(GPU)을 포함하여 구현될 수 있다.Referring to FIG. 5 , the ray tracing apparatus 500 may include a software unit unit 510 and a dedicated hardware unit unit 530 . The software unit unit 510 may include a ray information construction module 511 , a ray generation module 513 , a collision point calculation module 515 , and a shading & ray setup module 516 . The dedicated hardware unit unit 530 may include a ray generation unit 531 , a visited intersection test unit 533 , a reorder buffer unit 535 , a collision point calculation unit 537 , and a ray setup unit 539 . In an embodiment, the software unit 510 may be implemented including a central processing unit (CPU), and the dedicated hardware unit 530 may be implemented including a graphics processing unit (GPU).

소프트웨어 유닛부(510)는 소프트웨어를 통해, (a) 레이 생성을 위한 레이 정보(ray information)를 구축하는 레이 정보 구축 연산과 (b) 레이 정보를 이용하여 레이 트레이싱(ray tracing)을 위한 제1 레이를 생성하는 레이 생성 연산과 (c) 제2 레이와 충돌하는 충돌 삼각형 정보를 기초로 충돌 지점을 계산하는 충돌 지점 계산 연산 및 (d) 충돌 지점 상에서의 컬러 값을 산출하는 쉐이딩(shading) 연산을 각각 처리할 수 있다. 즉, 소프트웨어 유닛부(510)에 포함된 각 모듈들에 의해서 각각의 연산이 독립적으로 처리될 수 있다.The software unit unit 510, through software, (a) a ray information construction operation for building ray information for ray generation and (b) a first for ray tracing using ray information A ray generation operation that generates a ray, (c) a collision point calculation operation that calculates a collision point based on collision triangle information that collides with the second ray, and (d) a shading operation that calculates a color value on the collision point can be processed individually. That is, each operation may be independently processed by each module included in the software unit unit 510 .

일 실시예에서, 소프트웨어 유닛부(510)는 쉐이딩 연산 단계에서 그림자(shadow) 레이 또는 세컨더리(secondary) 레이의 발생이 검출되면 그림자 레이 또는 세컨더리 레이에 관한 레이 정보를 생성하여 레이 정보 구축 연산 단계로 전달하는 레이 셋업(Set-up) 연산을 더 처리할 수 있다. 즉, 쉐이딩 연산과 레이 셋업 연산은 쉐이딩 & 레이 셋업 모듈(517)에 의해 수행될 수 있다.In one embodiment, the software unit 510 generates ray information about a shadow ray or a secondary ray when the occurrence of a shadow ray or a secondary ray is detected in the shading operation step to the ray information construction operation step. It can further process the ray set-up operation to be transmitted. That is, the shading operation and the ray setup operation may be performed by the shading & ray setup module 517 .

한편, 레이 트레이싱의 전 과정은 반복적(recursive)으로 수행될 수 있고, 이 과정에서 조명으로 인하여 그림자 레이의 발생이 필요하거나 또는 충돌된 삼각형의 재질로 인하여 세컨더리 레이의 발생이 필요한 경우 해당 정보들은 소프트웨어 유닛부(510)에 의해 레이 셋업 연산 단계에서 처리될 수 있다. 레이 셋업 연산 단계에서 처리된 정보들은 레이 정보 구축 연산 단계로 전달될 수 있고, 레이 정보 구축 연산 단계에서는 해당 정보를 외부의 전용 하드웨어 유닛부(530)에게 전송하거나 또는 내부의 다른 연산 단계로 전달할 수 있다.On the other hand, the entire process of ray tracing can be performed recursively. In this process, if shadow ray generation is required due to lighting or secondary ray generation is required due to the material of the collided triangle, the information is stored in software. It may be processed in the ray setup operation step by the unit unit 510 . The information processed in the ray setup operation step may be transferred to the ray information construction operation step, and in the ray information establishment operation step, the information may be transmitted to the external dedicated hardware unit unit 530 or transferred to another internal operation step. have.

일 실시예에서, 소프트웨어 유닛부(510)는 레이 정보 구축 연산 단계에서 프레임 내의 각 픽셀에 대해 레이 생성을 위한 정보를 레이 정보로서 구축하여 레이 생성 연산 단계로 전달하면서 전용 하드웨어 유닛부(530)로 일방 전송할 수 있다(S551). 레이 정보 구축 연산은 레이 정보 구축 모듈(511)에 의해 수행될 수 있다. 즉, 소프트웨어 유닛부(510)에서 전용 하드웨어 유닛부(530)로의 데이터 이동은 소프트웨어 유닛부(510)에 의해 생성된 레이 정보로 제한될 수 있다. 이 때, 레이 정보는 프라이머리(primary) 레이를 생성할 수 있는 정보를 포함할 수 있다.In one embodiment, the software unit unit 510 builds the information for ray generation as ray information for each pixel in the frame in the ray information construction operation step and transmits it to the ray generation operation step to the dedicated hardware unit unit 530 . One-way transmission is possible (S551). The ray information construction operation may be performed by the ray information construction module 511 . That is, the data movement from the software unit unit 510 to the dedicated hardware unit unit 530 may be limited to the ray information generated by the software unit unit 510 . In this case, the ray information may include information for generating a primary ray.

일 실시예에서, 소프트웨어 유닛부(510)는 레이 정보 구축 연산 단계에서 레이 정보가 그림자 레이 또는 세컨더리 레이와 연관된 경우에는 전용 하드웨어 유닛부(530)로의 일방 전송 동작을 생략할 수 있다. 즉, 레이 트레이싱 장치(500)는 전용 하드웨어 유닛부(530)에서 자체적으로 충돌 지점 계산 연산과 레이 셋업 연산을 수행하도록 구현됨으로써 소프트웨어 유닛부(510)에서 전용 하드웨어 유닛부(530)로의 데이터 전송량을 대폭 줄일 수 있다. 소프트웨어 유닛부(510)는 프라이머리 레이에 관한 레이 정보만을 외부의 전용 하드웨어 유닛부(530)로 전송하고 그림자 레이 또는 세컨더리 레이에 관한 레이 정보는 내부의 연산 단계에만 전달할 수 있다.In one embodiment, the software unit 510 may omit the one-way transmission operation to the dedicated hardware unit 530 when the ray information is associated with a shadow ray or a secondary ray in the ray information construction operation step. That is, the ray tracing apparatus 500 is implemented to perform collision point calculation operation and ray setup operation by itself in the dedicated hardware unit unit 530 , thereby reducing the data transmission amount from the software unit unit 510 to the dedicated hardware unit unit 530 . can be significantly reduced. The software unit unit 510 transmits only ray information related to the primary ray to the external dedicated hardware unit unit 530, and ray information related to the shadow ray or the secondary ray may be transmitted only to the internal operation step.

일 실시예에서, 소프트웨어 유닛부(510)는 레이 생성 연산 단계에서 레이 정보를 기초로 시점 위치로부터 프라이머리(primary) 레이를 제1 레이로서 생성하여 해당 프라이머리 레이의 데이터 값을 충돌 지점 계산 연산 단계로 전달할 수 있다. 레이 생성 연산은 레이 생성 모듈(513)에 의해 수행될 수 있다. In an embodiment, the software unit 510 generates a primary ray as a first ray from a viewpoint position based on ray information in the ray generation operation step and calculates a collision point calculation operation for a data value of the corresponding primary ray can be passed in stages. The ray generation operation may be performed by the ray generation module 513 .

이 때, 제1 레이는 레이 정보를 기초로 생성된 레이로서 소프트웨어 유닛부(510)에 의해 소프트웨어 동작에 따라 생성된 레이에 해당할 수 있고, 레이에 관한 데이터 값은 레이의 벡터(vector) 값, 레이의 종류를 구별하기 위한 레이 타입(ray type) 값을 포함할 수 있다. 한편, 소프트웨어 유닛부(510)의 레이 생성 모듈(513)에 의해 생성된 제1 레이의 순서는 전용 하드웨어 유닛부(530)의 레이 생성 유닛(531)에 의해 생성된 제2 레이의 순서와 동일할 수 있다.At this time, the first ray may correspond to a ray generated according to a software operation by the software unit 510 as a ray generated based on ray information, and a data value related to the ray is a vector (vector) value of the ray , may include a ray type value for distinguishing the type of ray. On the other hand, the order of the first ray generated by the ray generation module 513 of the software unit 510 is the same as the order of the second ray generated by the ray generation unit 531 of the dedicated hardware unit 530 . can do.

일 실시예에서, 소프트웨어 유닛부(510)는 충돌 지점 계산 연산 단계에서 충돌 삼각형 정보와 제1 레이를 기초로 충돌 삼각형과 제1 레이 간의 충돌 지점의 좌표를 산출할 수 있다. 충돌 지점 계산 연산은 충돌 지점 계산 모듈(515)에 의해 수행될 수 있다. 충돌 지점 계산 연산은 트리 방문 & 교차 테스트에 비하여 연산량이 매우 작기 때문에 소프트웨어 유닛부(510)에 의해 소프트웨어적으로 처리되더라도 레이 트레이싱의 전체 성능에 영향을 미치지 않을 수 있다.In one embodiment, the software unit 510 may calculate the coordinates of the collision point between the collision triangle and the first ray based on the collision triangle information and the first ray in the collision point calculation operation step. The collision point calculation operation may be performed by the collision point calculation module 515 . The collision point calculation operation may not affect the overall performance of ray tracing even if it is processed in software by the software unit 510 because the amount of calculation is very small compared to the tree visit & intersection test.

전용 하드웨어 유닛부(530)는 소프트웨어 유닛부(510)과 연동하는 전용 하드웨어로서, 레이 정보를 기초로 방문 교차 테스트를 위한 제2 레이를 생성하는 레이 생성 유닛(531)과 제2 레이를 기초로 방문 교차 테스트 연산을 수행하는 방문 교차 테스트 유닛(533), 방문 교차 테스트 연산으로 출력되는 아웃오브오더(out-of-order) 결과를 인오더(in-order) 결과로 변경하는 리오더 버퍼(reorder buffer) 유닛(535), 제2 레이와 충돌 삼각형 정보를 기초로 충돌 지점을 계산하는 충돌 지점 계산 유닛(537) 및 그림자(shadow) 레이 또는 세컨더리(secondary) 레이에 관한 정보를 생성하여 레이 생성 유닛(531)으로 전달하는 레이 셋업(Set-up) 유닛(539)으로 구성될 수 있다. The dedicated hardware unit unit 530 is dedicated hardware that interoperates with the software unit unit 510, and based on the ray generation unit 531 and the second ray that generates the second ray for the visiting cross test based on the ray information. A visited cross test unit 533 that performs a visited cross test operation, and a reorder buffer that changes an out-of-order result output from the visited cross test operation into an in-order result. ) unit 535, a collision point calculation unit 537 that calculates a collision point based on the second ray and collision triangle information, and a ray generation unit by generating information about a shadow ray or secondary ray ( It may be configured with a ray setup unit 539 that forwards to 531 .

즉, 전용 하드웨어 유닛부(530)는 레이 트레이싱 과정에서 레이 생성 연산과 계산량을 많이 필요로 하는 트리 방문 & 교차 테스트 연산 각각을 전용 하드웨어를 통해 처리함과 동시에 소프트웨어의 동작과 별개로 충돌 지점 계산 연산과 레이 셋업 연산을 독립적으로 처리함으로써 소프트웨어 유닛부(510)와의 데이터 전송량을 대폭 줄일 수 있다. 이 때, 전용 하드웨어 유닛부(530)에서 소프트웨어 유닛부(510)로 전송되는 데이터는 충돌된 삼각형들에 대한 정보만 해당되며, 충돌 지점에 관한 정보는 전송할 필요가 없다(S553).That is, the dedicated hardware unit unit 530 processes each of the tree visit & cross test operations that require a lot of ray generation operation and calculation amount in the ray tracing process through dedicated hardware, and at the same time calculates the collision point separately from the operation of the software. By independently processing the ray setup operation and the ray setup operation, the amount of data transmission with the software unit unit 510 can be significantly reduced. At this time, the data transmitted from the dedicated hardware unit 530 to the software unit 510 corresponds only to information on the collided triangles, and there is no need to transmit information on the collision point ( S553 ).

일 실시예에서, 방문 교차 테스트 유닛(533)은 제2 레이를 기초로 가속 구조(Acceleration Structure, AS)를 탐색하여 제2 레이와 연관된 리프 노드를 결정하는 방문 연산과 리프 노드에 포함된 모든 삼각형들에 관한 교차 테스트를 수행하여 제2 레이와 충돌하는 충돌 삼각형을 결정하는 교차 테스트 연산을 각각 처리할 수 있다. 즉, 방문 교차 테스트 유닛(533)은 사전에 구축된 가속 구조를 이용하여 방문 연산과 교차 테스트 연산을 각각 독립적으로 처리할 수 있다.In one embodiment, the visited intersection test unit 533 searches an Acceleration Structure (AS) based on the second ray to determine a leaf node associated with the second ray and a visiting operation for all triangles included in the leaf node. Each of the intersection test operations for determining a collision triangle that collides with the second ray can be processed by performing an intersection test on the ray. That is, the visited intersection test unit 533 may independently process the visited operation and the intersection test operation using a pre-built acceleration structure.

일 실시예에서, 리오더 버퍼 유닛(535)은 레이 생성 유닛(531)으로부터 출력되어 방문 교차 테스트 유닛(533)으로 입력되는 제2 레이를 저장하는 제1 단계, 방문 교차 테스트 유닛(533)으로부터 출력되는 충돌 삼각형 정보를 수신하는 제2 단계 및 충돌 삼각형 정보와 연관된 제2 레이의 우선순위에 따라 해당 충돌 삼각형 정보를 출력하는 제3 단계를 순차적으로 수행함으로써 소프트웨어 유닛부(510)로부터 일방 전송되는 레이 정보의 순서에 대응하여 충돌 삼각형 정보를 일방 전송할 수 있다. In one embodiment, the reorder buffer unit 535 is a first step of storing the second ray output from the ray generation unit 531 and input to the visited intersection test unit 533, output from the visited intersection test unit 533 Ray transmitted from the software unit unit 510 by sequentially performing the second step of receiving the collision triangle information and the third step of outputting the corresponding collision triangle information according to the priority of the second ray associated with the collision triangle information Corresponding to the order of the information, the collision triangle information may be transmitted unilaterally.

보다 구체적으로, 리오더 버퍼 유닛(535)은 전용 하드웨어 유닛부(530)가 소프트웨어 유닛부(510)로부터 레이 정보를 수신하여 레이 생성 유닛(531)을 통해 제2 레이를 생성하는 단계에서 방문 교차 테스트 유닛(533)으로 전달되는 제2 레이에 관한 데이터를 할당받아 저장할 수 있다. 또한, 리오더 버퍼 유닛(535)은 방문 교차 테스트 유닛(533)으로부터 충돌 삼각형 정보를 수신하여 연관된 제2 레이에 대한 처리 동작이 완료되었음을 결정할 수 있다.More specifically, the reorder buffer unit 535 performs a visit cross test in the step where the dedicated hardware unit 530 receives the ray information from the software unit 510 and generates the second ray through the ray generation unit 531 . The data regarding the second ray transmitted to the unit 533 may be allocated and stored. Further, the reorder buffer unit 535 may receive the collision triangle information from the visited intersection test unit 533 to determine that the processing operation for the associated second ray is complete.

만약 처리 완료된 제2 레이가 해당 리오더 버퍼 내에서 가장 오래된 제2 레이(즉, 우선순위가 가장 높은 제2 레이)에 해당하는 경우 리오더 버퍼 유닛(535)은 해당 제2 레이를 출력 결과로서 제공할 수 있고, 전용 하드웨어 유닛부(530)에 의해 충돌 삼각형 정보만이 소프트웨어 유닛부(510)로 전송될 수 있다.If the processed second ray corresponds to the oldest second ray in the reorder buffer (that is, the second ray having the highest priority), the reorder buffer unit 535 provides the second ray as an output result. Also, only the collision triangle information may be transmitted to the software unit 510 by the dedicated hardware unit 530 .

일반적으로 전용 하드웨어 유닛부(530)의 방문 교차 테스트 유닛(533)에서 수행되는 방문 교차 테스트는 고성능 처리를 위하여 무순서(out-of-order)로 수행될 수 있다. 즉, 충돌 삼각형(hit triangle)이 입력된 제2 레이의 순서대로 결정되지 않을 수 있다. 소프트웨어 유닛부(510)로부터 요청된 트리 방문 & 교차 테스트가 무순서(out-of-order)로 수행되는 반면, 인오더(in-order)로 완료되기 위하여 전용 하드웨어 유닛부(530)는 리오더 버퍼 유닛(535)을 포함하여 구현될 수 있다. 예를 들어, 리오더 버퍼 유닛(535)은 파이프라인 RISC 프로세서에서 많이 사용되는 리오더 버퍼(reorder buffer)로 구현될 수 있다.In general, the visited cross test performed by the visited cross test unit 533 of the dedicated hardware unit 530 may be performed out-of-order for high-performance processing. That is, the hit triangle may not be determined in the order of the input second ray. The tree visit & intersection test requested from the software unit 510 is performed out-of-order, while the dedicated hardware unit 530 has a reorder buffer to be completed in-order. It may be implemented including a unit 535 . For example, the reorder buffer unit 535 may be implemented as a reorder buffer that is frequently used in a pipelined RISC processor.

일 실시예에서, 충돌 지점 계산 유닛(537)은 방문 교차 테스트 유닛(533)으로부터 출력되는 충돌 삼각형 정보와 레이 생성 유닛(531)에 의해 생성된 제2 레이를 기초로 충돌 삼각형과 제2 레이 간의 충돌 지점의 좌표를 계산할 수 있다. 즉, 전용 하드웨어 유닛부(530)는 소프트웨어 유닛부(510)에서 수행되는 충돌 지점 계산 연산과 독립적으로 충돌 지점 계산 연산을 수행하는 전용 하드웨어로서 충돌 지점 계산 유닛(537)을 포함하여 구현될 수 있다.In one embodiment, the collision point calculation unit 537 is configured to perform an interpolation between the collision triangle and the second ray based on the collision triangle information output from the visited intersection test unit 533 and the second ray generated by the ray generation unit 531 . The coordinates of the collision point can be calculated. That is, the dedicated hardware unit unit 530 may be implemented by including the collision point calculation unit 537 as dedicated hardware for performing the collision point calculation operation independently of the collision point calculation operation performed by the software unit unit 510 . .

일 실시예에서, 레이 셋업 유닛(539)은 충돌 지점의 좌표에서 그림자 레이 또는 세컨더리 레이의 발생 여부를 결정하여 해당 레이에 관한 정보를 생성할 수 있다. 즉, 전용 하드웨어 유닛부(530)는 소프트웨어 유닛부(510)에서 수행되는 레이 셋업 연산과 독립적으로 레이 셋업 연산을 수행하는 전용 하드웨어로서 레이 셋업 유닛(539)을 포함하여 구현될 수 있다. 한편, 레이 셋업 유닛(539)은 그림자 레이 또는 세컨더리 레이에 관한 정보를 레이 생성 유닛(531)에 게 전달할 수 있다.In an embodiment, the ray setup unit 539 may generate information about the corresponding ray by determining whether a shadow ray or a secondary ray is generated at the coordinates of the collision point. That is, the dedicated hardware unit unit 530 may be implemented including the ray setup unit 539 as dedicated hardware for performing the ray setup operation independently of the ray setup operation performed by the software unit unit 510 . On the other hand, the ray setup unit 539 may transmit information about the shadow ray or the secondary ray to the ray generation unit 531 .

도 6 및 7은 도 5의 레이 트레이싱 장치에서 수행되는 장치들 간에 대역폭을 줄이는 레이 트레이싱 과정의 일 실시예를 설명하는 순서도이다.6 and 7 are flowcharts illustrating an embodiment of a ray tracing process for reducing bandwidth between devices performed in the ray tracing apparatus of FIG. 5 .

도 6을 참조하면, 레이 트레이싱 장치(500)는 소프트웨어 유닛부(510)를 통해 레이 생성을 위한 레이 정보(ray information)를 생성하여 전용 하드웨어 유닛부(530)에게 일방 전송할 수 있다(단계 S610). 일 실시예에서, 소프트웨어 유닛부(510)는 레이 정보 구축 연산 단계에서 프레임 내의 각 픽셀에 대해 레이 생성을 위한 정보를 레이 정보로서 구축하고, 레이 정보를 레이 생성 연산 단계로 전달하면서 레이 정보를 전용 하드웨어 유닛부(530)로 일방 전송할 수 있다.Referring to FIG. 6 , the ray tracing apparatus 500 may generate ray information for ray generation through the software unit unit 510 and transmit it one-way to the dedicated hardware unit unit 530 (step S610). . In one embodiment, the software unit unit 510 constructs information for ray generation as ray information for each pixel in a frame in the ray information construction operation step, and transfers the ray information to the ray generation operation step while dedicating the ray information. It can be unidirectionally transmitted to the hardware unit unit 530 .

또한, 레이 트레이싱 장치(500)는 전용 하드웨어 유닛부(530)를 통해 레이 정보를 기초로 방문 교차 테스트를 위한 제2 레이를 생성할 수 있다(단계 S620). In addition, the ray tracing apparatus 500 may generate a second ray for a visiting cross test based on the ray information through the dedicated hardware unit 530 (step S620).

또한, 레이 트레이싱 장치(500)는 전용 하드웨어 유닛부(530)를 통해 제2 레이를 기초로 방문 교차 테스트 연산을 수행할 수 있다(단계 S630). 일 실시예에서, 전용 하드웨어 유닛부(530)는 방문 교차 테스트 유닛(533)을 통해 방문 교차 테스트 연산의 결과를 리오더 버퍼 유닛(535) 및 충돌 지점 계산 유닛(537) 각각에게 전달할 수 있다.Also, the ray tracing apparatus 500 may perform a visiting cross test operation based on the second ray through the dedicated hardware unit 530 (step S630). In an embodiment, the dedicated hardware unit unit 530 may transmit the result of the visited intersection test operation to the reorder buffer unit 535 and the collision point calculation unit 537 respectively through the visited intersection test unit 533 .

또한, 레이 트레이싱 장치(500)는 전용 하드웨어 유닛부(530)를 통해 방문 교차 테스트 연산으로 출력되는 아웃오브오더(out-of-order) 결과를 인오더(in-order) 결과로 변경하여 소프트웨어 유닛부(510)에게 일방 전송할 수 있다(단계 S640).In addition, the ray tracing apparatus 500 converts an out-of-order result output as an in-order cross-test operation through the dedicated hardware unit unit 530 into an in-order result to form a software unit. One-way transmission is possible to the unit 510 (step S640).

또한, 레이 트레이싱 장치(500)는 소프트웨어 유닛부(510)를 통해 레이 정보를 이용하여 제1 레이를 생성하고 제1 레이와 충돌 삼각형 정보를 기초로 충돌 지점을 계산할 수 있다(단계 S650). 레이 트레이싱 장치(500)는 소프트웨어 유닛부(510)를 통해 충돌 지점 상에서의 컬러 값을 산출할 수 있다(단계 S660). 레이 트레이싱 장치(500)는 소프트웨어 유닛부(510)를 통해 프레임 내의 모든 픽셀에 대한 컬러 값이 결정된 경우 프레임에 관한 이미지를 출력할 수 있다(단계 S670).In addition, the ray tracing apparatus 500 may generate a first ray using ray information through the software unit unit 510 and calculate a collision point based on the first ray and collision triangle information (step S650). The ray tracing apparatus 500 may calculate a color value on the collision point through the software unit 510 (step S660). When the color values for all pixels in the frame are determined through the software unit unit 510, the ray tracing apparatus 500 may output an image related to the frame (step S670).

도 7을 참조하면, 레이 트레이싱 장치(500)는 전용 하드웨어 유닛부(530)의 충돌 지점 계산 유닛(537)을 통해, 소프트웨어 유닛부(510)의 동작과 별개로 방문 교차 테스트 연산으로 출력되는 충돌 삼각형 정보와 제2 레이 간의 충돌 지점을 계산할 수 있다(단계 S710). 레이 트레이싱 장치(500)는 전용 하드웨어 유닛부(530)의 레이 셋업 유닛(539)을 통해, 소프트웨어 유닛부(510)의 동작과 별개로 충돌 지점을 기준으로 그림자(shadow) 레이 또는 세컨더리(secondary) 레이에 관한 정보를 생성하여 레이 생성 유닛(531)으로 전달할 수 있다(단계 S730). 레이 트레이싱 장치(500)는 전용 하드웨어 유닛부(530)의 레이 생성 유닛(531)을 통해, 그림자 레이 또는 세컨더리 레이를 생성할 수 있다(단계 S750).Referring to FIG. 7 , the ray tracing device 500 through the collision point calculation unit 537 of the dedicated hardware unit 530 , the collision output as a visit intersection test operation separately from the operation of the software unit 510 . It is possible to calculate the collision point between the triangle information and the second ray (step S710). The ray tracing device 500 through the ray setup unit 539 of the dedicated hardware unit 530, independent of the operation of the software unit 510, a shadow ray or secondary based on the collision point. The ray-related information may be generated and transmitted to the ray generating unit 531 (step S730). The ray tracing apparatus 500 may generate a shadow ray or a secondary ray through the ray generation unit 531 of the dedicated hardware unit 530 (step S750).

상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although the above has been described with reference to the preferred embodiments of the present invention, those skilled in the art can variously modify and change the present invention within the scope without departing from the spirit and scope of the present invention as set forth in the claims below. You will understand that it can be done.

500: 레이 트레이싱 장치
510: 소프트웨어 유닛부
511: 레이 정보 구축 모듈 513: 레이 생성 모듈
515: 충돌 지점 계산 모듈 517: 쉐이딩 & 레이 셋업 모듈
530: 전용 하드웨어 유닛부 531: 레이 생성 유닛
533: 방문 교차 테스트 유닛 535: 리오더 버퍼 유닛
537: 충돌 지점 계산 유닛 539: 레이 셋업 유닛
500: ray tracing device
510: software unit unit
511: ray information building module 513: ray generating module
515: Collision Point Calculation Module 517: Shading & Ray Setup Module
530: dedicated hardware unit 531: ray generation unit
533: visit cross test unit 535: reorder buffer unit
537: collision point calculation unit 539: ray setup unit

Claims (15)

소프트웨어를 통해, (a) 레이 생성을 위한 레이 정보(ray information)를 구축하는 레이 정보 구축 연산과 (b) 상기 레이 정보를 이용하여 레이 트레이싱(ray tracing)을 위한 제1 레이를 생성하는 레이 생성 연산과 (c) 제2 레이와 충돌하는 충돌 삼각형 정보를 기초로 충돌 지점을 계산하는 충돌 지점 계산 연산 및 (d) 상기 충돌 지점 상에서의 컬러 값을 산출하는 쉐이딩(shading) 연산을 각각 처리하는 소프트웨어 유닛부; 및
상기 소프트웨어 유닛부와 연동하는 전용 하드웨어로서, 상기 레이 정보를 기초로 방문 교차 테스트를 위한 상기 제2 레이를 생성하는 레이 생성 유닛과 상기 제2 레이를 기초로 방문 교차 테스트 연산을 수행하는 방문 교차 테스트 유닛과 상기 방문 교차 테스트 연산으로 출력되는 아웃오브오더(out-of-order) 결과를 인오더(in-order) 결과로 변경하는 리오더 버퍼(reorder buffer) 유닛과 상기 제2 레이와 충돌 삼각형 정보를 기초로 충돌 지점을 계산하는 충돌 지점 계산 유닛 및 그림자(shadow) 레이 또는 세컨더리(secondary) 레이에 관한 정보를 생성하여 상기 레이 생성 유닛으로 전달하는 레이 셋업(Set-up) 유닛으로 구성된 전용 하드웨어 유닛부를 포함하고,
상기 소프트웨어 유닛부 및 상기 전용 하드웨어 유닛부 각각은 상호 독립적으로 구현되고 상호 간에는 상기 레이 정보와 상기 충돌 삼각형 정보의 일방향 전송만이 각각 수행되는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치.
Through software, (a) a ray information construction operation for constructing ray information for ray generation and (b) ray generation for generating a first ray for ray tracing using the ray information Software that processes the calculation and (c) the collision point calculation calculation for calculating the collision point based on the collision triangle information that collides with the second ray, and (d) the shading calculation for calculating the color value on the collision point unit unit; and
Dedicated hardware interoperating with the software unit, a ray generation unit that generates the second ray for a visited intersection test based on the ray information, and a visited intersection test that performs a visited intersection test operation based on the second ray A reorder buffer unit that changes an out-of-order result output from the unit and the visited intersection test operation to an in-order result, and the second ray and collision triangle information A dedicated hardware unit consisting of a collision point calculation unit that calculates a collision point based on a collision point calculation unit and a ray set-up unit that generates information about a shadow ray or a secondary ray and transmits it to the ray generation unit including,
Each of the software unit unit and the dedicated hardware unit unit is implemented independently of each other, and only one-way transmission of the ray information and the collision triangle information is performed between each other.
제1항에 있어서, 상기 소프트웨어 유닛부는
상기 쉐이딩 연산 단계에서 그림자(shadow) 레이 또는 세컨더리(secondary) 레이의 발생이 검출되면 상기 그림자 레이 또는 상기 세컨더리 레이에 관한 레이 정보를 생성하여 상기 레이 정보 구축 연산 단계로 전달하는 레이 셋업(Set-up) 연산을 더 처리하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치.
The method of claim 1, wherein the software unit unit
When the occurrence of a shadow ray or a secondary ray is detected in the shading operation step, ray information about the shadow ray or the secondary ray is generated and transmitted to the ray information construction operation step Set-up (Set-up) ) A ray tracing device that reduces bandwidth between devices, characterized in that it further processes computation.
제1항에 있어서, 상기 소프트웨어 유닛부는
상기 레이 정보 구축 연산 단계에서 프레임 내의 각 픽셀에 대해 레이 생성을 위한 정보를 상기 레이 정보로서 구축하여 상기 레이 생성 연산 단계로 전달하면서 상기 전용 하드웨어 유닛부로 일방 전송하고,
상기 레이 정보가 상기 그림자 레이 또는 상기 세컨더리 레이와 연관된 경우에는 상기 일방 전송을 생략하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치.
The method of claim 1, wherein the software unit unit
In the ray information construction operation step, information for ray generation for each pixel in the frame is constructed as the ray information and transmitted to the ray generation operation step while being transmitted to the dedicated hardware unit unit,
When the ray information is associated with the shadow ray or the secondary ray, the ray tracing device for reducing the bandwidth between devices, characterized in that the one-way transmission is omitted.
제3항에 있어서, 상기 소프트웨어 유닛부는
상기 레이 생성 연산 단계에서 상기 레이 정보를 기초로 시점 위치로부터 프라이머리(primary) 레이를 상기 제1 레이로서 생성하여 해당 프라이머리 레이의 데이터 값을 상기 충돌 지점 계산 연산 단계로 전달하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치.
4. The method of claim 3, wherein the software unit unit
In the ray generation operation step, a primary ray is generated as the first ray from a viewpoint based on the ray information, and a data value of the corresponding primary ray is transferred to the collision point calculation operation step. A ray tracing device that reduces bandwidth between devices.
제1항에 있어서, 상기 소프트웨어 유닛부는
상기 충돌 지점 계산 연산 단계에서 상기 충돌 삼각형 정보와 상기 제1 레이를 기초로 충돌 삼각형과 상기 제1 레이 간의 충돌 지점의 좌표를 산출하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치.
The method of claim 1, wherein the software unit unit
Ray tracing device reducing the bandwidth between devices, characterized in that calculating the coordinates of the collision point between the collision triangle and the first ray based on the collision triangle information and the first ray in the collision point calculation operation step.
제1항에 있어서, 상기 방문 교차 테스트 유닛은
상기 제2 레이를 기초로 가속 구조(Acceleration Structure, AS)를 탐색하여 상기 제2 레이와 연관된 리프 노드를 결정하는 방문 연산과 상기 리프 노드에 포함된 모든 삼각형들에 관한 교차 테스트를 수행하여 상기 제2 레이와 충돌하는 충돌 삼각형을 결정하는 교차 테스트 연산을 각각 처리하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치.
The method of claim 1, wherein the visited cross-test unit is
The second ray is searched for an acceleration structure (AS) based on the second ray, and a visit operation to determine a leaf node associated with the second ray and an intersection test for all triangles included in the leaf node are performed. A ray tracing device that reduces bandwidth between devices, each processing an intersection test operation to determine a collision triangle that collides with two rays.
제1항에 있어서, 상기 리오더 버퍼 유닛은
상기 레이 생성 유닛으로부터 출력되는 상기 제2 레이를 저장하는 제1 단계, 상기 방문 교차 테스트 유닛으로부터 출력되는 상기 충돌 삼각형 정보를 수신하는 제2 단계 및 상기 충돌 삼각형 정보와 연관된 제2 레이의 우선순위에 따라 해당 충돌 삼각형 정보를 출력하는 제3 단계를 순차적으로 수행함으로써 상기 소프트웨어 유닛부로부터 일방 전송되는 상기 레이 정보의 순서에 대응하여 상기 충돌 삼각형 정보를 일방 전송하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치.
The method of claim 1, wherein the reorder buffer unit is
The first step of storing the second ray output from the ray generation unit, the second step of receiving the collision triangle information output from the visited intersection test unit, and the priority of the second ray associated with the collision triangle information Accordingly, by sequentially performing the third step of outputting the corresponding collision triangle information, reducing the bandwidth between devices, characterized in that the one-way transmission of the collision triangle information in response to the order of the ray information transmitted from the software unit unit ray tracing device.
제1항에 있어서,
상기 충돌 지점 계산 유닛은 상기 충돌 삼각형 정보와 상기 제2 레이를 기초로 충돌 삼각형과 상기 제2 레이 간의 충돌 지점의 좌표를 계산하고,
상기 레이 셋업 유닛은 상기 충돌 지점의 좌표에서 상기 그림자 레이 또는 상기 세컨더리 레이의 발생 여부를 결정하여 해당 레이에 관한 정보를 생성하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 장치.
According to claim 1,
the collision point calculation unit calculates the coordinates of the collision point between the collision triangle and the second ray based on the collision triangle information and the second ray,
The ray setup unit determines whether the shadow ray or the secondary ray is generated at the coordinates of the collision point to generate information about the corresponding ray.
소프트웨어 유닛부와 전용 하드웨어 유닛부가 각각 상호 독립적으로 구현되어 상호 연동하는 레이 트레이싱(ray tracing) 장치에서 수행되는 방법에 있어서,
(a) 상기 소프트웨어 유닛부를 통해, 레이 생성을 위한 레이 정보(ray information)를 구축하여 상기 전용 하드웨어 유닛부에게 일방 전송하는 단계;
(b) 상기 전용 하드웨어 유닛부를 통해, 상기 레이 정보를 기초로 방문 교차 테스트를 위한 제2 레이를 생성하는 단계;
(c) 상기 전용 하드웨어 유닛부를 통해, 상기 제2 레이를 기초로 방문 교차 테스트 연산을 수행하는 단계;
(d) 상기 전용 하드웨어 유닛부를 통해, 상기 방문 교차 테스트 연산으로 출력되는 아웃오브오더(out-of-order) 결과를 인오더(in-order) 결과로 변경하여 상기 소프트웨어 유닛부에게 일방 전송하는 단계;
(e) 상기 소프트웨어 유닛부를 통해, 상기 레이 정보를 이용하여 제1 레이를 생성하고 상기 제1 레이와 충돌 삼각형 정보를 기초로 충돌 지점을 계산하는 단계; 및
(f) 상기 소프트웨어 유닛부를 통해, 상기 충돌 지점 상에서의 컬러 값을 산출하는 단계를 포함하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 방법.
In the method performed in a ray tracing device that is implemented independently of each other and interoperates with a software unit unit and a dedicated hardware unit unit,
(a) constructing ray information for ray generation through the software unit unit and transmitting one-way to the dedicated hardware unit unit;
(b) generating, through the dedicated hardware unit, a second ray for a visited intersection test based on the ray information;
(c) performing, through the dedicated hardware unit, a visited intersection test operation based on the second ray;
(d) changing an out-of-order result output from the visited intersection test operation to an in-order result through the dedicated hardware unit unit and one-way transmitting to the software unit unit ;
(e) through the software unit, generating a first ray using the ray information and calculating a collision point based on the first ray and collision triangle information; and
(f) calculating, through the software unit, a color value on the collision point.
제9항에 있어서,
(d') 상기 전용 하드웨어 유닛부를 통해, 상기 소프트웨어 유닛부의 동작과 별개로 상기 방문 교차 테스트 연산으로 출력되는 충돌 삼각형 정보와 상기 제2 레이 간의 충돌 지점을 계산하는 단계; 및
(e') 상기 전용 하드웨어 유닛부를 통해, 상기 소프트웨어 유닛부의 동작과 별개로 상기 충돌 지점을 기준으로 그림자(shadow) 레이 또는 세컨더리(secondary) 레이에 관한 정보를 생성하여 상기 레이 생성 유닛으로 전달하는 단계를 더 포함하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 방법.
10. The method of claim 9,
(d') calculating, through the dedicated hardware unit, a collision point between the second ray and the collision triangle information output from the visited intersection test operation independently of the operation of the software unit; and
(e') through the dedicated hardware unit unit, generating information about a shadow ray or secondary ray based on the collision point independently of the operation of the software unit unit and transmitting it to the ray generation unit Ray tracing method for reducing bandwidth between devices further comprising a.
제9항에 있어서, 상기 (a) 단계는
프레임 내의 각 픽셀에 대해 레이 생성을 위한 정보를 상기 레이 정보로서 구축하는 단계;
상기 레이 정보를 상기 레이 생성 연산 단계로 전달하는 단계; 및
상기 레이 정보를 상기 전용 하드웨어 유닛부로 일방 전송하는 단계를 포함하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 방법.
10. The method of claim 9, wherein (a) step
building information for ray generation as the ray information for each pixel in a frame;
transferring the ray information to the ray generation operation step; and
Ray tracing method for reducing bandwidth between devices comprising the step of one-way transmitting the ray information to the dedicated hardware unit.
제9항에 있어서, 상기 (c) 단계는
상기 방문 교차 테스트 연산의 결과를 상기 리오더 버퍼 유닛 및 상기 충돌 지점 계산 유닛 각각에게 전달하는 단계를 포함하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 방법.
10. The method of claim 9, wherein step (c) is
and transmitting the result of the visited intersection test operation to each of the reorder buffer unit and the collision point calculation unit.
제9항에 있어서, 상기 (d) 단계는
상기 방문 교차 테스트 유닛으로 입력되는 상기 제2 레이를 저장하고, 상기 방문 교차 테스트 유닛으로부터 출력되는 상기 충돌 삼각형 정보를 수신하며, 상기 충돌 삼각형 정보와 연관된 제2 레이의 우선순위에 따라 해당 충돌 삼각형 정보를 출력함으로써 상기 소프트웨어 유닛부로부터 일방 전송되는 상기 레이 정보의 순서에 대응하여 상기 충돌 삼각형 정보를 일방 전송하는 단계를 포함하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 방법.
10. The method of claim 9, wherein step (d) is
Store the second ray input to the visited intersection test unit, receive the collision triangle information output from the visited intersection test unit, and the collision triangle information according to the priority of the second ray associated with the collision triangle information By outputting a ray tracing method for reducing bandwidth between devices, comprising the step of transmitting the collision triangle information one-way corresponding to the order of the ray information transmitted one-way from the software unit unit.
제9항에 있어서, 상기 (f) 단계는
그림자(shadow) 레이 또는 세컨더리(secondary) 레이의 발생이 검출되면 상기 그림자 레이 또는 상기 세컨더리 레이에 관한 레이 정보를 생성하여 상기 (a) 단계로 전달하는 단계를 더 포함하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 방법.
10. The method of claim 9, wherein step (f) is
When generation of a shadow ray or a secondary ray is detected, generating ray information about the shadow ray or the secondary ray and transferring the ray information to the step (a) between devices A ray tracing method that reduces bandwidth.
제9항에 있어서,
(g) 상기 소프트웨어 유닛부를 통해, 프레임 내의 모든 픽셀에 대한 컬러 값이 결정된 경우 상기 프레임에 관한 이미지를 출력하는 단계를 더 포함하는 것을 특징으로 하는 장치들 간의 대역폭을 줄이는 레이 트레이싱 방법.
10. The method of claim 9,
(g) outputting, through the software unit, an image of the frame when the color values of all pixels in the frame are determined.
KR1020190159296A 2019-12-03 2019-12-03 Ray tracing device and method for reducing the amount of data transmitted between devices KR102261250B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190159296A KR102261250B1 (en) 2019-12-03 2019-12-03 Ray tracing device and method for reducing the amount of data transmitted between devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190159296A KR102261250B1 (en) 2019-12-03 2019-12-03 Ray tracing device and method for reducing the amount of data transmitted between devices

Publications (1)

Publication Number Publication Date
KR102261250B1 true KR102261250B1 (en) 2021-06-07

Family

ID=76374496

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190159296A KR102261250B1 (en) 2019-12-03 2019-12-03 Ray tracing device and method for reducing the amount of data transmitted between devices

Country Status (1)

Country Link
KR (1) KR102261250B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100077423A (en) * 2008-12-29 2010-07-08 삼성전자주식회사 Apparatus and method for enhancing ray tracing speed
KR20100128493A (en) * 2009-05-28 2010-12-08 박우찬 Ray tracing core and ray tracing chip having the same
KR101076807B1 (en) 2009-05-29 2011-10-25 주식회사 실리콘아츠 Ray tracing apparatus and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100077423A (en) * 2008-12-29 2010-07-08 삼성전자주식회사 Apparatus and method for enhancing ray tracing speed
KR20100128493A (en) * 2009-05-28 2010-12-08 박우찬 Ray tracing core and ray tracing chip having the same
KR101076807B1 (en) 2009-05-29 2011-10-25 주식회사 실리콘아츠 Ray tracing apparatus and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Jon Peddie, "SiliconArts new ray tracing chip and IP 4th generation path tracing engine", https://www.jonpeddie.com/news/siliconarts-new-ray-tracing-chip-and-ip, 2019.10.10.* *

Similar Documents

Publication Publication Date Title
US11200725B2 (en) Method for continued bounding volume hierarchy traversal on intersection without shader intervention
Humenberger et al. A fast stereo matching algorithm suitable for embedded real-time systems
KR102080851B1 (en) Apparatus and method for scheduling of ray tracing
US20200051316A1 (en) Method for handling of out-of-order opaque and alpha ray/primitive intersections
US8248401B2 (en) Accelerated data structure optimization based upon view orientation
US8102391B2 (en) Hybrid rendering of image data utilizing streaming geometry frontend interconnected to physical rendering backend through dynamic accelerated data structure generator
KR101705581B1 (en) Data processing apparatus and method
US10529117B2 (en) Systems and methods for rendering optical distortion effects
CN111210498B (en) Reducing the level of detail of a polygonal mesh to reduce complexity of rendered geometry
US8441477B2 (en) Apparatus and method of enhancing ray tracing speed
JP6336727B2 (en) Graphic processing method and apparatus using parallel pipeline
CN109643461B (en) Method and apparatus for proper ordering and enumeration of multiple sequential ray-surface intersections within a ray tracing architecture
CN110827384A (en) Method for efficient grouping of data path scheduled cache requests
KR101072093B1 (en) System and method for photorealistic imaging using ambient occlusion
US20090096788A1 (en) Method and apparatus for increasing efficiency of transmission and/or storage of rays for parallelized ray intersection testing
JP2012528376A (en) Ray tracing apparatus and method
US20160027204A1 (en) Data processing method and data processing apparatus
CN112041894B (en) Enhancing realism of a scene involving a water surface during rendering
KR102261250B1 (en) Ray tracing device and method for reducing the amount of data transmitted between devices
US20150084957A1 (en) Method and apparatus for routing data and reconfiguring rendering unit
JP2014026652A (en) Method and apparatus for ray tracing
KR102261257B1 (en) Ray tracing device and method for reducing the amount of data transmitted between devices
KR102248809B1 (en) Ray tracing device and method for reducing the amount of data transmitted between devices
US20240095995A1 (en) Reducing false positive ray traversal using ray clipping
US20240095993A1 (en) Reducing false positive ray traversal in a bounding volume hierarchy

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant