In 3D computer-generated graphics, ray tracing is a form of rendering technique for calculating light transport for the purpose of giving a photo-realistic image. This survey paper mainly focuses on the brief working of ray tracing methodology and various techniques available to achieve this. This helps to understand one how ray tracing can be applied in the field of computer graphics to produce stunning realistic renders. At present time ray tracing is primarily available for gaming (real-time ray tracing) and also for visual effects in cinema industry. This paper also gives a detailed study about hardware and software components used for ray tracing.
Introduction
I. INTRODUCTION
A renderer is a software application that is to create 2D images from a 3D environment models. A model typically consists of data that describes the characteristics of the objects inside the model, light sources available etc. Using a computer processor for the purpose of ray tracing was first accomplished by Arthur Appel in 1968. The first workable ray tracing model was proposed by Turner Whitted of Bell Laboratories in the year 1980. It included tracing of mirror reflection, refraction through translucent objects and anti-aliasing. It was also able to produce ray traced shadows of the models. He was the mind behind the creation of Nvidia RTX graphic card series which provided real time ray-tracing for games. Ray-tracing along with global illumination, have been used in major films where computer generated models was faked with additional lights. Since ray tracing traces the path of the light beam, it can also be used to trace the path of such similar things like sound waves which helps to achieve immersive sound designs. In fact, un physics domain, any linear propagation phenomenon can be simulated using ray tracing technique.
II. ALGORITHM
The ray-tracing algorithm works by casting a ray from an imaginary eye commonly called as a camera or a viewport through each pixel in a virtual screen and calculating the colour and its intensity. The main objective of this algorithm is to find the intersection of the ray produced from the viewport. Tracing light from the virtual eye/viewport is called as backward ray-tracing.
When a ray intersects with an object, the material property of the object is identified and gives the final colour of the pixel. In case of opaque object, the object can only cast shadow ray. In case of transparent and translucent objects, they can cast shadow ray, reflected ray and refracted ray. Tracing light from the virtual eye/viewport is called as backward ray-tracing. But in reality, the light is traced from the light source to the viewport. This is called as forward ray-tracing. Since the majority of the light rays from the light source does not reaches the viewers eye, it could lead to wastage of large number of computational resources.
III. RAY TRACING TECHNIQUES
Ray-tracing uses both hardware and software techniques to give photorealistic images in a quick period of time.
A. Hardware Techniques
Till the advent of real time ray-tracing, graphical processing units (GPUs) used the rasterization method to produce images. It was done on a stream computing model. The main requirement for ray-tracing is scaling the processing power by the use of parallelization. In each step, it finds all intersection of a ray with a set of relevant primitives of the scene. Dedicated ray tracing hardware become available to consumer market from 2018 with the introduction of Nvidia’s RTX series of GPUs.
B. Software Techniques
Ray tracing has more software techniques when compared to available hardware techniques. Some of the techniques available are
Ray Casting
Recursive Ray Tracing
Distributed Ray Tracing
Path Tracing
In Ray casting, it traces ray from viewport, only one per pixel. In the case of Recursive Ray Tracing multiple rays are casted and each ray that hits the intersection point keep on recursively tracing more rays. For Distributed Ray Tracing, it helps in providing soft shadows. Path Tracing is the most accurate form of all ray tracing algorithm that produces highly photorealistic images, but its drawback is that a huge number of rays needed to be casted to get high quality image. Ray tracing performance also depends on the API (Application Programming Interface) used to get the result. The three major ray-tracing API used are DirectX (Microsoft), Vulkan (Microsoft and Linux) and Metal (Apple).
TABLE I
Performance comparison of DirectX 12 (D3D12), Vulkan (VK) and Metal (MTL) in categories of Ray Tracing (RT), Ray Query (RQ) and Computer Shader (CS) in a 1600 x 900 resolution.
RT D3D12
RT VK
RQ D3D12
RQ VK
RQ MTL
RQ CS
BLAS Size
VLAS Build
Nvidia GeForce 3080
0.58 ms
0.54 ms
0.60 ms
0.55 ms
-
4/92 ms
33 MB
7 ms
Nvidia GeForce 2080 Ti
1.06 ms
1.03 ms
0.97 ms
0.97 ms
-
7.35 ms
33 MB
7 ms
AMD Radeon 6700 XT
2.50 ms
2.55 ms
2.06 ms
2.06 ms
-
6.12 ms
76 MB
15 ms
Apple M1
-
-
-
48.8 ms
46.4 ms
82 MB
100 ms
IV. DISTINCTION FROM OTHERS
The main advantage of ray-tracing render is that it can produce photorealistic images with a wide variety of optical effects that can be seen in real life.
A. Reflection and Refractions
Reflection is the change in in direction of a wavefront at an interface between two different media so that the wavefront returns into the medium from which it originated. Refraction is the redirection of a wave as it passes from one medium to another. How much a wave is refracted id determined by the change in wave speed and initial direction of wave propagation relation to the direction of change in speed.
Depth Of Field
D. Depth Of Field is the distance between the nearest and the farthest objects that are in acceptably sharp focus in an image captured with a camera(viewport).
E. ??????????????Motion Blur
Motion Blur is the apparent streaking of moving objects in a sequence of frames. It results when the frame being recorded changes during the recording of a single exposure, due to rapid movement or long exposure.
???????F. Ambient Occlusion
Ambient Occlusion is a shading and rendering technique used to calculate how exposed each point in a scene is to ambient lighting
???????G. Dispersion
Dispersion is the phenomenon in which the phase velocity of a wave depends on its frequency. E.g.: Chromatic Aberration.
V. DISADVANTAGES
The main advantage in the ray-tracing methodology is its performance. Traditional ray tracing is not always photorealistic, but it does accurately handle interreflection and optical effects like refraction. When the rendering equation is well estimated or fully executed, true photorealism arises. Since the rendering equation describes every physical consequence of light flow, putting it into practise produces full photorealism. However, considering the amount of computer power needed, this is typically impossible. All rendering techniques' realism can be assessed using an approximation of the equation. The modelling of actual lighting is much more precise when done using ray-tracing methods that also use other techniques (photon mapping, route tracing). Another disadvantage of ray-racing methodology is it generate lots of image noise for less sampled pictures. It can be addressed by increasing the sample amount. Or using a denoising software which may reduce the quality of the render slightly.
Conclusion
This survey paper thus shows the working principle of ray-tracing method and its various hardware and software techniques. It also explains the major difference between the final results of ray-traced image and other rendering techniques image. Though this methodology has lot of hardware disadvantages, the advent of faster and more capable GPUs is paving way for faster real time ray-traced renders. From this survey its evident that ray-tracing and its similar methodologies are the future of computer-generated graphics.
References
[1] C.F. Chang, K. -W. Chen and C. -C. Chuang, \"Performance comparison of rasterization-based graphics pipeline and ray tracing on GPU shaders,\" 2015 IEEE International Conference on Digital Signal Processing (DSP), 2015, pp. 120-123, doi: 10.1109/ICDSP.2015.7251842.
[2] D. Bilibashi, E. M. Vitucci and V. Degli-Esposti, \"Dynamic Ray Tracing: A 3D Formulation,\" 2020 International Symposium on Antennas and Propagation (ISAP), 2021, pp. 279-280, doi: 10.23919/ISAP47053.2021.9391318..
[3] J. Burgess, \"RTX on—The NVIDIA Turing GPU,\" in IEEE Micro, vol. 40, no. 2, pp. 36-44, 1 March-April 2020, doi: 10.1109/MM.2020.2971677..
[4] J. Gambrych, \"Influence of optimization techniques on software performance for subsequent generations of CUDA architecture,\" 2021 IEEE Intl Conf on Parallel & Distributed Processing with Applications, Big Data & Cloud Computing, Sustainable Computing & Communications, Social Computing & Networking (ISPA/BDCloud/SocialCom/SustainCom), 2021, pp. 1002-1009, doi: 10.1109/ISPA-BDCloud-SocialCom-SustainCom52081.2021.00140.
[5] S. Panghal, D. A. Bilung, N. Gupta and G. Kumar, \"Enhancing Graphic Performance Curve using Ray Tracing,\" 2020 12th International Conference on Computational Intelligence and Communication Networks (CICN), 2020, pp. 55-59, doi: 10.1109/CICN49253.2020.9242622.
[6] Vasiou, E., Shkurko, K., Mallett, I. et al. A detailed study of ray tracing performance: render time and energy cost. Vis Comput 34, 875–885 (2018). https://doi.org/10.1007/s00371-018-1532-8