I was going through the raytracer in a weekend book by Peter Shirley and the subsequent book raytracing the next week and I couldn't make out what was the illumination model that was being used here.
all the previous raytracing samples that I have come across use the Phong shading model in which
- For a diffuse surface, a shadow ray is generated towards all the light sources and the final color is calculated based on the diffuse color and the non-occluded light intensities
- For reflective materials and dielectrics, reflective and refractive rays are generated which are then recursively projected into the scene
The method used in the book (very briefly) is as follows (Please do correct me if my understanding is wrong in any way)
- For diffuse objects, a ray is traced recursively in a random direction biased towards the normal at the hitpoint and the color from the resulting ray is multiplied with the current object's albedo to give the final color
- For reflective and dielectrics, rays are cast using the law of reflection and the Snell's law respectively.
- Lights also scatter rays and also add their emitted parts.
The major differences I see in this approach are
- We do not directly sample the light sources.
- Diffuse items also reflect rays (for inter-diffuse reflections)
What exactly is the illumination model used in this approach? and why does this approach seem so simple and yet produces pretty good results?
Sorry if I missed something, I am relatively new to raytracing