Font Size: a A A

The Design And Implementation Of CUDA-Based Ray Tracing Renderer

Posted on:2013-05-09Degree:MasterType:Thesis
Country:ChinaCandidate:X HuangFull Text:PDF
GTID:2248330371466970Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Compared with the traditional raster rendering, ray tracing renderer can easily render a more realistic three-dimensional images relying on simple physical principles. However, due to the need to simulate the actual transmission of light, the amount of computation required by the ray tracing rendering algorithm is very large, which restricts the application of interactive or real-time ray tracing in the field of PC. NVIDIA’s CUDA unified computing architecture platform makes the calculation procedure formerly based on the CPU can easily take advantage of the GPU’s massively parallel computing power to obtain substantial performance improvement. The ray tracing algorithm itself is a good example of parallel computing. This paper studied the realization of a traditional ray tracing renderer on CUDA platform, and made analysis and optimization to its performance.Firstly, a traditional CPU-based ray tracing renderer is designed and implemented using object-oriented principle. The ray tracing renderer can render diffuse color based on the Phone simple illumination model, and recursively track the specular reflection light and refraction light and calculate their colors. Next, the running of object-oriented programs on CUDA platform is studied. A method is given to solve the issues related to the object data storing in CUDA memory. This paper designs the overall structure of a CUDA ray tracing renderer, and gives a non-recursive ray tracing algorithm based on a custom stack on the CUDA platform on which recursive function is not supported. The ray tracing renderer is then completely transplanted onto the CUDA platform.Finally, the running performance of CUDA ray tracing renderer is analysis, and is optimized on the aspects of data transferring and memory accessing. In this paper, CUDA and OpenGL graphics interoperable ability is used to avoid the frequent transferring of the temporary image data between CPU and GPU so that the bandwidth could be saved. This paper also studies object data storing in the constant memory. All the static scene data is successfully copied to the constant memory. The restriction of access patterns of the global memory is broken, and the access speed of the scene data is accelerated. After optimization, the running performance of the CUDA ray tracing renderer has been greatly improved.
Keywords/Search Tags:ray tracing, CUDA, object oriented, constant memory, optimization
PDF Full Text Request
Related items