Tuesday 19 July 2011

Depth of Field

Depth of field is the added effect of focus. By focusing on a particular distance, objects nearer and farther away begin to blur. This is done simply was distributed ray tracing and adding a "disturbance" to each ray. Each rays point of origin
is shifted slightly based on the disturbance, which is a random offset. The offset increased as the distance between the destination of the ray and point of focus increases. Since the destination is required to compute the disturbance, depth of field takes longer to render than an image with no focal point, since the destination must be calculated beforehand.
Here is a simple image with a bunch of spheres at various depths:


Now, here is the same image, only focusing on the nearest red ball:



Same image again focusing on the green ball in the middle:

Same image once more focusing on the farthest white ball:

No comments:

Post a Comment