Skip to content

feat(ocio): show graded video unchanged through any OCIO view - #163

Merged
mcoliver merged 2 commits into
feat/ocio-display-warningsfrom
feat/ocio-video-through-view
Oct 26, 2026
Merged

mcoliver merged 2 commits into
feat/ocio-display-warningsfrom
feat/ocio-video-through-view

Conversation

@mcoliver

@mcoliver mcoliver commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #155. Stacked on #162 → #161. Merge those first and this retargets to main.

Problem: mixed media in one timeline

The OCIO display has one view for every source. A timeline mixing graded video with EXR or log footage had to pick one:

  • Video (colorimetric): EXRs and log footage are shown un-tone-mapped.
  • An ACES view: the already graded video is tone-mapped a second time.

Fix

  • C++ (OCIOIPNode): the color function gets an ocio_color.invertView option. With it on, the node converts its input to the ocio_display.display/view display colour space, then inverts that view into the working space. The display's forward view then gives the input back unchanged, within the view's gamut and peak.
    • It's an option on color rather than a new ocio.function, so older builds opening a session that uses it fall back to the normal conversion instead of failing.
    • An unknown ocio.function also used to dereference a null processor. It now logs an error.
  • Python (ocio_source_setup):
    • Display-referred sources that UTV gave an input (fix(ocio): give sources an OCIO input while an OCIO display is in use #160) get invertView, following the main window's display/view. A display or view change re-syncs them, debounced. Scene-referred sources go through the view as before.
    • A source whose input the user changes is left alone.
    • View choice for the session:
      • Any scene-referred media in the session gets an ACES view.
      • Video only gets Video (colorimetric).
      • Rec.2020 HDR video in PQ/HLG gets ACES 2.0 - HDR 1000 nits (Rec.2020), so its colours outside P3 survive the round trip.
    • A source added later switches a view UTV chose, but never one the user picked.

Tested

OCIO numerics (PyOpenColorIO 2.6, bundled ACES 2.0 config): inverting the view, then applying it forwards, matches the input:

  • SDR: within 0.2 of a 10-bit code.
  • PQ through the ACES HDR 1000 views: within 0.05 codes from 1 to 1000 nits, for grey, skin, P3 red and green, and 709 blue.

Branch build on macOS, snapshots compared with a video-only reference:

Case Video frame EXR frame (0.18 linear)
PQ: PQ colour chart + EXR identical 84, OCIO expects 84.1
PQ: chart, EXR added later (view switches by itself) identical 84
PQ: chart + EXR, user picks Un-tone-mapped, then SDR video added view kept; chart identical –
SDR: Rec.709 video + EXR identical 89, OCIO expects 89.0

The OCIO logs had no errors. Before the Rec.2020 view preference, the P3-limited view moved a Rec.2020 green patch by 33 codes. That's why the second commit exists.

Limits

  • Video brighter than the view's peak (1000 nits) or outside its gamut is limited to it.
  • Only sources UTV set up itself are inverted. A user-chosen input follows the normal OCIO behaviour.
  • With several OCIO displays, sources follow the main window's view.

The OCIO display has one view for every source, so a timeline mixing
graded video and scene-referred media had to pick: Video (colorimetric)
showed EXRs and log footage un-tone-mapped, and an ACES view tone-mapped
the already graded video a second time.

The OCIO node's color function gets an ocio_color.invertView option: it
converts the input to the display/view's display color space and inverts
the view into the working space, so the display's forward view gives
the input back. UTV turns it on for the display-referred sources it
assigned an input to, following the main window's display and view, so
video comes through unchanged (within the view's gamut and peak) while
scene-referred media still gets the view's tone mapping. A source whose
input the user changes is left alone.

With that, the view is chosen for the session: an ACES view as soon as
there is scene-referred media, Video (colorimetric) for video only. A
source added later switches a view UTV chose, unless the user has
changed it.

An unknown ocio.function now logs an error instead of dereferencing a
null processor.

Part of #155.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
…163)

Graded video goes back through the inverse of the view, so the view's
gamut has to hold it. With the P3-limited ACES HDR view, Rec.2020 HDR
video lost its colors outside P3 (a Rec.2020 green patch was 33 codes
off). When the session has Rec.2020 PQ or HLG video, prefer ACES 2.0 -
HDR 1000 nits (Rec.2020).

Part of #155.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
@mcoliver
mcoliver force-pushed the feat/ocio-display-warnings branch from b016ab5 to 55ef990 Compare October 26, 2026 02:48
@mcoliver
mcoliver force-pushed the feat/ocio-video-through-view branch from 81bc685 to aa8840b Compare October 26, 2026 02:48
@mcoliver
mcoliver merged commit aa8840b into feat/ocio-display-warnings Oct 26, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant