Repository navigation
Ariadne: vehicle, boat and crate models from a document's data: package (cvcpkg) - #1369
Merged
Merged
Conversation
…ackage
A vehicle archetype's look and a boat node's model can name a file in a document data: entry's
package, so the web gallery fetches the models from cvcpkg at run time, not bundled with the
demos:
data:
tactical_boat: { uri: cvcpkg://cy-pca/vehicle-tactical-boat,
path: share/cvc-scenes/shared, load: lazy }
... look: { data: humvee, file: Humvee.glb }
... model: { data: tactical_boat, file: TacticalBoat.glb }
- scene.h: SceneData, the document's data: entries as the scene's looks name them; the loader
fills Scene::data (and each scenes: entry's), relative sources made absolute.
- world_rules: a look's data: key (with file:, fitted unless fit: false); resolve_vehicle_looks
copies the entry's uri and path: into the look (vehicle_look::uri, subpath), so it is whole
without the document; the catalog publishes look.uri and look.subpath.
- vehicle_view: vehicle_model_state(app, cache, look, length) says whether a look's model is
ready, pending (its package loading, started on the first ask) or failed; a failed package
stays failed, and a local install of the file is used when the package does not load. World
vehicles are drawn as boxes until their package has loaded, then drawn again with it; the
vehicle preview likewise.
- boat_node: model: { data, file }; the boat shows its hull until the model is ready, then the
model goes in in its place.
- terrain_lab's launch and world_lab's Humvee use the vehicle-tactical-boat and vehicle-humvee
packages; the gallery's arigl may reach https://cvcpkg.org (demos.json --net-allow).
- Tests: AriadneWorldVehicles.LooksComeFromADataPackage; cvcgl_ariadne_physics
test_boat_model_from_data (hull while loading, the model swapped in, a missing package keeps
the hull and reports failed).
…wooden crate
A geometry node's `model:` draws a model in place of its own geometry, fitted into the box that
geometry spans: stood upright (a .glb/.gltf file's +Y up turned to +Z) and scaled on each axis to
fill it, its base colour texture untinted. The node's body keeps its own shape: the model goes in
from a scene tick, after realize_physics has made the bodies, so a crate floats as its box and is
drawn as the crate. `model:` is `{ data: NAME, file: FILE }` (a document data: entry's package,
loaded when the scene is realized; its own geometry until then, kept if it cannot load), a file,
or an installed model's name.
- vehicle_view: node_model_look (the boat's model: parsing, now shared), boxed_model_state and
set_boxed_model; the fitted-model cache takes a fit (a vehicle's length or a box).
- scene_realize: draw_node_model for `type: geometry` nodes.
- boat_node: boat_look uses node_model_look.
- terrain_lab: data: crate (cvcpkg://cy-pca/prop-wooden-crate, published from
cy-pca/graphics-assets#20) and model: { data: crate, file: WoodenCrate.glb } on its three crates.
- docs/ARIADNE.md: "Drawn as a model" under the bodies.
- Test: cvcgl_ariadne_physics test_node_model_from_data (a box at realize even with the model
ready, a body each, the model fitted to the box from a package and from a file, a missing data:
entry keeps the box).
transfix
enabled auto-merge (squash)
November 19, 2026 21:57
The CI runner's temp directory comes as a short name (C:\Users\RUNNER~1\...), which the loader resolves to the long one, so the plain path compare failed.
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.
The web gallery now fetches its vehicle, boat and crate models from cvcpkg.org at run time instead of bundling them with the demos. This replaces #1357's preload, which was reverted in #1361.
Models from a document's
data:packageA document declares the package once, then names a file in it:
Core (ariadne):
SceneDataandScene::data: the document'sdata:entries, filled by the loader, with relative sources made absolute.data:key needsfile:and is fitted unlessfit: false.resolve_vehicle_lookscopies the entry'suriandpath:into the look (vehicle_look::uri,subpath). The look is then self-contained, so a client with no document (room_view, through room_entities) can draw it.look.uriandlook.subpath.cvcGL:
vehicle_model_state(app, cache, look, length): reports whether a look's model is ready, pending or failed.DataStore::loadrestarts a load in error, so polling with it would have re-fetched the package every frame.model: { data, file }. It shows its hull while the package loads, and the model replaces the hull once ready.model:: draws a model in place of its own geometry, fitted into the box that geometry spans..glbor.gltffile's +Y up is turned to +Z, and each axis is scaled to fill the box.realize_physics, so the node's body keeps its own shape: terrain_lab's crates float as their boxes and are drawn as the crate.node_model_look,boxed_model_stateandset_boxed_model. The boat'smodel:parsing now goes throughnode_model_look.Documents and the gallery:
prop-wooden-crate: 8,692 triangles and a 2K base colour, published from cy-pca/graphics-assets#20 as 1.0.0+cvc.1.vehicle-humvee.--net-allow https://cvcpkg.org(demos.json).Not done here
Access-Control-Allow-Originfor public reads. That server change is being handled separately. Until then the gallery draws the boxes and the hull, so it doesn't break.look.uriandlook.subpaththrough room_entities is for the local-worlds work, which will callvehicle_model_state.Tests
On Windows MSVC Release, on the merged tree (14a340a).
ariadne_scene_world_testAriadneWorldVehicles.LooksComeFromADataPackage: parsing, resolution, an unknown entry,data:needingfile:, and relative sources made absolute.cvcgl_ariadne_physicstest_boat_model_from_data: the hull while loading, the model swapped in, and a missing package keeping the hull and reporting failed.cvcgl_ariadne_physicstest_node_model_from_data: a box at realize even with the model ready, a body each, the model fitted to the box from a package and from a file, and a missingdata:entry keeping the box.ariadne_loader_testandcvcgl_ariadne_realizepass.--net-allow https://cvcpkg.organd no local installs. They downloaded both packages, with archive sha256 matching the registry, and drew the launch as TacticalBoat and crate_b as the wooden crate.