Friday, April 17, 2009

Hatch marks explained?

I believe that I understand the source of the hatch marks. It may not be a problem so much with regular sampling but with each ray that is traced adding energy to the scene.

For example:

1) A ray is sent out and intersects a glass sphere
2) That ray has two components: reflection and refraction
3) The refracted ray travels through the sphere, and refracts/reflects again
4) The reflected ray bounces around the sphere, adding energy. This reflected ray eventually reaches the maximum allowed tracing depth, and the color is set to black, which is resulting in what appears to be a grainy noise.

Some areas have more energy added than others. When I ignore reflected rays within the sphere, a very different image without the grid appears:

This problem isn't solved, but it show a serious problem with my implementation. A light source doesn't put out infinite energy and each bounce doesn't add energy to the scene.

No comments:

Post a Comment