thinlens Element Reference
Thin lens
camera approximation supporting common
camera inputs and allowing for depth of field.
More...
List of all members.
|
Attributes |
| vector3 | eye |
| | Camera location (position of eye).
|
| vector3 | focus |
| | Point where the camera should point towards (implicitly specifying look vector).
|
| vector3 | look |
| | Camera look direction.
|
| vector3 | up |
| | Camera up direction (orients camera).
|
| real_t | heightAngle |
| | Vertical height angle of camera frustum.
|
| real_t | aspectRatio |
| | Aspect ratio of camera frustum.
|
| real_t | near |
| | Near clipping plane for OpenGL preview.
|
| real_t | far |
| | Far clipping plane for OpenGL preview.
|
| ureal_t | aperture |
| | diameter of the aperature of the lens in mm (eg. 35mm, 50mm)
|
| ureal_t | fstop |
| | (aka F number), is defined as the unitless ratio of the focal length to the diameter of the aperture of the lens
|
| ureal_t | focalDistance |
| | the distance in meters between the lens and the focal plane (objects lying on the focal plane will be in perfect focus)
|
| vector2 | focalPoint |
| | user may specify a focalPoint in NDC on the film-plane instead of specifying a focalDistance to "auto-focus" the object intersected by a ray traced through the corresponding pixel, whose distance away from the lens will be used as the focalDistance.
|
Detailed Description
Thin lens
camera approximation supporting common
camera inputs and allowing for depth of field.
- Note:
- thinlens corresponds to the underlying Milton class 'ThinLensCamera.'
Demonstration of Depth of Field effect with thin lens camera by varying the focalPoint parameter to focus on each of the three balls respectively. For each render, a 35mm diameter lens aperture and an fstop of 8 were used.
Example usage:
"camera" : {
"eye" : [ 2, 2, 1 ],
"up" : [ 0, 1, 0 ],
"aperture" : 35,
"fstop" : 18,
},
Attribute Documentation
Camera location (position of eye).
| type | vector3 |
| optional | true |
| default | 2,2,1 |
Point where the camera should point towards (implicitly specifying look vector).
| type | vector3 |
| optional | true |
| default | origin |
Camera look direction.
- Note:
- If "focus" is specified, it will override the value of "look"
| type | vector3 |
| optional | true |
| default | towards origin |
Camera up direction (orients camera).
| type | vector3 |
| optional | true |
| default | 0,1,0 |
| restrictions | Must not be collinear to look vector |
Vertical height angle of camera frustum.
| type | real scalar |
| optional | true |
| default | 45 |
| units | degrees |
Aspect ratio of camera frustum.
| type | real scalar |
| optional | true |
| default | 1 |
Near clipping plane for OpenGL preview.
| type | real scalar |
| optional | true |
| default | 1 |
Far clipping plane for OpenGL preview.
| type | real scalar |
| optional | true |
| default | 100 |
diameter of the aperature of the lens in mm (eg. 35mm, 50mm)
| type | positive real scalar |
| optional | true |
| default | 35 |
| units | mm |
(aka F number), is defined as the unitless ratio of the focal length to the diameter of the aperture of the lens
| type | positive real scalar |
| optional | true |
| default | 14 |
| units | unitless |
the distance in meters between the lens and the focal plane (objects lying on the focal plane will be in perfect focus)
- Note:
- if a valid focalPoint is specified, it will override focalDistance; focalPoint will often be easier to specify if you're trying to focus on a particular object in the scene
| type | positive real scalar |
| optional | true |
| units | meters |
user may specify a focalPoint in NDC on the film-plane instead of specifying a focalDistance to "auto-focus" the object intersected by a ray traced through the corresponding pixel, whose distance away from the lens will be used as the focalDistance.
- Note:
- focalPoint is expressed as a vector2 in the unit square [0,1]^2, where [0,0] is the upper left corner of the image, and [1,1] is the lower right corner,if a valid focalPoint is specified, it will override focalDistance
| type | vector2 |
| optional | true |
| default | 0.5,0.5 |
| units | unitless |