Ideal rectilinear camera

Description

../../../_images/idealrectcam.jpg

Cornell box rendered with an ideal rectilinear camera

Instrument This instrument is a simple camera model, describing a perfect rectilinear lens with no aberrations, flat front lens, identical principal points and pupils centers. This is the most common camera model used in CG.

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 position : center of pupils apertures, as well as principal points

forwards

vec3

The camera optical axis, or view direction. Should be orthogonal to up

up

vec3

The camera up axis. 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

focallength

real

The lens focal length in meters. Must be greater than 0

sensor_ar

real

The sensor aspect ratio. Physical width/height ratio of the recorded image, but not necessarily equal to pixel aspect ratio (xresolution/yresolution. Must be greater than 0

sensor_width

real

The sensor width in meters, such as 0.036 for 35mm film cameras. Must be greater than 0

lensshift_x

real

The sensor shift in horizontal direction. From 0 to 10 (in sensor length unit). WARNING, reset optical axis perpendicular to your object by reseting z coordinate of forwards direction.

lensshift_y

real

The sensor shift in vertical direction. From 0 to 10 (in sensor length unit).

Ocean XML 5.0 example

<instrument type="idealrectcam" name="camera">
     <prm xresolution="512"/>
     <prm yresolution="512"/>
     <prm shutter="0.05"/>
     <prm wlmin="3.8e-007"/>
     <prm wlmax="7.8e-007"/>
     <prm pixelfilter="bilinear"/>
     <prm pos="0.337141 -0.698955 0.774228"/>
     <prm forwards="-0.309152 0.648172 -0.695915"/>
     <prm up="-0.299591 0.628127 0.718124"/>
     <prm focusdistance="1.07488"/>
     <prm autofocus="true"/>
     <prm fnumber="45"/>
     <prm focallength="0.05"/>
     <prm sensor_ar="1"/>
     <prm sensor_width="0.024"/>
     <sensor type="ciexyz" name="sensor" y_only="false"/>
     <output type="rgbimage" name="image">
             <prm colorspace="srgb"/>
             <prm depth="8"/>
             <prm xwhite="0.31271"/>
             <prm ywhite="0.32902"/>
             <prm hcc="0.32"/>
             <prm drawinfo="false"/>
             <filter type="gain" name="filter1" enabled="true" gainev="0"/>
             <filter type="reinhardglobal" name="filter2" enabled="true" stops="1" strength="0.8"/>
     </output>
</instrument>