Cameras and lenses

Generated from the schema registry by ernie schema --markdown.

Camera

A view looking down -z, y up, with a lens and film.

Prim type · Inherits Xformable

Attribute Type Description Fallback Values Source
projection token How it projects the scene. "perspective" perspective, orthographic UsdGeom
horizontalAperture double Film width, metres. 0.020955 ≥ 0 UsdGeom
verticalAperture double Film height, metres. 0.0152908 ≥ 0 UsdGeom
horizontalApertureOffset double The film's offset from the lens axis along x, metres. 0.0 UsdGeom
verticalApertureOffset double The film's offset from the lens axis along y, metres. 0.0 UsdGeom
focalLength double The lens's focal length, metres. 0.05 ≥ 0 UsdGeom
clippingRange double2 Near and far distances in metres. [1.0,1000000.0] > 0 UsdGeom
clippingPlanes float[n, 4] (n, 4) planes (a, b, c, d) keeping points where a x + b y + c z + d >= 0. UsdGeom
fStop double The lens's f-number; 0 for a pinhole, all in focus. 0.0 ≥ 0 UsdGeom
focusDistance double Metres to the plane in focus. 0.0 ≥ 0 UsdGeom
stereoRole token Which eye it is. "mono" mono, left, right UsdGeom
shutter:open double Frames from the time code the shutter opens. 0.0 UsdGeom
shutter:close double Frames from the time code it closes. 0.0 UsdGeom
exposure double Stops of exposure added to the image. 0.0 UsdGeom
exposure:iso double The sensor's ISO speed. 100.0 > 0 UsdGeom
exposure:time double Seconds of exposure. 1.0 ≥ 0 UsdGeom
exposure:fStop double The f-number exposure is computed with. 1.0 > 0 UsdGeom
exposure:responsivity double The sensor's responsivity. 1.0 ≥ 0 UsdGeom
ernie:exposure:mode token auto keys the image to middle grey from the metered scene, after the settings above. "manual" manual, auto Ernie
ernie:exposure:adaptation double Frames auto exposure takes to cover 63% of a change; 0 at once. 0.0 ≥ 0 Ernie
ernie:shutter:samples int Sub-frames rendered across the shutter. 8 ≥ 1 Ernie
ernie:shutter:rolling double Frames between the top row's exposure and the bottom row's; 0 global. 0.0 ≥ 0 Ernie
ernie:camera:scan token pushbroom: a line scanner whose rows run from the last frame's pose to this one's. "frame" frame, pushbroom Ernie
ernie:pushbroom:lineOffset double Metres from the principal point to the pushbroom's detector line. 0.0 Ernie
{
  "$schema": "https://alexmaietta.github.io/ernie/schema/ernie-scene.schema.json",
  "prims": {
    "/World/Camera": {
      "typeName": "Camera",
      "projection": "perspective",
      "horizontalAperture": 0.020955,
      "verticalAperture": 0.0152908,
      "horizontalApertureOffset": 0.0,
      "verticalApertureOffset": 0.0,
      "focalLength": 0.05,
      "clippingRange": [1.0, 1000000.0],
      "fStop": 0.0,
      "focusDistance": 0.0,
      "stereoRole": "mono",
      "shutter:open": 0.0,
      "shutter:close": 0.0,
      "exposure": 0.0,
      "exposure:iso": 100.0,
      "exposure:time": 1.0,
      "exposure:fStop": 1.0,
      "exposure:responsivity": 1.0,
      "ernie:exposure:mode": "manual",
      "ernie:exposure:adaptation": 0.0,
      "ernie:shutter:samples": 8,
      "ernie:shutter:rolling": 0.0,
      "ernie:camera:scan": "frame",
      "ernie:pushbroom:lineOffset": 0.0
    }
  }
}

ErnieLensAPI

A camera's lens beyond USD's: fisheyes, distortion, vignetting and chromatic aberration.

API schema

Attribute Type Description Fallback Values Source
ernie:lens:projection token Rectilinear, or a Kannala-Brandt fisheye. "perspective" perspective, fisheye Ernie
ernie:lens:distortion float[] Brown-Conrady k1 k2 k3 p1 p2; missing ones are 0. [] Ernie
ernie:lens:fisheye float[] Kannala-Brandt k1 k2 k3 k4 of a fisheye; none is equidistant. [] Ernie
ernie:lens:vignetting bool Natural falloff off axis. false Ernie
ernie:lens:transmission double The fraction of light passed. 1.0 ≥ 0, ≤ 1 Ernie
ernie:lens:chromatic:scale float[] (nm, scale) pairs: lateral colour, the image's scale per wavelength. [] Ernie
ernie:lens:chromatic:focus float[] (nm, metres) pairs: axial colour, the focal length's shift per wavelength. [] Ernie
ernie:lens:rays float tensor, rank 3 float32 (rows, columns, 3) unit directions every rays step pixels, in place of the projection and distortion. Ernie
ernie:lens:raysStep int Pixels between the lens's rays. 8 ≥ 1 Ernie
{
  "$schema": "https://alexmaietta.github.io/ernie/schema/ernie-scene.schema.json",
  "prims": {
    "/World/ErnieLensAPI": {
      "typeName": "Xform",
      "apiSchemas": ["ErnieLensAPI"],
      "ernie:lens:projection": "perspective",
      "ernie:lens:distortion": [],
      "ernie:lens:fisheye": [],
      "ernie:lens:vignetting": false,
      "ernie:lens:transmission": 1.0,
      "ernie:lens:chromatic:scale": [],
      "ernie:lens:chromatic:focus": [],
      "ernie:lens:raysStep": 8
    }
  }
}

ErniePolarizerAPI

A polarizer in front of a camera's lens, or a polarization sensor's mosaic.

API schema

Attribute Type Description Fallback Values Source
ernie:polarizer:type token linear in front of the lens, or a mosaic of 90, 45 / 135, 0 degree polarizers over 2 x 2 pixels, as a polarization sensor's. "linear" linear, mosaic Ernie
ernie:polarizer:angle double Degrees from the image's +x towards +y to a linear polarizer's axis. 0.0 Ernie
ernie:polarizer:extinction double Light passed along the axis over light passed across it. 1000.0 ≥ 1 Ernie
ernie:polarizer:transmission double The fraction of light polarized along the axis passed. 0.85 ≥ 0, ≤ 1 Ernie
{
  "$schema": "https://alexmaietta.github.io/ernie/schema/ernie-scene.schema.json",
  "prims": {
    "/World/ErniePolarizerAPI": {
      "typeName": "Xform",
      "apiSchemas": ["ErniePolarizerAPI"],
      "ernie:polarizer:type": "linear",
      "ernie:polarizer:angle": 0.0,
      "ernie:polarizer:extinction": 1000.0,
      "ernie:polarizer:transmission": 0.85
    }
  }
}

ErnieSensorAPI

A camera's sensor: its spectral range, noise, ADC and quantum efficiency; its products set how finely the range is sampled.

API schema

Attribute Type Description Fallback Values Source
ernie:spectral:range double2 Wavelengths in nm the sensor responds to; its products sample them in bands. [380.0,780.0] > 0 Ernie
ernie:sensor:type token A colour or a mono sensor. "rgb" rgb, mono Ernie
ernie:sensor:noise bool Whether it adds the noise below. true Ernie
ernie:sensor:fullWell double Electrons a pixel holds. 20000.0 > 0 Ernie
ernie:sensor:readNoise double Electrons, standard deviation. 3.0 ≥ 0 Ernie
ernie:sensor:darkCurrent double Electrons per second. 0.1 ≥ 0 Ernie
ernie:sensor:prnu double Standard deviation of each pixel's relative gain. 0.005 ≥ 0 Ernie
ernie:sensor:dsnu double Electrons, standard deviation of each pixel's offset. 0.5 ≥ 0 Ernie
ernie:sensor:electronsPerDn double At ISO 100; 0 for the full well over the bit depth's range. 0.0 ≥ 0 Ernie
ernie:sensor:bitDepth int Bits of each digital number the sensor's ADC makes, such as 8, 12 or 16. 12 ≥ 1, ≤ 32 Ernie
ernie:sensor:blackLevel double DN added to every pixel. 0.0 ≥ 0 Ernie
ernie:sensor:pixelPitch double Micrometres, of orthographic cameras. 5.0 > 0 Ernie
ernie:sensor:seed int The seed of the sensor's noise. 0 Ernie
ernie:sensor:qe:r float[] (nm, electrons per photon) pairs of the red channel; unset keeps the generic curve. [] Ernie
ernie:sensor:qe:g float[] (nm, electrons per photon) pairs of the green channel; unset keeps the generic curve. [] Ernie
ernie:sensor:qe:b float[] (nm, electrons per photon) pairs of the blue channel; unset keeps the generic curve. [] Ernie
ernie:sensor:qe:mono float[] (nm, electrons per photon) pairs of the mono channel; unset keeps the generic curve. [] Ernie
{
  "$schema": "https://alexmaietta.github.io/ernie/schema/ernie-scene.schema.json",
  "prims": {
    "/World/ErnieSensorAPI": {
      "typeName": "Xform",
      "apiSchemas": ["ErnieSensorAPI"],
      "ernie:spectral:range": [380.0, 780.0],
      "ernie:sensor:type": "rgb",
      "ernie:sensor:noise": true,
      "ernie:sensor:fullWell": 20000.0,
      "ernie:sensor:readNoise": 3.0,
      "ernie:sensor:darkCurrent": 0.1,
      "ernie:sensor:prnu": 0.005,
      "ernie:sensor:dsnu": 0.5,
      "ernie:sensor:electronsPerDn": 0.0,
      "ernie:sensor:bitDepth": 12,
      "ernie:sensor:blackLevel": 0.0,
      "ernie:sensor:pixelPitch": 5.0,
      "ernie:sensor:seed": 0,
      "ernie:sensor:qe:r": [],
      "ernie:sensor:qe:g": [],
      "ernie:sensor:qe:b": [],
      "ernie:sensor:qe:mono": []
    }
  }
}