An efficient acceleration algorithm of GPU ray tracing using CUDA

CUDA를 이용한 효과적인 GPU 광선추적 가속 알고리즘

  • 지중현 (광주과학기술원 기전공학과) ;
  • 윤동호 (광주과학기술원 기전공학과) ;
  • 고광희 (광주과학기술원 기전공학과)
  • Published : 2009.02.09

Abstract

This paper proposes an real time ray tracing system using optimized kd-tree traversal environment and ray/triangle intersection algorithm. The previous kd-tree traversal algorithms search for the upper nodes in a bottom-up manner. In a such way we need to revisit the already visited parent node or use redundant memory after failing to find the intersected primitives in the leaf node. Thus ray tracing for relatively complex scenes become more difficult. The new algorithm contains stacks implemented on GPU's local memory on CUDA framework, thus elegantly eliminate the problems of previous algorithms. After traversing the node we perform the latest CPU-based ray/triangle intersection algorithm 'Plucker coordinate test', which is further accelerated in massively parallel thanks to CUDA. Plucker test can drastically reduce the computational costs since it does not use barycentric coordinates but only simple test using the relations between a ray and the triangle edges. The entire system is consist of a single ray kernel simply and implemented without introduction of complicated synchronization or ray packets. Consequently our experiment shows the new algorithm can is roughly twice as faster as the previous.

본 논문은 CUDA를 이용하여 GPU에서의 최적화된 kd-tree 탐색구조 환경과 광선/삼각형의 교차검사 알고리즘을 통한 실시간의 광선추적 시스템을 제안한다. 기존의 GPU 기반 kd-tree 탐색 알고리즘은 대부분 스택이 없는 GPU 하드웨어의 특성상 임의의 단말노드에서 기하요소의 교차검사가 실패할 경우 상위노드로 상향식 탐색을 진행하기 때문에 노드에 대한 중복 방문이 반드시 필요하거나 혹은 불필요한 메모리의 적재가 필요하기 때문에 큰 장면에 대한 광선추적은 어렵게 된다. 본 논문에서 제안하는 알고리즘은 CPU 방식의 kd-tree 탐색과 비슷하게 동작하도록 stack을 CUDA 프레임워크를 이용하여 GPU의 지역메모리로 구현하였기 때문에 기존의 방법 등에서의 문제점을 해결하였다. 또한 탐색구조를 통해서 찾은 말단 삼각형들의 처리를 위해서 최신의 CPU 기반의 교차검사 알고리즘인 Plucker 좌표계 검사를 CUDA로 구현하여 병렬 가속시켰다. Plucker 검사는 기존의 무게중심 좌표 대신에 광선과 삼각형 edge의 관계를 이용하는 간단한 연산만을 이용하는 장점이 있다. 전체 시스템은 단일 커널로 구성되어 있으며 병렬처리를 위한 복잡한 동기화나 광선패킷의 도입 없이 간단하게 구현되었다. 결과적으로 본 논문의 실험은 기존 알고리즘 대비 제안하는 알고리즘이 약 2배의 성능 향상이 있음을 보여 준다.

Keywords