lib-render · crate

kinogaki-spectra

Libraryenvironment

Spectral data and the color science hosts and engines share.

Repository
lib-render (kinogaki/lib-render)
Folder
libs/lib-render/crates/spectra
Source
5 files, 461 lines
Tests
1 file, 197 lines
depends onused by tests alonedependencies for tests alone are listed below, not drawn

What it is

Spectral data and the color science hosts and engines share.

  • The grid. Spectra are tabulated every STEP nm over LAMBDA_MIN–LAMBDA_MAX (SAMPLES values, Sampled) and read between nodes by linear interpolation, the CIE's recommended method.
  • Illuminants (Illuminant): the CIE's published tables (D50, D55, D65, D75 daylight, A incandescent, F2/F7/F11 fluorescent and the LED-B series), parsed from the CIE's own CSV files in data/cie.
  • Conductors (Conductor): measured complex indices n + ik from the refractiveindex.info database (data/nk), and the exact Fresnel reflectance they give (fresnel_conductor).
  • Color (color): the color a spectrum displays as in ACEScg (display_color), through lib-color's observer (Wyman, Sloan and Shirley's fit of CIE 1931, what Spectre's film integrates) and XYZ relative to the equal-energy white E.

Emission spectra are normalized to luminance 1 (luminance_scale): an emitter's brightness is its intensity, whichever spectrum it has, so changing a light's spectrum changes its color and not its brightness.

Sources and licenses are in docs/SPECTRA.md and the crate's data folder: the CIE tables are CC BY-SA 4.0, the conductor data CC0.

Depends on

CrateRepositoryAsWhat it is
kinogaki-colorlib-colornormalColor science and color management for Kinogaki.

Third-party

None.

Used by

CrateRepositoryAsWhat it is
kinogaki-color-serviceCore and the apptestsStudio's color service: the OpenColorIO config (lib-color's built-in ACES 2.0 CG config, or a file), the working space, and the viewer's display, view, look, exposure and gamma.
kinogaki-spectreSpectrenormalSpectre, the spectral path tracer, as a Kinogaki Studio render plugin.

Modules

Public types and traits

At the crate root

Structs Sampled

Enums ConductorIlluminant

By module: 2 public types and traits in 2 modules

conductor Conductor

illuminant Illuminant

Besides these, 7 public functions at module level.