PhysicalCamera class final
An aperture, a shutter time and a sensitivity, and the exposure they make.
The default camera draws the frame this engine always drew. f/4 at a
sixtieth of a second and ISO 100 is the reference camera: its exposure
value, log2(4² × 60) ≈ 9.907, is the one RenderSettings.exposure is
stated at. A camera one stop slower — f/4 at a thirtieth — exposes twice
as much, and so on, so exposureScale is 2^(referenceEv100 − ev100)
and nothing else: exactly one for the reference camera, which is why the
goldens did not move when the physical camera became the default.
What the numbers mean in light. The renderer exposes with the
saturation-based model (ISO 12232): the brightest luminance a camera
records is 1.2 × 2^EV100 candela per square metre, and the exposure
multiplier is its inverse. Holding the reference camera to the default
multiplier of 1.6 fixes the engine's photometric scale: one unit of scene
luminance is 1.6 × 1.2 × 960 = 1.0 * RenderMaterial.defaultEmissiveStrength cd/m² (RenderMaterial.defaultEmissiveStrength)
— and, since a white Lambertian surface shows E/π of an illuminance E,
one unit of illuminance is π times that, about 5790.6 lux
(LightNode.legacyUnit). Those are the renderer's own business since
1.0: everything the API takes is in lux, candela or nits, and the
renderer converts. The physical sky's default sun is about 116 000 lux
before the air, which is the real sun's order.
A light meter, not just a dial. ev100ForIlluminance is an incident meter's reading (calibration constant 250): EV100 = log2(E / 2.5). Fed PhysicalSky.illuminanceLux, it says what a camera standing in that light would be set to, and PhysicalCamera.metered makes that camera, solving for the shutter at a chosen aperture.
Auto exposure still decides the exposure while it is on: the meter's
answer replaces the camera's, as a camera on automatic chooses its own
shutter, and FrameResult.ev100 reports what it chose in these units.
Constructors
- PhysicalCamera({double aperture = referenceAperture, double shutter = referenceShutter, double iso = referenceIso, double compensation = 0.0})
-
A camera at the reference aperture, shutter and sensitivity, with no
compensation.
const
- PhysicalCamera.atEv100(double ev100, {double aperture = referenceAperture, double iso = referenceIso})
-
A camera set to
ev100atapertureandiso: the shutter is what makes the three agree.factory - PhysicalCamera.forSky(PhysicalSky sky, Vector3 toSun, {double aperture = referenceAperture, double iso = referenceIso})
-
A camera set for the light under
skywith the sun alongtoSun: PhysicalSky.illuminanceLux, metered.factory - PhysicalCamera.metered(double lux, {double aperture = referenceAperture, double iso = referenceIso})
-
A camera set as an incident meter reads
lux: ev100ForIlluminance, then PhysicalCamera.atEv100.factory
Properties
- aperture → double
-
The f-number: the focal length over the opening's diameter. Larger is
a smaller opening, less light and, where depth of field is on, more of
the picture sharp.
A unitless ratio.
final
- compensation → double
-
Stops added on top of what the three settings make; positive is
brighter, as the dial on a camera.
In stops (EV).
final
- ev100 → double
-
The exposure value at ISO 100:
log2(N² / t) − log2(S / 100), less compensation. In stops (EV).no setter - exposure → double
-
The linear exposure multiplier this camera makes, in the engine's
photometric scale:
1.0 * RenderMaterial.defaultEmissiveStrength / (1.2 × 2^EV100), which is referenceExposure × exposureScale.no setter - exposureScale → double
-
What this camera multiplies a frame's light by, against the reference
camera:
2^(referenceEv100 − ev100). Exactly one at the reference.no setter - hashCode → int
-
The hash code for this object.
no setteroverride
- iso → double
-
The sensor's sensitivity, ISO arithmetic.
Unitless.
final
- label → String
-
f/4 · 1/60 s · ISO 100, as a camera's display would put it.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shutter → double
-
How long the shutter is open, in seconds.
final
Methods
-
copyWith(
{double? aperture, double? shutter, double? iso, double? compensation}) → PhysicalCamera - Returns a copy with the given fields replaced; null leaves a field as it is.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stopAperture(
int thirds) → PhysicalCamera -
This camera with aperture moved by
thirdsthirds of a stop; positive closes it. A third of a stop is a factor of2^(1/6)in f-number. -
stopIso(
int thirds) → PhysicalCamera -
This camera with iso moved by
thirdsthirds of a stop; positive is more sensitive. -
stopShutter(
int thirds) → PhysicalCamera -
This camera with shutter moved by
thirdsthirds of a stop; positive is longer. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Properties
- referenceEv100 → double
-
The reference camera's exposure value,
log2(4² × 60), about 9.907.no setter
Static Methods
-
ev100ForExposure(
double exposure) → double -
The exposure value a linear
exposuremultiplier stands for — what a metered or pinned multiplier would be on a dial. -
ev100ForIlluminance(
double lux) → double -
An incident meter's reading under
lux, at ISO 100:log2(E / 2.5), the calibration constant 250 over a hundred. -
shutterFor(
double ev100, {double aperture = referenceAperture, double iso = referenceIso}) → double -
The shutter time that makes
ev100atapertureandiso.
Constants
- referenceAperture → const double
- f/4, the reference camera's aperture. A unitless ratio.
- referenceExposure → const double
-
The exposure multiplier the reference camera is held to — what
RenderSettings.defaultExposureis. - referenceIso → const double
- ISO 100, the reference camera's sensitivity. Unitless.
- referenceShutter → const double
- A sixtieth of a second, the reference camera's shutter.