lib-render · crate
kinogaki-spectra
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
What it is
Spectral data and the color science hosts and engines share.
- The grid. Spectra are tabulated every
STEPnm overLAMBDA_MIN–LAMBDA_MAX(SAMPLESvalues,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 indata/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
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-color | lib-color | normal | Color science and color management for Kinogaki. |
Third-party
None.
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-color-service | Core and the app | tests | Studio'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-spectre | Spectre | normal | Spectre, the spectral path tracer, as a Kinogaki Studio render plugin. |
Modules
colorWhat spectra display as, in Spectre's film's convention: colors are linear ACEScg, spectra mean light relative to the equal-energy white E (the constant spectrum 1 has XYZ (1, 1, 1) and displays as ACEScg (1, 1, 1)).43 linesconductor(private)Metals by their measured complex index of refraction n + ik.133 linesilluminant(private)The CIE's standard and representative illuminants.151 linestables(private)The published tables, read from the source files as they were downloaded (data/), and resampled onto the grid.69 lines
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.
