Saturday, October 28, 2006
Reflections: Images of Mine Self
So far all of our objects are dull and flat, we could easily make this more cool by adding in reflections. The technique is simle, we cast the ray from the eye, hit the object, and then cast another ray reflected off the object. This creates nice reflective objects, the first one only allows things to reflect once.
With only one reflection we can't get the hall of mirrors effect. In order for things to reflect of themselves in their reflections we need to increase the depth we will trace reflections. To see what I mean, notice in the image above, the blue spehre is refelected on the green sphere. In the following image, we can see the reflection of the green sphere on the blue sphere in the reflection of the blue sphere on the green sphere. We can really notice the double reflections in the right hand image which is a zoom-in on the red sphere of the left image.
In the image below we can see a class of problems in ray tracing called acne problems. This particular one is a reflection acne. The acne is the odd looking lines all over the image. Some cases look more like acne, lighting acne shows up as block dots all over the objects. The acne comes from the fact that computers can only represent finite numbers. There is only so much information that can be used to represent a number, in this case 64-bits. This finite space means that we can only represent a finite amount of numbers. The side affect of this is that when we are doing intermediary calculations we can lose some of the number before getting to the final answer. Well, if we calculate the same number but reorder the operations we might get a slightly different answers. E.g. D * (A + B + C) is not guarenteed to equal D * A + D * B + D * C, especially if D is very large comparred to A, B, or C.
With only one reflection we can't get the hall of mirrors effect. In order for things to reflect of themselves in their reflections we need to increase the depth we will trace reflections. To see what I mean, notice in the image above, the blue spehre is refelected on the green sphere. In the following image, we can see the reflection of the green sphere on the blue sphere in the reflection of the blue sphere on the green sphere. We can really notice the double reflections in the right hand image which is a zoom-in on the red sphere of the left image.
In the image below we can see a class of problems in ray tracing called acne problems. This particular one is a reflection acne. The acne is the odd looking lines all over the image. Some cases look more like acne, lighting acne shows up as block dots all over the objects. The acne comes from the fact that computers can only represent finite numbers. There is only so much information that can be used to represent a number, in this case 64-bits. This finite space means that we can only represent a finite amount of numbers. The side affect of this is that when we are doing intermediary calculations we can lose some of the number before getting to the final answer. Well, if we calculate the same number but reorder the operations we might get a slightly different answers. E.g. D * (A + B + C) is not guarenteed to equal D * A + D * B + D * C, especially if D is very large comparred to A, B, or C.