Ray-Based Rendering Generic Overview
Published:
(work in progress…)
Ray-Based Rendering Approaches Generic Classification
All the ray-based rendering pipeline, including ray casting, ray tracing, global illumination-based advanced algorithms including path tracing, photon mapping could be classified in these two generic categories. This classification is based on the light path direction. Light distribution in a scene is dynamic equilibrium, as much light is absorbed as is emitted.
- Forward ray Tracing (aka. light tracing ); under global illumination category, it is also referred sometimes as the
forward light transport/ particle - Backward Ray Tracing (aka. reverse ray tracing); under global illumination category, it is also referred sometimes as the
backward light transport/ particle - Hybrid Ray Tracing
Forward Ray Tracing/ Light tracing
It follows the path of the light particles (photon) forward from the light source to the camera. It makes technically possible to simulate the right way light travels in nature on a computer. For instance, the sun emits about $10^{45}$ photons per second Ref. The chances of a random photon from the sun hitting the scene is tiny. About 1 in every $2.1\times10^9$ photons from the sun even hit the earth. About 1 in every $4.5\times10^{10}$ of those will hit the 100 ft (30 m) radius of the scene. The sun emits about $10^{45}$ photons per second.
However, this method inefficient and impractical, especially under the finite computational resources. As from the previous approach, we can see, there is a very low probability that the photon from the light would finally hit the virtual camera sensor.
Turner Whitted mentioned, in an obvious approach to ray tracing, that light rays emanating from a source are traced through their paths until they strike the viewer. Since only a few will reach the viewer, this approach is wasteful. However, in Whitted-style ray tracing, surfaces are treated as perfectly shiny and smooth.
Backward Ray Tracing/ Eye Tracing/ Camera Tracing/ Reverse Ray Tracing
Unlike real life, rays traverse the scene in reverse in the virtual world; start at the viewpoint and go towards the scene. Appel also suggested rays are traced in the opposite direction, from the viewer to the objects in the scene. So, we trace a ray from the eye (virtual camera) to a point on the object’s surface and then a ray from that point to the light source. The first ray we shoot from the eye is called the primary ray/ visibility ray/ view ray/ camera ray. If the ray hits an object, then we find out how much light it receives by throwing another ray (called a light/ shadow ray) from the hit point to the scene’s light/s.
Backward ray tracing is an efficient way of computing direct illumination indeed but not always an efficient way of simulating indirect lighting. Nonetheless, due to the efficiency, almost all the time, ray tracing and other global illumination algorithms are based on the backward tracing. The Next Event Estimation could be used both of the forward and backward ray tracing for robust light sampling.
Hybrid Ray Tracing
The forward ray tracing generates better result, however, requires more computational resources. On the other hand, the backward ray tracing is faster (compare to the forward), however, less vivid. Therefore, each of these type has their own limitations. A hybrid approach solves this problem. However, balancing between computational deman and visual quality is still a question for real-time rendering.
Resources
- https://cs.stanford.edu/people/eroberts/courses/soco/projects/1997-98/ray-tracing/types.html#:~:text=Types%20of%20Ray%20Tracing%20%20Forward%20Ray,Backward%20Ray%20Tracing.%20%20Hybrid%20Ray%20Tracing.
