1
$\begingroup$

I am studying Monte Carlo Path Tracing from different sources. However, I have some confusion about the sampling part and dare to post here for experts' clarification.

Most of the sources present path tracing as figure below:

enter image description here

This represents, the light ray starts from the camera/eye, has 3 bounces (whatever is the predefined bounce number), and then hits the light source (L_e >0). If I am not wrong, when a ray hits the surface, it has surface information like normal and material. So if it hits a diffuse surface, it will flow the output angle wrt. the normal anywhere in the scene until the next hit (below figure).

I assume in this figure above, I have one sample per pixel, and that sample is traveling throughout the scene (the deep orange color ray). The rest of the 5 rays are randomly generated reflected rays over the hemisphere (point P in the above figure).

enter image description here

Question: Can I call this one primary ray to 5 other reflected ray creation ray splitting? How do I define these 5 random splitting? Is it the hemisphere sampling? with some pseudorandom number generation like LCG, TEA?

Now come to the second confusing point, according to pbr book, each sample is a complete path in the path tracing algorithm. If that is true, according to the first figure, I am just shooting one sample (one path) like below. but the first figure shows I am actually creating 6*6*6 =216 paths within 3 bounces. How that could be possible?

enter image description here

Now, if I shoot multiple samples per pixel, like the figure below, I guess that should follow some pattern as well (lets say, adaptive sampling)

enter image description here

enter image description here

Now, instead of shooting at a point, the light rays will hit in a similar area and finally the average the final color value.

Question How this pixel sampling is different than the hemisphere sampling?

My whole understanding is like this, I guess if I shoot 5 primary rays, they will hit the surface in 5 different points (similar area), and reflect according to the material and attenuation. However, I need to create hemisphere sampling separately for the hemisphere and determine, how many random points I am going to create over the hemisphere. Am I right?

Instead of these two types of sampling, I also see there are material sampling, light sampling, etc. Is there any other type of sampling?

$\endgroup$
6
  • 1
    $\begingroup$ In most cases you do not want to split, just pick a direction for your current ray at each bounce. The sampling is typically done wrt some demsity that would cancel some terms causing variance in the rendering equation. $\endgroup$
    – lightxbulb
    Nov 28, 2023 at 17:23
  • $\begingroup$ @lightxbulb, u mean generating multiple samples per pixel, and that multiple samples hitting the the surface, then taking random directions over the hemisphere? How can it be a random direction when their reflecting direction should follow their properties, e.g., mirror will reflect most of the rays parallel. $\endgroup$
    – bim
    Nov 28, 2023 at 18:56
  • 1
    $\begingroup$ Perfect specular interactions are special (perfect reflection and perfect refraction) - there you don't really sample anything and reflect/refract along the only possible path. The physically plausible materials however scatter in multiple directions so they require an integral to model this scattering. The random sampling is a strategy for the numerical estimation of that integral. $\endgroup$
    – lightxbulb
    Nov 28, 2023 at 19:04
  • $\begingroup$ sampling is typically done wrt some density- recently I was reading about Importance Sampling, where sampling either happens wrt the material, or the light source, and Multiple Importance Sampling does consider both. Instead of perfect specular material, most material has BRDF properties (specular+diffuse). So that means, once the light ray/s hit the surface, I have to make some random sampling choice (not exactly following the light path as they should reflect or refract according to the physics)? But make it Randomly? Right? $\endgroup$
    – bim
    Dec 7, 2023 at 9:00
  • 1
    $\begingroup$ If you have $k$ iterated integrals you would typically sample $k$ random numbers in Monte Carlo in order to account for the integrals. E.g. without additional constraints at each bounce you would sample two numbers for the direction of the bounce. At the pixel you would sample 2 numbers for the point within it. If you have a non-pinhole camera you wouod use another 2 numbers for the aperture, etc. If you have a spectral path tracer you would sample also wavelength, if you need motion blur - then you would sample also time and so on. Read Veach's thesis. $\endgroup$
    – lightxbulb
    Dec 7, 2023 at 20:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.