-
Notifications
You must be signed in to change notification settings - Fork 9
Home
This project started first and foremost as a learning experience. Secondly it is a study of a GPU implementation of a research oriented ray tracing framework in which new algorithms can be developed. The focus on the GPU was chosen due to the fact that commonly (with a CPU renderer) a significant amount of time is spent waiting for rendering results while all the power a GPU has to offer is left unused. Thus the goal is to make this power available without having to focus too much on low level optimizations.
Mitsuba (as PBRT before) is probably the most commonly known realistic renderer geared towards research application. It can be easily extended with nearly any custom integrator, and especially the Path classes are of great convenience for Metropolis Light Transport algorithms. The CudaTracerLib has no intention of competing with Mitsuba in this research area. It is much harder to do memory management on the device and therefore no Metropolis Light Transport algorithm is implemented here. Mitsuba is also easier to debug and simply has the larger and better documented codebase.
On the other end of the spectrum is Brigade, the hope of true real-time ray tracing. Without having any insight into the code, I assume the focus of the authors lies more on the optimization aspect, not on a general approach to realistic image synthesis. For further discussion of the real-time aspects of this library please see the appropriate wiki page.
The CudaTracerLib tries to place itself somewhere between Mitsuba and Brigade, and it uses the best of both worlds. It is capable of displaying real time ray/path traced preview images while at the same time it can be easily extended with any other ray tracing based rendering algorithm.
Please note that using the GPU implies some limitations not expected:
- No
recursive
bsdfs. There are however some bsdf types likecoating
andblend
which can use only SOME of the other bsdfs, specifically all those defined in BSDF_SIMPLE.h. - No
recursive
textures. It is not possible to combine textures in mathematical functions to create complex appearances. - No support for samplers. Commonly samplers using techniques like stratified sampling or Sobol sequences can reduce the noise in rendered images quite drastically. Currently there is no such sampler implemented and only random number generators are used leading to unfavourable noise reduction.
All of these features are definitely possible in CUDA, although performance has to be monitored. There was no request for these complex materials up to now, so this was not actively worked on.
There are however some small features not available in Mitsuba (and partly of no interest):
- Adaptive Progressive Photon Mapping
- The main 3 volumetric estimators from A Comprehensive Theory of Volumetric Radiance Estimation using Photon Points and Beams
- Skeletal animation
- Completely dynamic deformable meshes and a dynamic scene with thousands of dynamic objects
- Parallax Occlusion Mapping and an (unrealistic but cool looking) orthogonal area light
- Dispersion (with Cauchy or Sellmeier model for index of refraction)
Personal note from the author: I started this project with very limited knowledge of C++ in general and particularly no knowledge of the stl. The same applies to the git history; for a long time there are only sparse commits with multiple independent changes.
It is also significant to note that this project started when CUDA 4.0 was the current release. At this time there was no support for c++11 in Visual C++ nor in CUDA device code. After this was added in CUDA 7.0 all new code makes use of these features. Therefore there is old, fully functional, c++03 code in the same project as c++11 code.