Core and the app · crate

kinogaki-image-pipeline

Core

ImagePipeline: what renders become on screen and in files.

Repository
Core and the app (kinogaki/studio-core)
Folder
studio/core/image-pipeline
Source
24 files, 7,212 lines
Tests
0 files, 0 lines

Also 1 shader or C file, 75 lines.

depends onused by tests alonedependencies for tests alone are listed below, not drawn

What it is

ImagePipeline: what renders become on screen and in files. It owns the render engines the packages bring, the document's render geometry and render scenes (core/scene's), and what renders live (live).

  • One active scene. Every Render view shows the active render scene, the first Render Output at the root with its Render flag on (owner: only one render node is active at a time, and that's what the viewport shows). Its engine renders, or the project's Default Engine (Settings ▸ Project; none chosen: the first installed) when there is none or it names one not installed.
  • O(1) when nothing changed. After a frame's cook is adopted, sync reads what changed: the scene's objects (by shared allocation, only when the document's scene revision moved: a move, a flag or a body counts, not only a network edit) and the board's shown values (only when an answer arrived or the time moved: what animates reaches the geometry as the values cooked at the new time), and the keyed objects and what they hold when the time moved them or their bodies' values (Document::placements: a move sends their TRANSFORM, a light's values its prim, a Render Output's values the settings); the live Target then sends the engine those objects' prims alone. An orbit changes neither: it sends the view's camera through RenderEngine::view and no scene update.
  • Nothing while nothing renders. With no Render view on, the geometry is left as it was and only the scenes (which Create reads) follow the document; the first Render view on brings it up to date once.
  • Never waits. Engines render on their own threads and wake the UI once per pass through the editor's Wake; a new camera or edit is queued, restarting the engine's refinement, and the view keeps showing what it showed.
  • On screen (display): once a frame each Render view pins its engine's newest pass and draws it through the color service (core/color's: ACEScg through the viewer's display and view, lib-color's); a Render view with no pass yet shows the shaded view.
  • Image files are read once each, for what is asked of them, by the document's one store (ImageFiles: relative to the project's folder, colors through the color service), each waking the window once when read: the targets' textures, the plans' images, the views' images.
  • Swatches (previews): the pictures node tiles show, a node that compiles to a material at the open level rendered by its engine's preview engine in core's preview scene, one slot a node; an Image node's thumbnail (thumbnails), made on a worker from its picture read reduced from the document's image files. The Image node the inspector shows reaches the canvas the same way (picked).
  • Through a compiled network (plan): what the active Render Output's Processing names, or the compiled network open, is planned by core and run on each film by its context's runner, a package's.
  • Live (live): what the panes ask for, as demand: runs of plans on films of engines ([docs/LIVE-PIPELINE.md]); a plan reading no render asks no engine for anything.

Engines are made on the window's GPU device; without a device (or an engine) nothing renders. The pipeline knows no UI: what it draws on the window it hands over as draws (ImageDraw, CanvasDraw) the editor paints, and swatches as pixels (SwatchPicture).

Depends on

CrateRepositoryAsWhat it is
kinogaki-colorlib-colornormalColor science and color management for Kinogaki.
kinogaki-color-serviceCore and the appnormalStudio'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-color-wgpulib-colornormalkinogaki-color's processors on a wgpu device.
kinogaki-cookCore and the appnormalStudio's core cooking engine, the same for every network kind (the owner's rule: the cooking DAG for nodes is core's).
kinogaki-core-packageCore and the appnormalCore's own SDK package (kinogaki.core): what Studio holds whatever plugins are installed.
kinogaki-documentCore and the appnormalStudio's document: the scene, a tree of objects under one root, and the core network each object of a kind naming a context holds.
kinogaki-mathlib-mathnormalKinogaki's vectors, points, matrices, quaternions and deterministic elementary functions.
kinogaki-networkCore and the appnormalStudio's core networks (design: core-owned networks; "Cooking DAG for nodes is studio core").
kinogaki-render-apiSDKnormalKinogaki's render interface: what a host (Studio) sends a render engine and what comes back, with no GPU or OS API.
kinogaki-sceneCore and the appnormalStudio's scene: the document cooked object by object.
kinogaki-studio-apiSDKnormalKinogaki Studio's headless plugin API.
kinogaki-viewport-corelib-viewportnormalKinogaki viewport core: what a 3D viewport shows, independent of any GPU API or UI toolkit.

For its tests alone

CrateRepositoryAsWhat it is
kinogaki-animCore and the apptestsStudio's animation channels.
kinogaki-testkitCore and the apptestsKinogaki Studio's core testkit: toy packages written against the SDK alone, so core is tested with no real plugin.

Third-party

CrateVersionLicenceFrozen inAsAlso used by
bytemuck1.25.2Zlib OR Apache-2.0 OR MITlib-ui/vendornormalkinogaki-composit-wgpu, kinogaki-geometry, kinogaki-geometry-view, kinogaki-math, kinogaki-pixel, kinogaki-ui, kinogaki-ui-wgpu, kinogaki-viewport-api and 2 more
log0.4.34MIT OR Apache-2.0lib-ui/vendornormalkinogaki-editor, kinogaki-scene, kinogaki-shared, kinogaki-ui, kinogaki-ui-shell, kinogaki-ui-wgpu

Used by

CrateRepositoryAsWhat it is
kinogaki-editorCore and the appnormalKinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one.

Modules

Public types and traits

At the crate root

Structs FilmImageDrawImagePipelineMachineSwatchPicture

Enums FollowedSurface

Re-exported from other crates

From kinogaki_color_service ColorManagement

By module: 8 public types and traits in 6 modules

canvas CanvasDrawFrameShows

display ImageDraw

finals Step

live Surface

picked Followed

previews SwatchPicture