eradiate.scenes.measure.PerspectiveCameraMeasure#
- class eradiate.scenes.measure.PerspectiveCameraMeasure(id='measure', srf=_Nothing.NOTHING, sampler='independent', rfilter='box', 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:
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"
) – Identifier of the current scene element.srf (
Path
orstr
orSpectrum
ordict
, default:MultiDeltaSpectrum(wavelengths=550.0 * ureg.nm)
) – Spectral response function (SRF). If a path is passed, it attempts to load a dataset from that location. If a keyword is passed, e.g.,'sentinel_2a-msi-4'
it tries to serve the corresponding dataset from the Eradiate data store. By default, the prepared version of the SRF is served unless it does not exist in which case the raw version is served. To request that the raw version is served, append'-raw'
to the keyword, e.g.,'sentinel_2a-msi-4-raw'
. Note that the prepared SRF provide a better speed versus accuracy trade-off, but for the best accuracy, the raw SRF should be used. Other types will be converted byspectrum_factory
.sampler (
{"independent", "stratified", "multijitter", "orthogonal", "ldsampler"}
, default:"independent"
) – Mitsuba sampler used to generate pseudo-random number sequences.rfilter (
{"box", "gaussian"}
, default:"box"
) – Reconstruction filter used to scatter samples on sensor pixels. By default, using a box filter is recommended.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 bytarget - origin
.far_clip (
quantity
offloat
, default:10 000 km
) – Distance to the far clip plane.Unit-enabled field (default: ucc[length]).
fov (
quantity
orfloat
, default:50°
) – Camera field of view.Unit-enabled field (default: degree).
- Fields:
srf (
Spectrum
) – Spectral response function (SRF).sampler (
str
) – Mitsuba sampler used to generate pseudo-random number sequences.rfilter (
str
) – Reconstruction filter used to scatter samples on sensor pixels.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.
- traverse(callback)#
Traverse this scene element and collect kernel dictionary template and parameter update map contributions.
- Parameters:
callback (
SceneTraversal
) – Callback data structure storing the collected data.
- update()#
Enforce internal state consistency. This method should be called when fields are modified. It is automatically called as a post-init step.
- property objects#
Map of child objects associated with this scene element.
- Returns:
dict
– A dictionary mapping object names to a corresponding object to be inserted in the Eradiate scene graph.
- property params#
- Returns:
dict[str
,UpdateParameter
] orNone
– A dictionary mapping parameter paths, consisting of dot-separated strings, to a corresponding update protocol.
See also
- property template#
Kernel dictionary template contents associated with this scene element.
- Returns:
dict
– A flat dictionary mapping dot-separated strings describing the path of an item in the nested scene dictionary to values. Values may be objects which can be directly used by themitsuba.load_dict()
function, orInitParameter
instances which must be rendered.
See also