Repository navigation
Ariadne: live textures, a raster stream on any node, uploaded a rectangle at a time (§5.4) - #1236
Merged
Merged
Conversation
transfix
enabled auto-merge (squash)
November 14, 2026 19:32
transfix
force-pushed
the
feat/ariadne-live-textures
branch
from
November 14, 2026 19:34
aff5321 to
74dea9b
Compare
This was referenced Nov 14, 2026
…ngle at a time (§5.4)
material: { texture: { stream: <name> } } feeds a node's texture from a stream while the scene
runs: any node that draws a mesh (a geometry node, a custom type returning a GeometryNode, a
source: { data } node's terrain) and type: stream nodes. The name is a stream token or a state
path holding a raster mirror, looked up as written and against the document's prefix, every frame
until live, so the producer may start after the scene. plane primitives now carry UVs.
- Raster streams (cvc/ariadne/stream/raster.h), codec rgba8.patch: each frame is the rectangles
that changed and their pixels, with a key frame on the first publish, every key_every frames and
after a subscriber joins. The consumer (raster_canvas, LiveTextureBinding) draws into a canvas
the texture aliases: the first frame and one after a gap upload it whole, every other frame only
its rectangles (texture_modified_rect, glTexSubImage2D), a frame with nothing new nothing. Raw
streams still show each frame whole.
- Each raster keeps its frames in state at its token (size, codec, last key frame, a ring of 8,
the frame number written last), so a late subscriber catches up; mirror: names a second path.
raster_follower turns a mirror back into a local stream, with a key frame of its own canvas for
each new subscriber.
- Producers: raster_stream (fill, paint, paint_grid through mesh_ops' colour maps with NaN
transparent, pixels() + mark, publish, publish_key); pycvc.raster_open / RasterStream and
host.open_raster; the DSL's raster-open, raster-fill, raster-grid, raster-publish, raster-key and
raster-close beside the stream verbs, owned by the calling document.
- Across a relay: a server document mirrors its raster into a namespace it publishes; a client
that subscribes names the mirror.
- AriRuntime (arigl, arigl-web, ariglx, pycvc_gl's Host) registers the stream and raster verbs and
type: stream by default; arisrv registers the verbs for its server document.
Tests: stream_raster_test (codec, canvas, producer, mirror followed locally, the verbs, and a
server document's raster replicated over an inproc transport and drawn by a client),
cvcgl_live_texture (pixels, upload counts at the driver, a mirrored heightfield, a reopened
stream, a type: stream node, AriRuntime's registrations), test_pycvc_raster.py and
AriadneScene.MaterialTextureStream. docs/ARIADNE.md §5.4 and §9.7.
…e (64 MiB transports, the WebSocket relay's 2 MiB backlog)
transfix
force-pushed
the
feat/ariadne-live-textures
branch
from
November 15, 2026 02:27
3f14662 to
1950cd0
Compare
transfix
added a commit
that referenced
this pull request
Nov 15, 2026
- stream_intrinsics.cpp: the stream provider stays `any`, and #1236's raster verbs are a provider of their own, registered `host_proxied`: they are synchronous, raster-open and raster-publish write the raster's mirrors into the state tree raw (write_node), and one thread paints and publishes a raster, so in an `any` group they run on the host thread. Registered host_only (the default) they would have put every isolated document of an app with the stream verbs in a host-affinity group. - STATE_EXEC_THREADED.md: the raster verbs and #1171's skeleton provider in the provider table, and the file list.
transfix
added a commit
that referenced
this pull request
Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A node's texture today is an image read once, at realize. This makes it live: any node that draws a
mesh can wear a stream, and a raster stream re-uploads only the rectangles that changed. The
producer can paint from C++, from Python, or from a relay's server document, whose frames reach the
clients that subscribe.
The document
custom type whose realizer returns a
GeometryNode, asource: { data }node's terrain (UVs overits extent, as the aerial image has), and a
type: streamnode. A group warns.material: { uv }orients it.
planeprimitives now carry UVs (they had none, so any texture on one showed asingle texel).
written and resolved against the document's prefix. The node keeps looking every frame until the
source is live, so the producer may start after the scene, and again after the stream closes.
Rasters (
cvc/ariadne/stream/raster.h)Frames. Codec
rgba8.patch: the frame number, the rectangles that changed, and their pixels.A key frame (the whole raster) goes out on the first publish, every
key_everyframes (30), andon the first publish after a subscriber joins. Frames are self-describing, so they cross any
transport unchanged.
The consumer (
raster_canvas,LiveTextureBinding). The texture aliases a canvas the framesdraw into:
GeometryNode::texture_modified_rect,glTexSubImage2D);A raw stream (a camera's
rgba8) still shows each frame whole.State. Each raster keeps its frames in state at its token:
.w,.h,.codec, the last keyframe, a ring of the last 8 frames, and
.frame, written last. So a consumer that subscribes latecatches up.
mirror:names a second path.The producer (
raster_stream):fill,paint(image),paint_grid(values, …, colormap, lo, hi, alpha)(mesh_ops' colour maps; NaN is transparent), orpixels()thenmark(). Thenpublish()/publish_key().raster_stream::open(app, {id, root_path, w, h, key_every, mirror}).pycvc.raster_open(app, id, w, h[, key_every, mirror])returns aRasterStream, whosepixels()is a writable view. The hosts havehost.open_raster(...).raster-open,raster-fill,raster-grid,raster-publish,raster-key,raster-close. A document owns its rasters as it owns its streams.Across a relay. A server document mirrors its raster into a namespace it publishes
(
server: publish: [fog]). The relay sends the frames there, and a client that subscribes(
relay: { subscribe: [fog] }) names the mirror.raster_followerturns the mirror into a local stream. It keeps a canvas of itsown, so each new subscriber gets a key frame of the picture as it is.
transports' 64 MiB cap). Bandwidth is the real limit: the WebSocket relay skips a client whose
send queue passes 2 MiB until it drains, then its periodic broadcast re-sends the mirror's
current values, from which the follower catches up. The docs say to size the raster and
key_everyto the slowest link.Stock hosts
AriRuntime, so arigl, arigl-web, ariglx and pycvc_gl's Host (not only withstreaming=True),now registers the stream and raster verbs and
type: stream.arisrvregisters the stream and raster verbs for its server document.Tests
stream_raster_test(new, 6 tests):ServerDocumentwithserver: publish: [fog]paints a raster eachroom step; an inproc transport replicates it to a second app; the client's follower stream
draws it there pixel for pixel.
cvcgl_live_texture(new, offscreen):gl_upload_counter):glTexImage2D;glTexSubImage2Dand noglTexImage2D;type: streamnode on a raster;AriRuntime's default registrations.test_pycvc_raster.py(new, registered aspycvc_raster).Locally (Linux, Release, pycvc built), these pass:
cvcgl_stream_node,cvcgl_stream_texture,cvcgl_stream_bind,cvcgl_stream_view,stream_test,stream_to_image_test;ariadne_*gtests;gRPC-only relay tests did not run here (gRPC is off in this build), so arisrv's two-line change is
compile-checked by CI only.
With #1230 (scene
repeat:). The two merge with each other cleanly. The oneline that lets a copy's
{i}reach its stream name is in its own follow-up PR, to merge after both(see that PR).
Docs: docs/ARIADNE.md §5.4 ("Live textures", "Producing a raster", "Across a relay"), §9.7
("Rasters") and the Python host table.