Repository navigation
Ariadne: the Humvee in parts by default, its wheels turning; one Humvee loader - #1569
Merged
Merged
Conversation
vehicle-humvee 1.0.0+cvc.5 ships its Humvee in parts beside Humvee.glb: share/cvc-scenes/shared/humvee/chassis.glb, wheel.glb and rig.json (cy-pca/graphics-assets#21). A world vehicle's look now draws those where it used to draw the one-piece model, so its wheels roll and its front pair steers (the parted look, #1471). - resolve_vehicle_looks: a humvee with no look:, or `model: humvee` with no scale:, yaw:, z: or fit: false, is a parted file look when all three parts are installed in one directory. If they are not, it is Humvee.glb, then the box, as before. A look that names a file (`file:`, or `data:` with `file:`) does not change. - The parted look keeps Humvee.glb in its path. A relay sends an entity's look as its kind and file only (room_entities), so a room's clients still draw the one piece and not the box. - world_lab.ari: its Humvee is { data: humvee, chassis: humvee/chassis.glb, wheel: humvee/wheel.glb, rig: humvee/rig.json }. - docs/ARIADNE.md ("Looks", "A model in parts") and ARIADNE_WORLDS.md describe the new default. - Tests: AriadneWorldVehicles.TheHumveeIsInPartsWhereTheyAreInstalled (core), and test_default_humvee in cvcgl_ariadne_wheeled_look. With the parts installed in a fixture prefix (.glb files), a `vehicle: humvee` archetype with no look draws vehicle_1_chassis and four wheels, and so does its vehicle_preview. Without them it draws the one-piece model, and with neither, the box.
The swarm layer, nav_scrub and pycvc_gl's VehicleModel each had their
own Humvee search and fit. They now use the shared code, so they get
the Humvee in parts too.
- vehicle_look_named(name) (world_vehicles.h) resolves a look by name
the way resolve_vehicle_looks resolves a world vehicle's. `humvee` is
the default look: the parts, else Humvee.glb, else the box. A file
that exists is that file, fitted. Any other name is `model: NAME`.
- swarm_nodes: read_vehicle, vehicle_template (a copy of
fit_vehicle_geometry) and its own path search are gone. This
includes the ../shared guesses beside a city bundle. An agents
layer's look is vehicle_look_named(look), and its template comes
from vehicle_look_mesh_of, as an entity layer's does. With the parts
installed, its wheels are baked in at rest in a tyre's dark. The
glyphs keep a point's own colour (role 2) when they build and
recolour.
- mesh_lod: decimate_mesh_by_role. This is entity_view's per-role
decimation, moved here so both layers share it. The swarm's LOD rungs
now use it, so the coarse rungs keep the tyres dark.
- nav_scrub: its runs take vehicle_look_named("humvee") instead of
picking Humvee.glb (the bundle's copy, else find_vehicle_model). A
parted look is attached with attach_parted_model. Its wheels are
posed each frame by parted_wheel_poses: rolled by the distance driven
to the play head (the logged speed, summed, interpolated between
ticks) over the wheel radius, and the front pair turned by the logged
tel.steer.
- pycvc_gl: fit_vehicle_geometry is bound, and VehicleModel fits with
it in place of its numpy copy of the same fit.
- `model: humvee, fit: false` gets the parts too. A model look is
always made fitted, so `fit: false` never applied to it. Only
scale:, yaw: and z: keep the one piece.
- Tests: AriadneWorldVehicles.TheHumveeIsInPartsWhereTheyAreInstalled
checks vehicle_look_named. cvcgl_ariadne_swarm's new humvee section
installs a fixture of .glb parts and checks that `look: humvee` draws
tyre-dark wheel points on the finest rung and the coarsest.
transfix
enabled auto-merge (squash)
November 27, 2026 06:31
transfix
added a commit
that referenced
this pull request
Nov 27, 2026
master's #1569 moved entity_view's per-role decimation into mesh_lod's decimate_mesh_by_role. This branch's fallback (a role that collapses at a rung keeps its coarsest decimation so far, not its whole mesh) now lives there, as an optional role_decimations cache that a ladder of rungs passes from finer to coarser. make_rungs passes it; swarm_nodes does not, so the swarm view is unchanged.
transfix
added a commit
that referenced
this pull request
Nov 27, 2026
nav_city_swarm.ari and nav_city_drive.ari named themselves ports of examples/nav/*.cpp files this change deletes, and vehicle_view.cpp's fitted_model comment named nav_common's load_vehicle_template. Each now says the program is retired; the comment names fit_vehicle_geometry, which pycvc_gl's VehicleModel calls since #1569.
transfix
added a commit
that referenced
this pull request
Nov 27, 2026
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
added a commit
that referenced
this pull request
Nov 27, 2026
nav_city_swarm.ari and nav_city_drive.ari named themselves ports of examples/nav/*.cpp files this change deletes, and vehicle_view.cpp's fitted_model comment named nav_common's load_vehicle_template. Each now says the program is retired; the comment names fit_vehicle_geometry, which pycvc_gl's VehicleModel calls since #1569.
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.
vehicle-humvee 1.0.0+cvc.5 (cy-pca/graphics-assets#21) ships its Humvee in parts beside
Humvee.glb:share/cvc-scenes/shared/humvee/chassis.glb,humvee/wheel.glbandhumvee/rig.json. The parted look (#1471, in 4.0.6+) already draws those parts with rolling, steering wheels. But nothing used them: every Ariadne Humvee drew the one-piece model, whose wheels never move.This PR makes the parts the default. It also removes the copies of the Humvee loading code, so every Ariadne Humvee loads the same way.
The default look (commit 1)
resolve_vehicle_looks(world_vehicles.cpp) prefers the parts for:look:;look: { model: humvee }with noscale:,yaw:orz:. A parted look ignores those keys, so a placed model stays the one piece. A model look is always fitted, sofit: falsenever applied.It looks up
find_vehicle_model("humvee/chassis.glb")and needswheel.glbandrig.jsonin the same directory. If they are not all there, the look isHumvee.glb, then the box, as before.A look that names a file is unchanged:
file:, ordata:withfile:.Relays. The parted look also keeps
Humvee.glbinvehicle_look::path. A relay sends an entity's look as its kind and file only (room_entities), so a room's clients still draw the one piece, not the box. Sending the parts over the relay would be a follow-up.world_lab.ari: its Humvee is nowlook: { data: humvee, chassis: humvee/chassis.glb, wheel: humvee/wheel.glb, rig: humvee/rig.json }.Docs:
docs/ARIADNE.md("Looks", and a new "The Humvee in parts" item under "A model in parts") andARIADNE_WORLDS.md's looks line.One loader (commit 2)
vehicle_look_named(name)(world_vehicles.h) resolves a look by name the wayresolve_vehicle_looksresolves a world vehicle's:humveeis the default look;model: NAME.swarm_nodes.cpp; used bynav_city_swarm.ariandnav_city_drive.ari):read_vehicle,vehicle_template(a copy offit_vehicle_geometry) and its ownHumvee.glbsearch, including the../sharedguesses beside a city bundle.vehicle_look_named(look), and its template comes fromvehicle_look_mesh_of, as an entity layer's does. With the parts installed, its wheels are baked in at rest, in a tyre's dark.mesh_lod, through the newdecimate_mesh_by_role.decimate_mesh_by_role(mesh_lod.h) is entity_view's per-role decimation, moved there so both layers share it. Coarse rungs keep their tyres dark.vehicle_look_named("humvee")instead of pickingHumvee.glb(the bundle's copy, elsefind_vehicle_model).attach_parted_model.parted_wheel_posesposes the wheels. They roll by the distance driven to the play head (the loggedspeed, summed and interpolated between ticks) over the wheel radius. The front pair turns by the loggedtel.steer.--bundle DIR's own copy ofHumvee.glbis no longer looked for.$CVC_NAV_BUNDLEand installed prefixes still are.fit_vehicle_geometryis bound (pycvc_gl.fit_vehicle_geometry), andVehicleModelfits with it in place of its numpy copy of the same fit.Not touched:
examples/nav(being retired separately);nav_fleet_swarm.ari(Gallery: a fleet swarm over a small world (terrain or blocks), in place of the old nav demos #1547).Tests
Run locally on Windows (MSVC, shared):
AriadneWorldVehicles.TheHumveeIsInPartsWhereTheyAreInstalled(core). In a fixture prefix:model: humveeresolve to the three parts, with the one piece kept inpath;yaw:,z:andfile: Humvee.glbkeep the one piece;vehicle_look_namedgives the same looks by name;rig.jsonthe look is the one piece, and with neither it is the box.All 36
AriadneWorldVehicles.*pass.cvcgl_ariadne_wheeled_looktest 5. A fixture prefix holds the fixture's meshes written as.glb. Avehicle: humveearchetype with no look:vehicle_1_chassisand four wheels, and itsvehicle_previewdraws the parts too;Humvee.glb, drawsvehicle_1_mesh;vehicle_1_body.131/131 checks pass.
cvcgl_ariadne_swarm, new "humvee" section.look: humveeover an installed parts fixture draws tyre-dark wheel points on its finest and its coarsest rung. 28/28 checks pass.cvcgl_ariadne_entities(64/64) andcvcgl_ariadne_physicspass after themake_rungsrefactor.The pycvc change is checked by CI only:
test_pycvc_gl_ariadne_host.py'svehiclescase runsVehicleModelon its fixture.Checked in arigl (this branch, vehicle-humvee cvc.5 on
CVC_PREFIX):look:draws the parts, and its front wheels turn with the steer.nav_city_swarm.ari --follow 3 --capture followdraws the Humvee in the swarm. Its far, team-coloured copies keep dark tyres.world_lab.ari's Vehicles preview draws the parted data look. With the network off, it uses the installed parts.Cost
From the previous session's bench (arigl 4.0.9, 240 kinematic vehicles, medians in ms per frame):
A promoted vehicle is 5 draws instead of 1. The fleet and swarm layers' instanced copies are one merged mesh either way.