CPU-GPU Hybrid Real Time Ray Tracing Framework

CPU-GPU Hybrid Real Time Ray Tracing Framework

Volume 0 (1981), Number 0 pp. 1–8 CPU-GPU Hybrid Real Time Ray Tracing Framework S.Beck , A.-C. Bernstein , D. Danch and B. Fröhlich Lehrstuhl für Systeme der Virtuellen Realität, Bauhaus-Universität Weimar, Germany Abstract We present a new method in rendering complex 3D scenes at reasonable frame-rates targeting on Global Illumi- nation as provided by a Ray Tracing algorithm. Our approach is based on some new ideas on how to combine a CPU-based fast Ray Tracing algorithm with the capabilities of todays programmable GPUs and its powerful feed-forward-rendering algorithm. We call this approach CPU-GPU Hybrid Real Time Ray Tracing Framework. As we will show, a systematic analysis of the generations of rays of a Ray Tracer leads to different render-passes which map either to the GPU or to the CPU. Indeed all camera rays can be processed on the graphics card, and hardware accelerated shadow mapping can be used as a pre-step in calculating precise shadow boundaries within a Ray Tracer. Our arrangement of the resulting five specialized render-passes combines a fast Ray Tracer located on a multi-processing CPU with the capabilites of a modern graphics card in a new way and might be a starting point for further research. Categories and Subject Descriptors (according to ACM CCS): I.3.3 [Computer Graphics]: Ray Tracing, Global Illumination, OpenGL, Hybrid CPU GPU 1. Introduction Ray Tracer can compute every pixel of an image separately Within the last years prospects in computer-graphics are in parallel which is done in clusters and render-farms and growing and the aim of high-quality rendering and natural- shortens render time. Additionally many acceleration tech- ism enters into many disciplines of graphics such as Anima- niques have been introduced that adopt well to Ray Tracing tion, Film, Games and even Virtual Reality. In a few years such as BSP and Light Buffers or techniques that try to Gen- reality and virtual reality might be less and less distinguish- eralize Rays. able. Therefore new methods are introduced and invented in Radiosity and its correctness in a diffuse Global Illumi- the context of Render Engines for Games and Virtual Reality nation should be mentioned and kept in mind as well. But Systems. because of its non-trivial algorithm it will remain computa- Ray Tracing is one of the oldest and most promising meth- tional expensive and wonÂt't target on real-time rendering. ods to render 3D scenes with respect to Global Illumina- Though the realism and image quality are remarkable and tion in terms of physically correctness and therefore will phenomena like color bleeding can be handled as well as always be an actual research topic. It is a simple but pow- area lights, shadow, reflection and even more. erful model for generating shadow, reflection and refraction and even more phenomena like Motion Blur , Depth of Field When concentrating on high complexity scenes and inter- and others. With respect to naturalism Ray Tracing even is active frame-rates the best compromise still is and will be a kind of overkill in simulating lights and its specular re- a GPU based feed-forward rendering pipeline such as pro- flection, depending on the lighting model, and the depth of vided by OpenGL. In addition the programmability of today recursion when computing reflection on a surface. On the graphics pipelines, respectively the Vertex and Fragment- one hand Ray Tracing with its branched algorithm is inef- Programs, have introduced a new generation of real-time ef- ficient and the computational time increases in a non-linear fects and approximations of phenomena like soft-shadows behavior when adding complexity. The lack of hardware ac- and environment-mapping, multi-texturing and other tech- celeration therefore inspired Wald et.al to design a prototype niques. These all claim to add realism to a rendered scene. and the results are showing promise. On the other hand a Nevertheless reflection via environment-maps and shadows c The Eurographics Association and Blackwell Publishing 2005. Published by Blackwell Publishing, 9600 Garsington Road, Oxford OX4 2DQ, UK and 350 Main Street, Malden, MA 02148, USA. S. Beck & A.-C. Bernstein & D. Danch & B. Fröhlich / Real Time Ray Tracing Framework generated by e.g.a hardware accelerated Shadow Mapping Several approaches exist to map the Ray Tracing algo- Technique are fake. rithm to the GPU. The increasing programmability of GPUs makes it possible to implement Ray Tracing using shader As a result, when analyzing these different rendering programs which can be found in [PBMH02] [Chr05]. In ad- methods, we can combine the power of todays graphics dition to pure software solutions, several hardware designs cards and the physically correct Global Illumination of a were introduced e.g. [CRR04], [JS02], [SWW∗04] Ray Tracer in a new way. We will therefore explain how to break down the Ray Tracing algorithm into different render- passes treating every generation of rays separately. We will 3. Our concept then show which parts can be satisfied by the graphics card 3.1. Motivation and how to integrate a Fast Ray Tracing algorithm to add a Global Illumination component to a rendered scene. With We want to render 3D scenes of medium to high complexity the wish of shifting as much as possible to the GPU start- at reasonable frame-rates and resolutions including Global ing with the first generation of rays, which a Ray Tracer Illumination as provided by a Ray Tracing algorithm. On would fire, we end up in our interleaved and hybrid CPU- the other hand a Real Time Ray Tracing approach without GPU Ray Tracing approach which we present in the follow- respect to the power of todays graphics cards would lead to ing sections. low performance without clustering workstations. Therefore we developed a hybrid CPU-GPU Real Time Ray Racing Framework by combining the power and possibilities of to- 2. Related Work days programmable rendering pipelines with a "fast as pos- sible" Ray Tracing algorithm located on the CPU. In [Wal04] Wald describes the OpenRT software real-time Ray Tracing system, which is a pure software solution. It achieves interactive performance through the usage of sev- 3.2. Analysis of the Ray Tracing Algorithm eral techniques including a fast triangle intersection, an opti- When analyzing a classical recursive Ray Tracing algorithm mized BSP, fast BSP traversal and the usage of the SIMD ex- we end up in so called Generations of Rays which have to tension. Furthermore caching and memory optimization are be processed for each pixel of the Image. Launching a gen- combined in a wise manner. For efficiency and linear scaling eration of primary (camera) rays followed by their shadow of the OpenRT Renderer, it is possible to add more CPUs by rays and subsequent generations of rays depending on the clustering. properties of the hidden surfaces would be a typical overall Havran [Hav00] did an intensive study on hierarchical Algorithm. subdivision methods. His optimized kd-tree adopts well to In our approach we will show that the first generation of complex scenes and has a compact storage of inner and outer rays can be represented by classical feed forward render- nodes and an efficient traversal algorithm. Indeed his re- ing in terms of the OpenGL rendering pipeline. In addition searches constitute that a kd-tree is an optimal BSP and in- the corresponding shadow rays can also be processed on the troduce a cost-function-based algorithm for the position of graphics card. Mapping further generations of rays to an al- the splitting plane. gorithm located on the graphics card is not suitable on the Algorithms for adding shadows to 3D scenes in the con- other hand. This is mainly caused by non existent accelera- text of Real Time Rendering are research topics in many tion techniques and the huge amount of data to be processed publications. Beside Shadow Volumes and other well known for these generations. techniques the image based Shadow Mapping algorithm was improved by Stamminger and Drettakis in [SD02]. Their is- 3.3. Naming the Render-tasks sue in how to reduce the so called perspective aliasing arte- In the following subsection we describe our concept of facts which are implied by uniform shadow maps gave a spreading up the different stages of a classical Ray Tracing starting point for many other researchers. The basic idea algorithm as independent tasks for the GPU and CPU: is to distribute the resolution of the depth range in a non- linear manner using a perspective transform during the gen- • Primary Shadow Rays: To generate the shadows for the eration of the shadow map. Wimmer and Scherzer have in- camera rays we use a light space perspective shadow map- troduced a light space perspective Shadow Mapping algo- ping algorithm which is located on the graphics card. rithm, shortened LiSPSM, which is based on this general idea For better results we can additionally refine the shadow in [WSP04]. Indeed they argued that any Perspective Trans- boundaries, which are typically aliased, in two post pro- form could be used to achieve a wise distribution of depth cessing steps: We first blur all shadow boundaries in im- in the Shadow Map. They also give a fundamental overview age space within a short fragment-shader. This blur step and analysis of the different occurring aliasing errors and would mark all boundaries as "not clean" and we are then provide a robust and quasi-optimum solution for generating capable to perform a traditional shadow test with shadow shadows with Shadow Mapping. rays located on the CPU for the boundaries. c The Eurographics Association and Blackwell Publishing 2005.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us