SDK · crate
kinogaki-render-api
Kinogaki's render interface: what a host (Studio) sends a render engine and what comes back, with no GPU or OS API.
- Repository
- SDK (kinogaki/studio-sdk)
- Folder
sdk/crates/render-api- Source
- 36 files, 9,268 lines
- Tests
- 1 file, 24 lines
What it is
Kinogaki's render interface: what a host (Studio) sends a render engine and what comes back, with no GPU or OS API.
It is Hydra's split made small. The host pushes typed prims (Prim) in batches (SceneUpdate) with dirty bits (Dirty) and point ranges (Ranges); batches an engine has not applied yet coalesce (SceneUpdate::merge). Engines implement RenderEngine, publish whole passes as Frames and wake the host once per result (Wake). Each engine describes itself without a device (EngineDescription): its settings (Parameters), the prim types it declares (lights and fog, PrimTypes; the standard ones shared), its material nodes (NodeDefs) and outputs (Aovs, by id). Materials are networks of MaterialX's nodes and engines' own (MaterialNetwork): an engine implements the MaterialX nodes it lists and receives the rest expanded or translated (Engines::adopt), says what its own materials come to in the standard form, an OpenPBR Surface (MaterialRules), and renders a PreviewImage of a material. Engines output linear ACEScg. Hosts make shape prims from ShapeSources: triangles or curves, from a polygon value, a CAD tessellation or a toolpath preview alike. RecordingEngine stores what it is sent, for hosts' tests. Every value a setting, a declared prim or a material port holds is the SDK's one value model (value: Value, ValueKind).
The wgpu feature adds the display module: how a wgpu host shows an engine's frames as textures on its own device and makes engines there (wgpu 30.0.1, on every platform wgpu supports). Without it the crate depends on the standard library and the SDK's standard geometry values (geometry, which also holds Detail) alone.
Depends on
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-geometry | SDK | normal | Kinogaki Studio's standard geometry values. |
kinogaki-mtlx | SDK | normal | MaterialX 1.39 for Kinogaki Studio: the material layer every engine, format and core share, in our own implementation (MaterialX's C++ library is a reference and a test oracle, never a dependency). |
kinogaki-value | SDK | normal | Kinogaki Studio's value model: the one way the SDK says what a value is and holds. |
Third-party
| Crate | Version | Licence | Frozen in | As | Also used by |
|---|---|---|---|---|---|
wgpu | 30.0.1 | MIT OR Apache-2.0 | lib-ui/vendor | normal | kinogaki-color-wgpu, kinogaki-composit-wgpu, kinogaki-editor, kinogaki-shared, kinogaki-ui-shell, kinogaki-ui-wgpu, kinogaki-viewport-gpu |
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
example-box-node | SDK | tests | A Kinogaki Studio plugin that adds a Box node. |
example-flat-engine | SDK | normal | Flat: an example render engine. |
example-pin-board | SDK | tests | A Kinogaki Studio plugin that brings a context with its UI. |
example-points-format | SDK | normal | XYZ: an example file format. |
kinogaki-color-service | Core and the app | normal | 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-comp | Comp | normal | Comp as an SDK package (kinogaki.comp): what fills Studio's Comp context (kinogaki.core.comp, core declares it, inside a Render Output object). |
kinogaki-core-package | Core and the app | normal | Core's own SDK package (kinogaki.core): what Studio holds whatever plugins are installed. |
kinogaki-document | Core and the app | normal | Studio'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-editor | Core and the app | normal | Kinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one. |
kinogaki-exr-format | OpenEXR | normal | OpenEXR, a format plugin: an EXR file reads as one standard Image, every part's channels its layers, and an Image writes as one EXR, Cryptomatte included. |
kinogaki-fbx | FBX | normal | FBX as a read-only format plugin for Kinogaki Studio. |
kinogaki-geometry-view | Core and the app | normal | Geometry, curves and B-reps in the viewport, independent of any GPU API: the SDK's standard values as surface packets (over the SDK's display triangulation and shading normals, so Solid draws what Render renders), the one picker that answers rays and boxes ... |
kinogaki-gltf | glTF | normal | glTF 2.0 and GLB, a format plugin for Kinogaki Studio. |
kinogaki-harness | Core and the app | normal | Studio's test harness: the real editor, its event routing and its background work, driven offscreen with only the packages a test names. |
kinogaki-image-pipeline | Core and the app | normal | ImagePipeline: what renders become on screen and in files. |
kinogaki-materialx | MaterialX | tests | MaterialX documents (.mtlx), a format plugin: a document's materials read as Studio's Materials, MaterialX networks of nodes, and Materials written as one. |
kinogaki-mesh | Mesh | normal | The Mesh plugin: polygon modelling, Maya's and Houdini's toolset on core's editing API (plugins/mesh/PLAN.md holds the inventory and its groups). |
kinogaki-network | Core and the app | normal | Studio's core networks (design: core-owned networks; "Cooking DAG for nodes is studio core"). |
kinogaki-obj | OBJ | normal | Wavefront OBJ, a format plugin: an OBJ file reads as one standard Geometry, its material libraries (mtllib) as MaterialX networks (materials) in a materials item before it; any polygons and polylines write as ... |
kinogaki-pixel | Pixel | normal | Pixel, a realtime pixel-art render engine, as a Kinogaki Studio plugin. |
kinogaki-project | Core and the app | normal | Studio's project files: a document as a Prism document. |
kinogaki-render-geometry | Core and the app | normal | The render side of Studio's standard geometry values: what render engines receive for them, whatever kernel made them. |
kinogaki-scene | Core and the app | normal | Studio's scene: the document cooked object by object. |
kinogaki-shared | Core and the app | normal | The crates Studio and its plugins share, built once as a Rust dylib. |
kinogaki-spectre | Spectre | normal | Spectre, the spectral path tracer, as a Kinogaki Studio render plugin. |
kinogaki-spectre-testing | Spectre | normal | What Spectre's GPU tests share (a dev-dependency of the plugin's tests alone): the engine on an offscreen device, waits on its wakes, and images compared with a tolerance. |
kinogaki-studio-api | SDK | normal | Kinogaki Studio's headless plugin API. |
kinogaki-studio-api-testing | SDK | normal | The SDK's test support (a dev-dependency only): assert_refused for admission tests, read_hostile for a format's tests of hostile files, format for its scratch folders and round trips, workers as a host installs them, with wgpu an ... |
kinogaki-testkit | Core and the app | normal | Kinogaki Studio's core testkit: toy packages written against the SDK alone, so core is tested with no real plugin. |
kinogaki-usd | USD | normal | Universal Scene Description as a format plugin for Kinogaki Studio: usda, usdc and usdz files read into the standard values and written from them. |
kinogaki-workflows | Workflows | tests | Tests alone: tests/workflows drives what a person does across the plugins the app ships, through the real editor offscreen. |
Modules
aovOutputs (AOVs) a final frame can carry, known by id.311 linesaov::cryptomatteCryptomatte 1.2 (Psyop's specification) for every engine: how a name becomes an ID, and the manifest an Image carries as metadata so a reader names what each ID is.119 linesaov::standardThe standard outputs: their ids, and each one'sAov.69 linesdeclaredPrim types an engine declares: lights and atmospheres a host places in its scene, each a parameter schema ofParameters.136 linesdescriptionWhat an engine is, without a device:EngineDescription.341 linesdirtyWhat changed about a prim: a small flag set, a subset of Hydra's HdChangeTracker bits.114 linesdisplayThe display contract between a wgpu host and its render engines.258 linesengineThe engine trait and what passes through it: views, frames, one-shot results and the wake callback.290 linesidPrim ids: a slot and a generation, so an id that was removed never names the prim that later reuses its slot.148 linesmaterialMaterial networks: MaterialX's nodes (mtlx) and engines' own, wired.691 linesmaterial::adopt(private)A network as one engine renders it (adopt), each node it doesn't implement rewritten, exact steps first:435 linesmaterial::adopt::work(private)Work: a network being rewritten: nodes by a stable index (a removed one gone), links by name, the shown node.374 linesmaterial::def(private)NodeDef: a material node type as data.183 linesmaterial::display(private)MaterialDisplay: what the shaded viewport shows of a material, a simple approximation its engine makes of its own material (MaterialRules::display): a color, a primvar and an image, read through its texture's transform ...73 linesmaterial::mtlxMaterialX's nodes asNodeDefs: one a signature of the MaterialX library, all made on first use and shared (def).527 linesmaterial::previewThe material preview: a shape in the SDK, an image from the engine.291 linesmaterial::standardThe standard form: a material as an OpenPBR Surface shown through a Surface Material, what engines, the shaded viewport and file formats meet in.271 linesprimThe prims a host sends: shapes (meshes and curves), instancers, cameras, materials and textures (the structural prims every scene is made of; a texture is the SDK's one decoded picture, anImage), and prims of the types an engine declares (lights, fog ...139 linesprim::camera(private)Camera: a camera after UsdGeomCamera.69 linesprim::instancer(private)Instancer: placements of other prims: real instancing.307 linesprim::shape(private)Shape: triangles or curves in their own space, with their primvars (Attributes: Hydra's primvars over the SDK's one typed attribute table), their material assignment (Subsets) and their placement.419 linesrangesChanged element ranges of a stream (a drag's points), coalesced: spans closer than a small gap join, and pastRanges::MOSTspans the change counts as the whole stream.92 linesrecordingAn engine that renders nothing: it applies updates to a CPU-side store and counts what it was sent, for hosts' tests (a drag must send ranges only, an object move no triangles).216 linessettingsSettings: what every view shares (SceneSettings) and the values an engine describes itself (Parameters inSections, kept by name).99 linessourceWhat a host renders an object from: a shape and the primvars a render reads from it (ShapeSource), whatever made it (a polygon value's display triangulation, its curves, a CAD tessellation, a toolpath preview).147 linesstandardThe standard prim types: UsdLux's lights and exponential height fog, as schemas (area_light,dome_light,distant_light,spot_light,fog) every engine that renders them declares as they are here, and as typed values (Light,Fog) an engine ...538 linesstandard::emission(private)Emission: where an emitter's spectrum comes from (Emission), and the color it shows as in an RGB engine (Emission::color): linear ACEScg (RENDER_SPACE) at luminance 1.251 linesthreadAn engine's render thread, as every engine runs one:EngineThreadis theRenderEnginea host holds, a handle that never blocks.473 linesupdateScene updates: what the host pushes, in batches, and how batches an engine has not applied yet coalesce into one.165 lines
Public types and traits
At the crate root
Traits MaterialRulesRenderEngineShapeSource
Structs AovAovDescAovSpecCameraCapabilitiesCountsDeclaredDeliverDirtyDisplayTextureEngineBuilderEngineDescriptionEnginesFrameIdIdAllocatorInstancerInstancerBuilderLinkMaterialMaterialDisplayMaterialMapsMaterialNetworkMotionNetworkBuilderNodeNodeDefNodeOutputPendingPlainTrianglesPreviewImagePreviewRequestPreviewScenePrimChangePrimIdPrimTypeRangesRecordingEngineRenderStatsSceneSettingsSceneUpdateShapeShapeBuilderSubsetsViewDescViewIdVisibility
Enums AovClassAovFormatNodeInputPreviewLightingPreviewShapePrimPrimKindProjectionRoleTopologyViewCameraViewMode
Type aliases MapNodeIndexWake
Re-exported from other crates
From kinogaki_geometry Detailimage::f32_to_halfimage::half_to_f32
From kinogaki_geometry as geometry (the crate)
From kinogaki_mtlx as materialx (the crate)
From kinogaki_value EngineIdParameterPrimTypeIdSection
From kinogaki_value as value (the crate)
By module: 80 public types and traits in 23 modules
aov AovAovClassAovDescAovFormatAovSpec
declared DeclaredPrimTypeRole
description CapabilitiesEngineBuilderEngineDescriptionEnginesMaterialRulesMotion
dirty Dirty
display DisplayEngineMadeOptionsShownTexture
engine DeliverFramePendingRenderEngineRenderStatsViewCameraViewDescViewIdViewModeWake
id IdIdAllocatorPrimId
material LinkMaterialNetworkNetworkBuilderNodeNodeIndex
material::def NodeDefNodeInputNodeOutput
material::display DisplayTextureMaterialDisplay
material::preview PreviewImagePreviewLightingPreviewRequestPreviewScenePreviewShape
prim MaterialPrimPrimKindVisibility
prim::camera CameraProjection
prim::instancer InstancerInstancerBuilderMapMaterialMaps
prim::shape ShapeShapeBuilderSubsetsTopology
ranges Ranges
recording CountsRecordingEngine
settings SceneSettings
source PlainTrianglesShapeSource
standard FogLightLightShape
standard::emission Emission
thread EngineThreadMailboxMessagePublishedReading
update PrimChangeSceneUpdate
Besides these, 24 public functions at module level.
