Forum Archive › Ray Tracing Direrection. › Reply To: Ray Tracing Direrection.
Ok, so my understanding is that path tracing is just ray tracing but using multiple samples per pixel and using Monte Carlo or some optimization technique to arrive at a final pixel color. When I was learning this, they just called it a ray tracing optimization, but I believe that is what is now commonly called path tracing. I think everything else is the exact same, just multiple samples that get averaged. As far as direct vs indirect lighting, I don’t recall that as part of the process, maybe that is another optimization, but to my knowledge a ray is cast from focal point through the pixel center (or with path tracing, multiple rays are sampled over the pixel area) and if it hits an object, multiple new rays are cast from that point to every light in the scene, if it hits another object on its way then that is where indirect lighting comes in, and again multiple rays are cast from that point to every light, and the process continues until a light is reached or the max bounce limit is reached. Then they all collapse recursively back to the pixel, calculating the contribution of light that each bounce adds along the way.
So,
1. Focal point =====> pixel center (or sample area) =======> into scene :: was an object hit? If no, pixel is black. if yes, continue.
2. Object ======> each light in scene :: was an object hit along the way? If yes, repeat step 2, or return black if max bounce depth has been reached. If no, use light data to calculate contribution and return to previous object adding the values of the other rays at this level.
3. When all bounce levels have collapsed to the original object, calculate and set final pixel color.
That may be more confusing but I didn’t have the patience to create a normal flow chart lol. But anyway, I could imagine a direct lighting pass just to get the base contribution through pixel center as a starting point optimization before sending all the sample rays in path tracing. I could also be wrong about everything lol, but that is my understanding of it all.
Just as a side question, is there a place to post general feedback? I would like to suggest that the quizzes include an explanation of the correct answer for clarity. There have been a few questions that didn’t seem to be covered clearly in the lessons and it would be nice to have a concise explanation after each question.