eradiate.scenes.measure.PerspectiveCameraMeasure#

class eradiate.scenes.measure.PerspectiveCameraMeasure(id='measure', spectral_cfg=_Nothing.NOTHING, split_spp=None, spp=32, film_resolution=(32, 32), origin=_Nothing.NOTHING, target=_Nothing.NOTHING, up=_Nothing.NOTHING, far_clip=<Quantity(10000.0, 'kilometer')>, fov=<Quantity(50.0, 'degree')>)[source]#

Bases: eradiate.scenes.measure._core.Measure

Perspective camera scene element [perspective].

This scene element is a thin wrapper around the perspective sensor kernel plugin. It positions a perspective camera based on a set of vectors, specifying the origin, viewing direction and ‘up’ direction of the camera.

Parameters
  • id (str, optional, default: "measure") – User-defined object identifier.

  • spectral_cfg (MeasureSpectralConfig or dict, default: MeasureSpectralConfig.new()) – Spectral configuration of the measure. Must match the current operational mode. Can be passed as a dictionary, which will be interpreted by MeasureSpectralConfig.from_dict().

  • split_spp (int, optional) – If set, this measure will be split into multiple sensors, each with a sample count lower or equal to split_spp. This parameter should be used in single-precision modes when the sample count is higher than 100,000 (very high sample count might result in floating point number precision issues otherwise).

  • spp (int, default: 32) – Number of samples per pixel.

  • film_resolution (array-like, default: (32, 32)) – Film resolution as a (width, height) 2-tuple.

  • origin (array-like, default: [1, 1, 1] m) – A 3-vector specifying the position of the camera.

    Unit-enabled field (default: ucc[‘length’]).

  • target (array-like, default: [0, 0, 0] m) – Point location targeted by the camera.

    Unit-enabled field (default: ucc[‘length’]).

  • up (array, default: [0, 0, 1]) – A 3-vector specifying the up direction of the camera. This vector must be different from the camera’s viewing direction, which is given by target - origin.

  • far_clip (quantity of float, default: 10 000 km) – Distance to the far clip plane.

    Unit-enabled field (default: ucc[length]).

  • fov (quantity or float, default: 50°) – Camera field of view.

    Unit-enabled field (default: degree).

Fields
  • id (str or None) – User-defined object identifier.

  • spectral_cfg (MeasureSpectralConfig) – Spectral configuration of the measure.

  • split_spp (int) – If set, this measure will be split into multiple sensors, each with a sample count lower or equal to split_spp.

  • spp (int) – Number of samples per pixel.

  • origin (quantity) – A 3-vector specifying the position of the camera.

  • target (quantity) – Point location targeted by the camera.

  • up (array) – A 3-vector specifying the up direction of the camera.

  • far_clip (quantity) – Distance to the far clip plane.

  • fov (quantity) – Camera field of view.

is_distant()#

Return True iff measure records radiometric quantities at infinite distance.

is_split()#

Return True iff sample count split shall be activated.

kernel_dict(ctx)[source]#

Return a dictionary suitable for kernel scene configuration.

Parameters

ctx (KernelDictContext) – A context data structure containing parameters relevant for kernel dictionary generation.

Returns

KernelDict – Kernel dictionary which can be loaded as a Mitsuba object.

property film_resolution#

Getter for film resolution as a (int, int) pair.

Type

tuple

property sensor_dims#

List of sensor dimension labels.

Type

tuple of str

property var#

Post-processing variable field name and metadata.

Type

str, dict