Path tracing is a rendering algorithm similar to raytracing where rays are tracked through a scene from a virtual camera. It uses random sampling to gradually calculate the final image. Random sampling causes noise in the rendered image that is reduced by generating more samples per pixel. The number of samples per pixel affects the render quality, with more samples leading to less noise but diminishing returns. Small bright light sources bring more noise that takes longer to render, due to the low probability of light paths hitting the sources compared to their high brightness.
1. Introduction Path Tracing.
Path Tracing is a rendering algorithm similar to raytracing in which rays are thrown from a virtual
camera and tracked through a simulated scene for example for a 3D configurator. Path tracing uses
random samples to gradually calculate a final image. The random sampling process makes it
possible to represent some complex phenomena that are not covered by regular raytracing, but it
usually takes longer to produce a high-quality path tracing image.
Random sampling in path tracing causes noise to appear in the rendered image. The noise is
removed by the algorithm generating more samples, i.e. color values resulting from a single beam.
The Path Tracing algorithm is explained in more detail below.
Random Sampling.
In Path Tracing, the beams are randomly distributed within each pixel in the camera room and at
each intersection with an object in the scene, a new reflection beam is generated pointing in a
random direction. After a certain number of bounces, each beam eventually leaves the scene or is
absorbed. When a beam finishes rummaging around the scene, a sample value is calculated based
on the objects against which the beam bounced. The sample value is added to the average of the
source pixel.
The samples in a path-traced image are evenly distributed across all pixels. The color of each pixel
is the average of all samples calculated for that pixel.
The random components in Path Tracing make the rendered image appear noisy. The noise
decreases over time as more and more samples are calculated.
Samples per Pixel (SPP).
The decisive factor for the render quality is the number of samples per pixel (SPP).
The higher the SPP you have in a rendered image, the less noise you will notice. However, the
additional quality per sample decreases the more samples you already have (since each sample only
2. contributes to an average of all samples). For example, the difference in image quality between
20,000 SSP and 21,000 SSP will not be as noticeable as between 1,000 SSP and 2,000 SSP.
Sunlight does not require a high SSP to produce a beautiful image. Outdoor shots can be played
back with relatively low SPP when sunlight is activated. Emitters (torches, lava, glow stones,
pumpkins, etc.) like SSP need to reduce noise, so indoor shots and similar scenes in low-light
environments require a much higher SPP number to look good.
Render Time.
There is no clear answer to how long it will take to render a scene. The general guideline is: the
longer you render an image, the better it will be. Consider the declining returns discussed above.
The time it takes to render a beautiful looking image depends on how well lit the scene is, how
many samples per second the renderer can produce (depending on how fast your CPU is), and how
many pixels the canvas has.
The scaling of the canvas has an effect on the render time proportional to the pixel area of the
canvas. An image of 800 x 800 pixels takes four times as long to achieve the same quality as an
image of 400 x 400 pixels, because the total number of pixels has quadrupled. If your renderings
take too long, you can reduce the canvas size to get faster results.
More about noise.
Small but bright light sources, such as flashlights, bring a lot of noise into the scene. It takes a
particularly long time to render a scene, which is usually illuminated by a few torches. This is an
unfortunate and inevitable disadvantage of the Path Tracing Rendering method.
The reason for this effect is the low probability that every light path scanned contains the flashlights
compared to the high luminance of the object. The end result is the average of all samples, but the
average can be “too high” for a long time due to the high luminance. The average decreases over
time, but for a while there may be a pixel illuminated by a particular light source near several pixels
that clearly stand out from the others that have not yet been illuminated by the same source, hence
the bright dots seen above at low sample numbers.
We hope that we were able to give them a first brief overview of path tracing. If you have any
suggestions or questions, please feel free to contact our experts in our forum.
Thank you very much for your visit.