I am implementing an MLT bidirectional path tracer. I have a problem integrating diffuse, specular reflection and refraction.
1) The first problem is diffuse and specular reflection. Diffuse reflection is done by sampling ray in a hemishere. But specular reflection is done by finding the ray that have an angle to the normal equal to the incident ray with the normal. However, an object can have both diffuse and specular reflection. When to use specular reflection or diffuse reflection for a ray?
2) Same as the first question but this time integrating reflection with refraction.
I've seen a few research papers and websites online where the scene have specular, diffuse reflection and refraction, but they have no tutorial on how to do this.
If anyone could help that would be great :)
Aucun commentaire:
Enregistrer un commentaire