Spherical camera instrument
Description
This instrument is a spherical camera featuring equirectangular projection. It may be used for creating HDR environment maps for lighting in Ocean or many other image renderers which use the same environment projection.
Unlike many renderers supporting spherical image renders, this camera model supports depth of field effects. For this, you just need to set the focus distance, and set the radius parameter to the radius of the entrance pupil of an equivalent rectilinear camera. Please note that changing the aperture radius will not change exposure. This is because radius and exposure are linked to a third parameter, the focal length, which in the case of a spherical camera does not depend on field of view and cannot be related to the focal length of a rectilinear camera. Therefore, focal length is a hidden parameter in this model. For controlling exposure, you just need to set the f-number parameter. This will ensure getting the same exposure as a rectilinear camera. In the same way, f-number parameter will not modify depth of field.
This camera send rays isotropically. As equirectangular projection is not area preserving, some parts of the image (top and bottom, resp. zenith and nadir) will receive much less samples than others. Consequently, these areas will be much noisier. For this reason, the sphere resolution fix postprocessing filter was created for restoring uniform noise level over the image. It ensures that the image once reprojected on a sphere has uniform resolution and uniform noise.
Children nodes
sensor
- Sensor : List of channels defined by a sensitivity spectrum
postprocessing
- Postprocessing : The post-processing filter chain
Parameters
- xresolution
- int
- Horizontal buffer resolution
- yresolution
- int
- Vertical buffer resolution
- pixelfilter
- list
- The ray pixel filter
- shutter
- real
- Shutter time or exposure
- wlmin
- real
- Low bound of simulation wavelength range (Since Ocean 2014 R2)
- wlmax
- real
- High bound of simulation wavelength range (Since Ocean 2014 R2)
- pos
- vec3
- The camera center position
- forwards
- vec3
- The viewing direction corresponding to the center of the generated spherical image. Should be orthogonal to up
- up
- vec3
- The zenith direction, corresponding to the top of the generated spherical image. Should be orthogonal to forwards
- focusdistance
- real
- The lens focusing distance in meters. Set to zero for infinite focus distance
- autofocus
- boolean
- Set to true for setting the focus distance to the first geometry met in the forward direction
- fnumber
- real
- The equivalent lens F-Number that would provide equal brightness in the center. Does not change depth-of-field
- radius
- real
- The spherical lens radius. Affects depth of field, not image brightness
Example
<?xml version="1.0" encoding="UTF-8"?> <oceanroot version="2.3"> <instrument type="spherecam" name="envmapcam"> <prm xresolution="1024" yresolution="512"/> <prm pixelfilter="bilinear"/> <prm shutter="0.8"/> <prm wlmin="380E-9"/> <prm wlmax="780E-9"/> <prm pos="0.278 0.273 -0.8"/> <prm forwards="0 0 1"/> <prm up="0 1 0"/> <prm autofocus="true"/> <prm fnumber="5.6"/> <prm radius="1E-4"/> <sensor type="ciexyz" name="sensor"/> <postprocessing type="" name="postprocessing"> <filter type="xyztorgb" name="filter1" enabled="1" xwhite="0.3127" ywhite="0.329"/> <filter type="sphereresolutionfix" name="filter2" enabled="1" xwhite="0.3127" ywhite="0.329"/> </postprocessing> </instrument> </oceanroot>