|
472 | 472 | In addition to setting up the pixel dimensions for the rendered image, we also need to set up a
|
473 | 473 | virtual viewport through which to pass our scene rays. For the standard square pixel spacing, the
|
474 | 474 | viewport's aspect ratio should be the same as our rendered image. We'll just pick a viewport two
|
475 |
| -units in height. Ultimately, changing the scale of the viewport (while holding the focal distance |
476 |
| -constant) is equivalent to changing the viewing angle, or “zoom” of the image. |
| 475 | +units in height. We'll also set the distance between the projection plane and the projection point |
| 476 | +to be one unit. This is referred to as the “focal length”, not to be confused with “focus distance”, |
| 477 | +which we'll present later. |
477 | 478 |
|
478 | 479 | I’ll put the “eye” (or camera center if you think of a camera) at $(0,0,0)$. I will have the y-axis
|
479 | 480 | go up, and the x-axis to the right. In order to respect the convention of a right handed coordinate
|
|
2728 | 2729 | The reason we defocus blur in real cameras is because they need a big hole (rather than just a
|
2729 | 2730 | pinhole) to gather light. This would defocus everything, but if we stick a lens in the hole, there
|
2730 | 2731 | will be a certain distance where everything is in focus. You can think of a lens this way: all light
|
2731 |
| -rays coming _from_ a specific point at the focal distance -- and that hit the lens -- will be bent |
| 2732 | +rays coming _from_ a specific point at the focus distance -- and that hit the lens -- will be bent |
2732 | 2733 | back _to_ a single point on the image sensor.
|
2733 | 2734 |
|
2734 |
| -In a physical camera, the distance to that plane where things are in focus is controlled by the |
2735 |
| -distance between the lens and the film/sensor. That is why you see the lens move relative to the |
2736 |
| -camera when you change what is in focus (that may happen in your phone camera too, but the sensor |
2737 |
| -moves). The “aperture” is a hole to control how big the lens is effectively. For a real camera, if |
2738 |
| -you need more light you make the aperture bigger, and will get more defocus blur. For our virtual |
2739 |
| -camera, we can have a perfect sensor and never need more light, so we only have an aperture when we |
2740 |
| -want defocus blur. |
| 2735 | +We call the distance between the projection point and the plane where everything is in perfect focus |
| 2736 | +the _focus distance_. Be aware that the focus distance is not the same as the focal length -- the |
| 2737 | +_focal length_ is the distance between the projection point and the image plane. |
| 2738 | + |
| 2739 | +In a physical camera, the focus distance is controlled by the distance between the lens and the |
| 2740 | +film/sensor. That is why you see the lens move relative to the camera when you change what is in |
| 2741 | +focus (that may happen in your phone camera too, but the sensor moves). The “aperture” is a hole to |
| 2742 | +control how big the lens is effectively. For a real camera, if you need more light you make the |
| 2743 | +aperture bigger, and will get more defocus blur. For our virtual camera, we can have a perfect |
| 2744 | +sensor and never need more light, so we only have an aperture when we want defocus blur. |
2741 | 2745 |
|
2742 | 2746 |
|
2743 | 2747 | A Thin Lens Approximation
|
|
0 commit comments