Spherical camera

Description

../../../_images/spherecam.jpg

Cornell box rendered with a sphere camera

Instrument 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 Equirectangular smooth filter 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

This node may have a variable number of output children with custom names.

Sensor sensor

List of channels defined by a sensitivity spectrum

Output user-defined

First output preset

Output user-defined

Second output preset

Output user-defined

Parameters

name

type

description

xresolution

integer

Horizontal buffer resolution

yresolution

integer

Vertical buffer resolution

pixelfilter

list

The ray pixel filter

shutter

real

Shutter time or exposure, in seconds

wlmin

real

Low bound of simulation wavelength range

wlmax

real

High bound of simulation wavelength range

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 lens aperture F-number

radius

real

The spherical lens radius. Affects depth of field, not image brightness

Ocean XML 5.0 example

<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"/>
     <output type="rgbimage" name="image">
             <prm colorspace="srgb"/>
             <prm depth="32"/>
             <prm xwhite="0.31271"/>
             <prm ywhite="0.32902"/>
             <prm hcc="0.32"/>
             <prm drawinfo="false"/>
             <filter type="sphereresolutionfix" name="filter2" enabled="true"/>
     </output>
</instrument>