Repository navigation
Gallery: a fleet swarm over a small world (terrain or blocks), in place of the old nav demos - #1547
Merged
Merged
Conversation
The gallery's nav city demos (nav_city_swarm, nav_city_drive) are slow in a
browser: 800 agents and downtown Austin, downloaded, on one thread. Their
Ariadne ports run in the gallery's arigl but have no card.
nav_fleet_swarm.ari is one fleet of the world's vehicles (docs/ARIADNE.md,
"Fleets"): 240 on nav's kinematic bicycle, in six colour-coded rally teams,
over a city the document builds itself. That city is 6 x 6 blocks of 26 m
with 12 m streets and four plazas, 240 m across, small enough to see the
whole swarm from overhead, and nothing is downloaded. Every 15 s of world
time each team's rally point swaps across a ring of six street crossings,
so the teams cross the middle through each other and back.
The fleet is drawn at scale (FL2): one mesh, the nearest few vehicles their
own nodes. The camera starts overhead (H), and Chase follows a vehicle. The
panel has the frame rate (quality.frame_ms), the world's speed, the policy
(the published trained CoefMLP, downloaded; the built-in net until it
arrives) and sense (known or fog). Shadows are off.
Gallery (examples/web/demos.json): the card nav_fleet_swarm_ari ("fleet
swarm") takes the old two's place. nav_city_swarm and nav_city_drive get
card: false, so their pages still answer but are off the index and the Demos
menus, native ones included. Thumbnail
gallery-assets/img/nav_fleet_swarm_ari.jpg.
Measured natively with arigl, the world on the frame's thread as a browser
without threads steps it: the paused frame is this laptop's floor (9.4 ms,
with one vehicle or none of the city). The world adds about 3 ms at 1x and
5 ms at the default 2x, and drawing the 240 costs next to nothing. A browser
build was not run here: the page's fps will say.
transfix
enabled auto-merge (squash)
November 26, 2026 08:28
transfix
disabled auto-merge
November 26, 2026 08:30
…team colours, colliding fleets Three changes the fleet demo needed. A flat world's grid has what stands on it. A world of several nodes took its grid from its first node alone: for a flat ground, an open walled square, so a city of boxes on it was 3% blocked (the wall) and its vehicles planned straight through the buildings. SceneWorld::grid_of_world_on (what ground_of_world_on and scene.world.grid both use) now blocks each sample under the world's other static nodes whose tops stand 0.5 m or more over the ground (a kerb is driven over, a moving body blocks nothing). Static nodes' height ranges are kept beside their footprints. The grid is cached while its ground's is the same, since a new grid lays a fleet out again. Generated, data and terrain worlds are unchanged. texture: false on a vehicle look draws a model, one-piece or parted, in the entity's colours instead of its texture: on its own nodes (attach_model, attach_parts) and in an entity layer's rungs. A fleet's teams then read at any distance. The catalog publishes look.texture and the preview reads it. collide: true on a fleet keeps its vehicles from passing through each other on nav's own (kinematic) plant, which never collided. It uses nav's hard de-overlap (min_gap), at nine tenths of the vehicle's length; vehicles.fleets.<f>.collide switches it live (set_live_knobs). Two additions to nav's sim_world::config, both off by default so existing runs are unchanged: - min_gap_parked: agents at rest (arrived, parked) are pushed apart too, so a team at its rally point spreads out instead of stacking; - min_gap_ahead: the gap is measured between points this far ahead along each heading. A vehicle's position is its rear axle, and with the gap measured there two vehicles facing each other kept their middles 2 m apart. A Jolt plant's vehicles collide as bodies; on one thread a 40-vehicle Jolt team took about 10x the frame of the kinematic fleet, so collide is the cheap way. Tests: AriadneSceneWorld.WhatStandsOnAFlatGroundBlocksItsGrid, AriadneWorldVehicles.ACollidingFleetsVehiclesStayApart (24 Humvees at one rally point: overlapping without, at least 0.9 lengths apart with it, switched live), AriadneWorldVehicles.LooksComeFromADataPackage (texture: false). The scene world (149), loader (269), nav potential and binding, and cvcGL entities suites pass. Docs: ARIADNE.md (worlds' grids, looks, fleets).
…adows, collisions - Two worlds, World on the panel switching them (the fleet is laid out again on the new one): the terrain lab's world, small (300 m; relief, trees, rocks and a roads-first city generated in the page), the default; and the city of blocks. The terrain's water level sits just under its relief: green ground, no lakes. - The vehicles are the vehicle-humvee package's Humvee (cvcpkg.org; a box until it arrives), texture: false, so each is in its team's colour close up as well. - collide: true: they keep from driving through each other; where teams cross they queue. A collide checkbox switches it, and Plant still puts the fleet, or one team, on Jolt. - Shadows, the terrain lab's: the map follows the camera; the world bakes once and the moving fleet each frame. A checkbox turns them off. - An entity_layer whose finer rungs need a Humvee 45 px across or more: from above every copy is the coarsest (with the default thresholds the model's finer rungs cost 44 ms a frame on the block city, against 17 with these). - requires gl.scene.shaders (optional) for the terrain's bump preset, and customs generated_world (required) and entity_layer. - The gallery's text and thumbnail follow. Native frame times on this laptop with the world on the frame's thread (busy: 30-60% CPU from other programs, so +-20%): the terrain world about 32 ms, the block city about 18 ms. The browser's will show on the page's fps.
…m runs at 1x CI's singleton scan flagged the function-local static cvc::image in attach_parts (bss and its guard): process-wide state, which libcvc does not keep. It is a local now. The fleet demo's world speed defaults to 1x (it was 2x): the clock block and the --speed argument.
Where each team is headed: a translucent pillar and a ball in its colour (the fleet's hsv(t / 6, 0.74, 0.98)), 50 m tall so it stands clear of the hills, moved onto its rally point from vehicles.fleets.swarm.rally.<t>.x and .y every ten frames. The panel's targets box hides them.
vehicles.fleets.<f>.size starts at the fleet's count. Writing it adds vehicles after its last, or takes its last ones off, to match (1 to 256, the start entry's limit), and the fleet is laid out again from its seed. The key then says what the fleet holds: a size out of range is held to the range, and text that is not a number changes nothing. The scene's physics world (SceneWorld::build) gets Jolt's own workers inside each step, as the swarm's plant host already has them: up to three natively, two in a browser built with threads, none without. Jolt runs its vehicles' wheel and suspension updates (step listeners, eight to a job), its collisions and its islands on them. A run is the same on any number of workers (PhysicsJolt.OneThreadAndSeveralGiveTheSameHash checks it); a fleet of 40 Jolt Humvees gave the same speeds, step by step, on none and on three. Measured on this laptop (a Jolt fleet on the terrain world, the physics step's mean over 4 s windows, interleaved runs, the box busy with other programs): Jolt vehicles 0 workers 3 workers 40 3.0 ms 1.8 ms 80 6.1 ms 2.8 ms 120 12.4 ms 5.0 ms The threaded browser links get two more pre-spawned workers for them (arigl and cyprty 4 -> 6, ariglx 8 -> 10): a new worker can't load while the page's main thread waits. A step can't hang on one that hasn't started, though: Jolt's barrier runs its own jobs on the waiting thread. Test: AriadneWorldVehicles.AFleetsSizeKeyAddsAndTakesOffVehicles. The scene world (150), loader (269) and physics world (47) suites pass. Docs: ARIADNE.md (the size key; the physics world's workers), ARIADNE_SCRIPTING_HOSTS.md (the ariglx pool).
The panel's world is three buttons in a row: terrain and blocks switch the world (the one on is greyed out), New terrain generates the terrain world from a new seed (world.request randomize), with the world's status under them. Vehicles (1 to 256, written on release) sets how many the fleet has, through its size key, and the fleet is laid out again. The default stays 240 on nav's kinematic plant. On Jolt, most of a fleet stops within seconds (on the flat block city 25 of 40 are at 0 m/s after 4 s, with either policy, collide on or off), and on the terrain they roll over one by one and stay there, so a Jolt default would show a stalled swarm. The bench line also prints the physics step.
This was referenced Nov 26, 2026
The car archetype's look is vehicle-humvee 1.0.0+cvc.5's parted Humvee (cy-pca/graphics-assets#21): a chassis, a wheel and the rig that places four of them. The vehicles near the camera (the entity layer's promoted nodes) roll their wheels and steer the front pair; the rest are the layer's baked rungs, the wheels at rest (the same 8148 triangles as Humvee.glb, the coarsest rung 119). texture: false keeps each in its team's colour, the tyres dark. A parted look's wheels cast no shadow. Each turning wheel was a moving caster the shadow cache's moving-only bake redraws on its own, 64 more than the one-piece model's 30 for the promoted Humvees: 240 vehicles from above took 109 and 131 ms a frame against the one-piece look's 78 and 84 (snapshot, frames 300-1500 timed in the document, interleaved; with shadows off 76 against 69). With the wheels not casting, 68 and 79 against 69. The vehicle's shadow is its chassis's, under which the wheels stand. cvcgl_ariadne_wheeled_look checks it; ARIADNE.md ("A model in parts", Nodes) says so.
transfix
enabled auto-merge (squash)
November 26, 2026 23:50
transfix
added a commit
that referenced
this pull request
Nov 27, 2026
…, nav_fog_ghost, nav_finale) The rendered cvc::nav demos are Ariadne documents and hosts now: nav_city_swarm.ari and nav_city_drive.ari (the swarm and the drive as documents, faster than the programs were), nav_scrub, nav_convoy, world_lab.ari, and the fleet swarm (#1547) in the gallery. The four C++ programs that drew the swarm through cvcGL by hand go, with their nav_common and its test. Each loaded and fitted its vehicle model its own way (nav_common's load_vehicle_template), so none of them could draw the Humvee in parts (vehicle-humvee 1.0.0+cvc.5) with turning wheels; Ariadne's one vehicle look can. - examples/CMakeLists.txt: the four targets, nav_demo_common and nav_common_test gone. The wasm gallery builds nav_scrub as its only nav program; its bundle preload (the Austin scene and the shared Humvee) stays, and the trained-weights preload (CVC_WASM_NAV_WEIGHTS), which only the swarm and the drive read, goes. - The gallery (demos.json) and its thumbnails lose the three pages. deploy-pages, publish-cvcgl-wasm and publish-cvcpkg stop building, installing or expecting them; the gallery's WebGL-shim check reads nav_scrub.js in place of nav_city_drive.js; grl-snam-weights is no longer installed for the browser build (the documents fetch the policy themselves). - libcvc-examples ships the cvcGL scene demos, the three headless nav CLIs (nav_swarm_demo, nav_train_demo, nav_material_demo, which load no models and stay) and the documents; libcvc-examples-web drops grl-snam-weights. - NAV_DEMOS.md describes the documents and the CLIs; the docs and comments that pointed at the programs say they are retired.
…ity in their material
SceneWorld::build gave every physics world Jolt worker threads, and the null
backend refuses a world that asks for them: a scene with `physics: { backend:
null }` got no world, only a warning (cvcgl_ariadne_physics,
test_null_backend_places_and_holds). Now only a Jolt world gets them.
nav_fleet_swarm's beacon pillars had `opacity: 0.5` as a node key, which no
node takes (AriSchema.EveryShippedDocumentIsValid, ari_validate_examples): it
goes in the material, so the pillars are see-through now as meant.
transfix
disabled auto-merge
November 27, 2026 07:22
transfix
enabled auto-merge (squash)
November 27, 2026 07:22
transfix
added a commit
that referenced
this pull request
Nov 27, 2026
…, nav_fog_ghost, nav_finale) The rendered cvc::nav demos are Ariadne documents and hosts now: nav_city_swarm.ari and nav_city_drive.ari (the swarm and the drive as documents, faster than the programs were), nav_scrub, nav_convoy, world_lab.ari, and the fleet swarm (#1547) in the gallery. The four C++ programs that drew the swarm through cvcGL by hand go, with their nav_common and its test. Each loaded and fitted its vehicle model its own way (nav_common's load_vehicle_template), so none of them could draw the Humvee in parts (vehicle-humvee 1.0.0+cvc.5) with turning wheels; Ariadne's one vehicle look can. - examples/CMakeLists.txt: the four targets, nav_demo_common and nav_common_test gone. The wasm gallery builds nav_scrub as its only nav program; its bundle preload (the Austin scene and the shared Humvee) stays, and the trained-weights preload (CVC_WASM_NAV_WEIGHTS), which only the swarm and the drive read, goes. - The gallery (demos.json) and its thumbnails lose the three pages. deploy-pages, publish-cvcgl-wasm and publish-cvcpkg stop building, installing or expecting them; the gallery's WebGL-shim check reads nav_scrub.js in place of nav_city_drive.js; grl-snam-weights is no longer installed for the browser build (the documents fetch the policy themselves). - libcvc-examples ships the cvcGL scene demos, the three headless nav CLIs (nav_swarm_demo, nav_train_demo, nav_material_demo, which load no models and stay) and the documents; libcvc-examples-web drops grl-snam-weights. - NAV_DEMOS.md describes the documents and the CLIs; the docs and comments that pointed at the programs say they are retired.
One conflict, in inc/cvc/ariadne/world_rules.h's vehicle_look: this branch's `texture` flag beside #1569's new comment on the parted-look fields (the default Humvee in parts keeps a one-piece path). Both kept.
transfix
disabled auto-merge
November 27, 2026 09:11
transfix
enabled auto-merge (squash)
November 27, 2026 09:11
transfix
added a commit
that referenced
this pull request
Nov 27, 2026
…, nav_fog_ghost, nav_finale) The rendered cvc::nav demos are Ariadne documents and hosts now: nav_city_swarm.ari and nav_city_drive.ari (the swarm and the drive as documents, faster than the programs were), nav_scrub, nav_convoy, world_lab.ari, and the fleet swarm (#1547) in the gallery. The four C++ programs that drew the swarm through cvcGL by hand go, with their nav_common and its test. Each loaded and fitted its vehicle model its own way (nav_common's load_vehicle_template), so none of them could draw the Humvee in parts (vehicle-humvee 1.0.0+cvc.5) with turning wheels; Ariadne's one vehicle look can. - examples/CMakeLists.txt: the four targets, nav_demo_common and nav_common_test gone. The wasm gallery builds nav_scrub as its only nav program; its bundle preload (the Austin scene and the shared Humvee) stays, and the trained-weights preload (CVC_WASM_NAV_WEIGHTS), which only the swarm and the drive read, goes. - The gallery (demos.json) and its thumbnails lose the three pages. deploy-pages, publish-cvcgl-wasm and publish-cvcpkg stop building, installing or expecting them; the gallery's WebGL-shim check reads nav_scrub.js in place of nav_city_drive.js; grl-snam-weights is no longer installed for the browser build (the documents fetch the policy themselves). - libcvc-examples ships the cvcGL scene demos, the three headless nav CLIs (nav_swarm_demo, nav_train_demo, nav_material_demo, which load no models and stay) and the documents; libcvc-examples-web drops grl-snam-weights. - NAV_DEMOS.md describes the documents and the CLIs; the docs and comments that pointed at the programs say they are retired.
transfix
added a commit
that referenced
this pull request
Nov 27, 2026
#1547 put nav_fleet_swarm.ari in the gallery in place of the old nav demos, and the retired programs' addresses now open it, so the rendered demos' table lists it first.
transfix
added a commit
that referenced
this pull request
Nov 27, 2026
…, nav_fog_ghost, nav_finale) (#1568) The rendered cvc::nav demos are Ariadne documents and hosts now: nav_city_swarm.ari and nav_city_drive.ari (the swarm and the drive as documents, faster than the programs were), nav_scrub, nav_convoy, world_lab.ari, and the fleet swarm (#1547) in the gallery. The four C++ programs that drew the swarm through cvcGL by hand go, with their nav_common and its test. Each loaded and fitted its vehicle model its own way (nav_common's load_vehicle_template), so none of them could draw the Humvee in parts (vehicle-humvee 1.0.0+cvc.5) with turning wheels; Ariadne's one vehicle look can. - examples/CMakeLists.txt: the four targets, nav_demo_common and nav_common_test gone. The wasm gallery builds nav_scrub as its only nav program; its bundle preload (the Austin scene and the shared Humvee) stays, and the trained-weights preload (CVC_WASM_NAV_WEIGHTS), which only the swarm and the drive read, goes. - The gallery (demos.json) and its thumbnails lose the three pages. deploy-pages, publish-cvcgl-wasm and publish-cvcpkg stop building, installing or expecting them; the gallery's WebGL-shim check reads nav_scrub.js in place of nav_city_drive.js; grl-snam-weights is no longer installed for the browser build (the documents fetch the policy themselves). - libcvc-examples ships the cvcGL scene demos, the three headless nav CLIs (nav_swarm_demo, nav_train_demo, nav_material_demo, which load no models and stay) and the documents; libcvc-examples-web drops grl-snam-weights. - NAV_DEMOS.md describes the documents and the CLIs; the docs and comments that pointed at the programs say they are retired. The documents' headers and vehicle_view.cpp's fitted_model comment no longer name the deleted programs or nav_common's load_vehicle_template. After #1547, the old nav_city_swarm and nav_city_drive gallery addresses redirect to the fleet swarm (nav_fleet_swarm_ari), and NAV_DEMOS.md lists it; the old nav_fog_ghost address is left to the Ariadne fog ghost (#1589).
This was referenced Nov 28, 2026
This was referenced Nov 30, 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 new gallery demo, nav_fleet_swarm.ari: 240 Humvees in six teams swarm a small world seen from above, in place of the old nav city cards (nav_city_swarm and nav_city_drive keep their pages, off the index).
Gallery: a fleet swarm over a small city, in place of the old nav demos
The gallery's nav city demos (nav_city_swarm, nav_city_drive) are slow in a
browser: 800 agents and downtown Austin, downloaded, on one thread. Their
Ariadne ports run in the gallery's arigl but have no card.
nav_fleet_swarm.ari is one fleet of the world's vehicles (docs/ARIADNE.md,
"Fleets"): 240 on nav's kinematic bicycle, in six colour-coded rally teams,
over a city the document builds itself. That city is 6 x 6 blocks of 26 m
with 12 m streets and four plazas, 240 m across, small enough to see the
whole swarm from overhead, and nothing is downloaded. Every 15 s of world
time each team's rally point swaps across a ring of six street crossings,
so the teams cross the middle through each other and back.
The fleet is drawn at scale (FL2): one mesh, the nearest few vehicles their
own nodes. The camera starts overhead (H), and Chase follows a vehicle. The
panel has the frame rate (quality.frame_ms), the world's speed, the policy
(the published trained CoefMLP, downloaded; the built-in net until it
arrives) and sense (known or fog). Shadows are off.
Gallery (examples/web/demos.json): the card nav_fleet_swarm_ari ("fleet
swarm") takes the old two's place. nav_city_swarm and nav_city_drive get
card: false, so their pages still answer but are off the index and the Demos
menus, native ones included. Thumbnail
gallery-assets/img/nav_fleet_swarm_ari.jpg.
Measured natively with arigl, the world on the frame's thread as a browser
without threads steps it: the paused frame is this laptop's floor (9.4 ms,
with one vehicle or none of the city). The world adds about 3 ms at 1x and
5 ms at the default 2x, and drawing the 240 costs next to nothing. A browser
build was not run here: the page's fps will say.
Worlds and fleets: a flat world's buildings block its grid, looks in team colours, colliding fleets
Three changes the fleet demo needed.
A flat world's grid has what stands on it. A world of several nodes took its grid
from its first node alone: for a flat ground, an open walled square, so a city of
boxes on it was 3% blocked (the wall) and its vehicles planned straight through
the buildings. SceneWorld::grid_of_world_on (what ground_of_world_on and
scene.world.grid both use) now blocks each sample under the world's other static
nodes whose tops stand 0.5 m or more over the ground (a kerb is driven over, a
moving body blocks nothing). Static nodes' height ranges are kept beside their
footprints. The grid is cached while its ground's is the same, since a new grid
lays a fleet out again. Generated, data and terrain worlds are unchanged.
texture: false on a vehicle look draws a model, one-piece or parted, in the
entity's colours instead of its texture: on its own nodes (attach_model,
attach_parts) and in an entity layer's rungs. A fleet's teams then read at any
distance. The catalog publishes look.texture and the preview reads it.
collide: true on a fleet keeps its vehicles from passing through each other on
nav's own (kinematic) plant, which never collided. It uses nav's hard de-overlap
(min_gap), at nine tenths of the vehicle's length; vehicles.fleets..collide
switches it live (set_live_knobs). Two additions to nav's sim_world::config, both
off by default so existing runs are unchanged:
at its rally point spreads out instead of stacking;
heading. A vehicle's position is its rear axle, and with the gap measured there
two vehicles facing each other kept their middles 2 m apart.
A Jolt plant's vehicles collide as bodies; on one thread a 40-vehicle Jolt team
took about 10x the frame of the kinematic fleet, so collide is the cheap way.
Tests: AriadneSceneWorld.WhatStandsOnAFlatGroundBlocksItsGrid,
AriadneWorldVehicles.ACollidingFleetsVehiclesStayApart (24 Humvees at one rally
point: overlapping without, at least 0.9 lengths apart with it, switched live),
AriadneWorldVehicles.LooksComeFromADataPackage (texture: false). The scene world
(149), loader (269), nav potential and binding, and cvcGL entities suites pass.
Docs: ARIADNE.md (worlds' grids, looks, fleets).
nav_fleet_swarm: a small terrain lab world, team-coloured Humvees, shadows, collisions
the new one): the terrain lab's world, small (300 m; relief, trees, rocks and a
roads-first city generated in the page), the default; and the city of blocks.
The terrain's water level sits just under its relief: green ground, no lakes.
arrives), texture: false, so each is in its team's colour close up as well.
they queue. A collide checkbox switches it, and Plant still puts the fleet, or
one team, on Jolt.
and the moving fleet each frame. A checkbox turns them off.
above every copy is the coarsest (with the default thresholds the model's finer
rungs cost 44 ms a frame on the block city, against 17 with these).
generated_world (required) and entity_layer.
Native frame times on this laptop with the world on the frame's thread (busy:
30-60% CPU from other programs, so +-20%): the terrain world about 32 ms, the
block city about 18 ms. The browser's will show on the page's fps.
Vehicles, a new terrain, and Jolt's workers
Vehicles (1 to 256) sets the fleet's size through a new live key,
vehicles.fleets.<f>.size.Vehicles are added after the last or the last ones taken off, and the fleet is laid out again.
Test:
AriadneWorldVehicles.AFleetsSizeKeyAddsAndTakesOffVehicles.The world is three buttons: terrain, blocks, and New terrain (the terrain world generated
from a new seed). The world's status shows under them.
The scene's Jolt world steps on Jolt's own worker threads: up to 3 natively, 2 in a threaded
browser, none without. Jolt is deterministic across thread counts, and a 40-vehicle fleet gave
identical speeds on 0 and 3. The threaded browser links get two more pre-spawned workers
(arigl/cyprty 4 -> 6, ariglx 8 -> 10). The physics step for a Jolt fleet on the terrain:
wasm-mt is built and reasoned through, but not run in a threaded browser yet.
The default stays 240 kinematic. A fleet on Jolt mostly stalls, and that predates this PR.
On the flat block city 25 of 40 are at 0 m/s after 4 s, with either policy and collide on or
off. On the terrain they roll over one by one and stay there. The Jolt chassis is a 0.9 m body
box, not the model, so a flipped Humvee's roof sinks into the ground. That is follow-up work.
The parted Humvee
so the vehicles near the camera roll their wheels and steer the front pair. The baked rungs are
the same size as Humvee.glb's.
its own. 240 vehicles from above went from 78-84 ms a frame to 109-131 ms (snapshot, timed in
the document). With non-casting wheels it's back to 68-79 against 69. Checked in
cvcgl_ariadne_wheeled_look; documented in ARIADNE.md.