Repository navigation
physics: an inertial fluid, so floating bodies drift in the wind and the current - #1318
Merged
Merged
Conversation
…in both seas (O13) - cvc::algo::wind_field: the scene's gusts as one deterministic function of (x, y, t): two scales of integer-hashed value noise carried downwind and ABYSSAL's pulse over time. cvc/gl/WindGLSL.h is the same in GLSL, no texture. Everything the wind moves (O14: the clouds, the trees, the air physics) can sample it at the same point and time. - cvc::ocean: fetch.h (the fetch map in one upwind sweep, coarse, capped by each body's extent; each cascade scaled by sqrt(F / F_full), F_full where its band is fully grown), sea_lag.h (the sea's wind follows with a time constant and steps by keyframes, at most one per crossfade), current.h (a divergence-free curl-noise current and a two-phase flow map). sea_surface takes a sea_forcing: the h0 crossfade, the fetch scales, the ripples' gust weight, the current. - Ariadne: scene_wind.h reads a node's wind in one place (O14 points it at wind.*). SceneWaterSeaClock steps the keyframes both seas use. New water keys: gustiness, lee, sea_lag, sea_fade, current (water_controls.ari, ARIADNE.md). - cvcGL: OceanWind (one RG32F texture of the two keyframes' fetch maps; the gusts and the current hashed per vertex). The water node and lsystem_coast draw the lee, the gusts (the ripples' weight, cat's paws in the shading), the current carrying the two short cascades, and mix the two keyframes' h0 on the CPU only while a crossfade runs. - Tests: ocean_wind_test (fetch behind an island and on a lake, the lag and its debounce, a continuous crossfade, golden hashes of the fetch map, the gusts and the current, a divergence-free current, the physics sea's lee and current), a floating crate in the lee against one in the open (ariadne_scene_world_test), the water node's new keys (cvcgl_ariadne_realize). No golden hash moved: a sea_surface without a forcing has the same digest and values as before.
… its push on bodies (O14) A document's scene: wind: seeds wind.speed, wind.dir and wind.gustiness. While wind.speed is set, the water (both seas), cloud_sky's drift and orographic heading, and the forest's lean and sway all follow those keys, sampling the same gust field at the same (x, y, t). Each node's own wind keys are the fallback. SceneWind::azimuth is dir + 90 (O13 had it mirrored). cvc::physics: field::wind takes a flow_velocity (a velocity in space and time, with a digest). wind_flow is the scene's wind over a power-law height profile, linear below 0.1 m. A flow with a wind may have no volume (then it is air everywhere). The field step reads the wind once per body and its profile at nine heights across the body, and clips cells to the wind's base. The wind's digest is in save() and state_hash(); a world without one hashes as before. A vehicle's aero drag reads the wind at its centre of mass. The push: SceneWorld adds the wind as a flow field. WorldVehicles' dynamic, dynamic4w and kinematic fleets get the wind's share of the drag through the drive's external force. The room rules carry the wind to arisrv: dynamic avatars stand in a flow field, and kinematic avatars drift once the wind's drag beats the walker's grip, the drift folded into the intent. wind_controls.ari; docs: roadmap As built (O14), ARIADNE.md Wind, PHYSICS_API.md flow hook.
…ater and clouds, and a Wind panel in Settings The water's and the clouds' own winds stay as fallbacks. The Water and Sky panels' wind sliders say they are unused while the scene has a wind.
…th the wind on and off
…the current A fluid's damping held a floating body to the water's velocity in every direction, so a 1 m crate in a 10 m/s wind drifted about a millimetre a second. With field::inertial set, the damping acts on the vertical only (the heave it stands for, also left out of the horizontal drag's implicit rate, as a hull's is). Sideways, the water's acceleration pushes the body over its immersed volume (Froude-Krylov, rho V du/dt at the immersed centroid, du/dt from the water's velocity a step either side) and it drags against the water's velocity. So it rides the waves, takes the current, and drifts downwind where the air's drag on its freeboard balances the water's on its hull. The Ariadne water node's field is inertial. The default is off, so other worlds step and hash as before.
…rrent (the inertial fluid)
…intent The test runs 120 frames while a writer thread replaces vehicle a's intent, then expects a to be moving. A thread can start late: on a busy machine all 120 frames (a few tens of milliseconds) passed before the writer ran, no intent reached a, and only the last 6 frames moved it. That reads 0.10766078436440293 m/s, which is what recipe / windows-2022 / Release read on #1318, and what a writer held back until the frames end reads here, bit for bit. The frames now start once the writer has landed an intent (10 s at most). A failure says a's speed after the threaded frames, how many intents landed during them, and whether a existed. It passes with the writer started 300 ms late.
…s mid-run After its first intent the writer may still be descheduled for all 120 frames (a few tens of milliseconds on a busy machine), which would fail the check that an intent landed while the world stepped. The world now steps on, a frame at a time, until one does (10 s at most).
This branch carried #1311's original commit (b6ab0c4), whose files are identical in the squash. The add/add conflicts (wind_field.h/.cpp, scene_wind.h/.cpp) and water_controls.ari take this branch's side, which is #1311 plus #1317's changes. docs/ARIADNE.md is a three-way merge on b6ab0c4 as its base, so master's later edits and #1317's both stand. Against master, the result is exactly #1317's own diff against b6ab0c4: the same 44 files and the same changed lines.
…ne-wind # Conflicts: # docs/PHYSICS_API.md
master fails to build arisrvx's python_engine.cpp: #1302 (bridged users) added room(), bridge_presence(), bridge_absent(), bridge_post() and listen_chat() calling server_link() with no argument, written against the process-wide server link that the P0a cleanup replaced with the module's own state, server_link(PyObject *self). Each of the five now names its module argument self and passes it, as the other server ops (lent(), publish(), ...) already do. Found in #1324's pycvc-linux / cp312 job (run 43956686020), which builds the PR merged with master.
…ne-wind # Conflicts: # src/cvcGL/test/cvcgl_ariadne_realize.cpp
transfix
added a commit
that referenced
this pull request
Nov 17, 2026
* tests: IntentsMaybeSetFromAnotherThread waits for its writer's first intent The test runs 120 frames while a writer thread replaces vehicle a's intent, then expects a to be moving. A thread can start late: on a busy machine all 120 frames (a few tens of milliseconds) passed before the writer ran, no intent reached a, and only the last 6 frames moved it. That reads 0.10766078436440293 m/s, which is what recipe / windows-2022 / Release read on #1318, and what a writer held back until the frames end reads here, bit for bit. The frames now start once the writer has landed an intent (10 s at most). A failure says a's speed after the threaded frames, how many intents landed during them, and whether a existed. It passes with the writer started 300 ms late. * tests: IntentsMaybeSetFromAnotherThread steps on until an intent lands mid-run After its first intent the writer may still be descheduled for all 120 frames (a few tens of milliseconds on a busy machine), which would fail the check that an intent landed while the world stepped. The world now steps on, a frame at a time, until one does (10 s at most).
The realize suite runs every node type's checks in one process. In a Linux Debug job (Xvfb, llvmpipe) it took 250.6 s, 50 s under the 300 s a test without a TIMEOUT gets; on a slower runner (#1309's Debug job, where PhConvoy and Ewave also ran about 1.3x longer) it timed out on all three attempts. As cvcgl_ewave, cvcgl_wake and cvcgl_volren_node have, it gets a budget of its own with headroom, so only a real hang fails it.
…ter's arisrvx build
…ize's Debug timeout
…ne-wind # Conflicts: # src/cvc/ariadne/scene_world.cpp # src/cvc/ariadne/world_vehicles.cpp # src/cvc/tests/ariadne_scene_world_test.cpp
…ne-wind # Conflicts: # docs/ARIADNE.md # examples/ariadne/documents/terrain_lab.ari # src/cvc/ariadne/components/INDEX.ari # src/cvc/ariadne/components/sky_controls.ari # src/cvcGL/ariadne/lsystem_nodes.cpp # src/cvcGL/test/cvcgl_ariadne_realize.cpp
…feat/scene-wind #1322 moved each cell's reads into read_cell() (and ahead of the loop, on the field workers, for a free surface's cells). The scene wind's per-cell work moves with it: body_wind holds a body's wind (its reference at the centre of mass and its height profile), made once per body and field as before, and read_cell takes it to clip the cell at the wind's base and to read its velocity. A wind is a flow's and a free surface a fluid's, so the workers' reads never need it. The arithmetic is the branch's, in the same order. world.cpp keeps #1322's timing and the branch's field_time() for the vehicles' pre_step; the tests are both sides'.
… into feat/water-drift #1322 moved each cell's reads into read_cell(); the inertial fluid's setup (its free surface, the displaced mass and moment) now sits before that loop, and its displaced mass reads the cell's value from the cell_read (cr.value) as the rest of the loop does.
…ne-wind # Conflicts: # docs/ARIADNE.md # examples/ariadne/documents/terrain_lab.ari # src/cvcGL/test/cvcgl_ariadne_realize.cpp
…e-wind world_vehicles.cpp: the runtime keeps both the scene's wind (set_wind) and the boats' still water. The wind's push on the plants that feel no field now leaves the boat fleet out as it leaves out the jolt vehicles: a boat's hull is a dynamic body in the scene's physics world, so the wind's flow field already drags on its part in the air, and the push would charge it twice.
transfix
added a commit
that referenced
this pull request
Nov 17, 2026
… its push on bodies (O14) (#1317) * water: fetch and lee, gusts, the sea lagging the wind, and currents, in both seas (O13) - cvc::algo::wind_field: the scene's gusts as one deterministic function of (x, y, t): two scales of integer-hashed value noise carried downwind and ABYSSAL's pulse over time. cvc/gl/WindGLSL.h is the same in GLSL, no texture. Everything the wind moves (O14: the clouds, the trees, the air physics) can sample it at the same point and time. - cvc::ocean: fetch.h (the fetch map in one upwind sweep, coarse, capped by each body's extent; each cascade scaled by sqrt(F / F_full), F_full where its band is fully grown), sea_lag.h (the sea's wind follows with a time constant and steps by keyframes, at most one per crossfade), current.h (a divergence-free curl-noise current and a two-phase flow map). sea_surface takes a sea_forcing: the h0 crossfade, the fetch scales, the ripples' gust weight, the current. - Ariadne: scene_wind.h reads a node's wind in one place (O14 points it at wind.*). SceneWaterSeaClock steps the keyframes both seas use. New water keys: gustiness, lee, sea_lag, sea_fade, current (water_controls.ari, ARIADNE.md). - cvcGL: OceanWind (one RG32F texture of the two keyframes' fetch maps; the gusts and the current hashed per vertex). The water node and lsystem_coast draw the lee, the gusts (the ripples' weight, cat's paws in the shading), the current carrying the two short cascades, and mix the two keyframes' h0 on the CPU only while a crossfade runs. - Tests: ocean_wind_test (fetch behind an island and on a lake, the lag and its debounce, a continuous crossfade, golden hashes of the fetch map, the gusts and the current, a divergence-free current, the physics sea's lee and current), a floating crate in the lee against one in the open (ariadne_scene_world_test), the water node's new keys (cvcgl_ariadne_realize). No golden hash moved: a sea_surface without a forcing has the same digest and values as before. * physics, ariadne: one scene wind for the water, clouds and trees, and its push on bodies (O14) A document's scene: wind: seeds wind.speed, wind.dir and wind.gustiness. While wind.speed is set, the water (both seas), cloud_sky's drift and orographic heading, and the forest's lean and sway all follow those keys, sampling the same gust field at the same (x, y, t). Each node's own wind keys are the fallback. SceneWind::azimuth is dir + 90 (O13 had it mirrored). cvc::physics: field::wind takes a flow_velocity (a velocity in space and time, with a digest). wind_flow is the scene's wind over a power-law height profile, linear below 0.1 m. A flow with a wind may have no volume (then it is air everywhere). The field step reads the wind once per body and its profile at nine heights across the body, and clips cells to the wind's base. The wind's digest is in save() and state_hash(); a world without one hashes as before. A vehicle's aero drag reads the wind at its centre of mass. The push: SceneWorld adds the wind as a flow field. WorldVehicles' dynamic, dynamic4w and kinematic fleets get the wind's share of the drag through the drive's external force. The room rules carry the wind to arisrv: dynamic avatars stand in a flow field, and kinematic avatars drift once the wind's drag beats the walker's grip, the drift folded into the intent. wind_controls.ari; docs: roadmap As built (O14), ARIADNE.md Wind, PHYSICS_API.md flow hook. * terrain_lab: the scene's one wind (9 m/s toward 30 degrees) for its water and clouds, and a Wind panel in Settings The water's and the clouds' own winds stay as fallbacks. The Water and Sky panels' wind sliders say they are unused while the scene has a wind. * docs(roadmap): O14 as built, terrain_lab's wind and its frame cost with the wind on and off * tests: IntentsMaybeSetFromAnotherThread waits for its writer's first intent The test runs 120 frames while a writer thread replaces vehicle a's intent, then expects a to be moving. A thread can start late: on a busy machine all 120 frames (a few tens of milliseconds) passed before the writer ran, no intent reached a, and only the last 6 frames moved it. That reads 0.10766078436440293 m/s, which is what recipe / windows-2022 / Release read on #1318, and what a writer held back until the frames end reads here, bit for bit. The frames now start once the writer has landed an intent (10 s at most). A failure says a's speed after the threaded frames, how many intents landed during them, and whether a existed. It passes with the writer started 300 ms late. * tests: IntentsMaybeSetFromAnotherThread steps on until an intent lands mid-run After its first intent the writer may still be descheduled for all 120 frames (a few tens of milliseconds on a busy machine), which would fail the check that an intent landed while the world stepped. The world now steps on, a frame at a time, until one does (10 s at most). * ariadne_python: the bridge ops pass self to server_link master fails to build arisrvx's python_engine.cpp: #1302 (bridged users) added room(), bridge_presence(), bridge_absent(), bridge_post() and listen_chat() calling server_link() with no argument, written against the process-wide server link that the P0a cleanup replaced with the module's own state, server_link(PyObject *self). Each of the five now names its module argument self and passes it, as the other server ops (lent(), publish(), ...) already do. Found in #1324's pycvc-linux / cp312 job (run 43956686020), which builds the PR merged with master. * cvcGL: cvcgl_ariadne_realize gets its own ctest timeout (1200 s) The realize suite runs every node type's checks in one process. In a Linux Debug job (Xvfb, llvmpipe) it took 250.6 s, 50 s under the 300 s a test without a TIMEOUT gets; on a slower runner (#1309's Debug job, where PhConvoy and Ewave also ran about 1.3x longer) it timed out on all three attempts. As cvcgl_ewave, cvcgl_wake and cvcgl_volren_node have, it gets a budget of its own with headroom, so only a real hang fails it. * world_vehicles: the boat note in the wind push's comment within the column limit
transfix
enabled auto-merge (squash)
November 17, 2026 18:13
transfix
added a commit
that referenced
this pull request
Nov 17, 2026
…1323) * water: fetch and lee, gusts, the sea lagging the wind, and currents, in both seas (O13) - cvc::algo::wind_field: the scene's gusts as one deterministic function of (x, y, t): two scales of integer-hashed value noise carried downwind and ABYSSAL's pulse over time. cvc/gl/WindGLSL.h is the same in GLSL, no texture. Everything the wind moves (O14: the clouds, the trees, the air physics) can sample it at the same point and time. - cvc::ocean: fetch.h (the fetch map in one upwind sweep, coarse, capped by each body's extent; each cascade scaled by sqrt(F / F_full), F_full where its band is fully grown), sea_lag.h (the sea's wind follows with a time constant and steps by keyframes, at most one per crossfade), current.h (a divergence-free curl-noise current and a two-phase flow map). sea_surface takes a sea_forcing: the h0 crossfade, the fetch scales, the ripples' gust weight, the current. - Ariadne: scene_wind.h reads a node's wind in one place (O14 points it at wind.*). SceneWaterSeaClock steps the keyframes both seas use. New water keys: gustiness, lee, sea_lag, sea_fade, current (water_controls.ari, ARIADNE.md). - cvcGL: OceanWind (one RG32F texture of the two keyframes' fetch maps; the gusts and the current hashed per vertex). The water node and lsystem_coast draw the lee, the gusts (the ripples' weight, cat's paws in the shading), the current carrying the two short cascades, and mix the two keyframes' h0 on the CPU only while a crossfade runs. - Tests: ocean_wind_test (fetch behind an island and on a lake, the lag and its debounce, a continuous crossfade, golden hashes of the fetch map, the gusts and the current, a divergence-free current, the physics sea's lee and current), a floating crate in the lee against one in the open (ariadne_scene_world_test), the water node's new keys (cvcgl_ariadne_realize). No golden hash moved: a sea_surface without a forcing has the same digest and values as before. * physics, ariadne: one scene wind for the water, clouds and trees, and its push on bodies (O14) A document's scene: wind: seeds wind.speed, wind.dir and wind.gustiness. While wind.speed is set, the water (both seas), cloud_sky's drift and orographic heading, and the forest's lean and sway all follow those keys, sampling the same gust field at the same (x, y, t). Each node's own wind keys are the fallback. SceneWind::azimuth is dir + 90 (O13 had it mirrored). cvc::physics: field::wind takes a flow_velocity (a velocity in space and time, with a digest). wind_flow is the scene's wind over a power-law height profile, linear below 0.1 m. A flow with a wind may have no volume (then it is air everywhere). The field step reads the wind once per body and its profile at nine heights across the body, and clips cells to the wind's base. The wind's digest is in save() and state_hash(); a world without one hashes as before. A vehicle's aero drag reads the wind at its centre of mass. The push: SceneWorld adds the wind as a flow field. WorldVehicles' dynamic, dynamic4w and kinematic fleets get the wind's share of the drag through the drive's external force. The room rules carry the wind to arisrv: dynamic avatars stand in a flow field, and kinematic avatars drift once the wind's drag beats the walker's grip, the drift folded into the intent. wind_controls.ari; docs: roadmap As built (O14), ARIADNE.md Wind, PHYSICS_API.md flow hook. * terrain_lab: the scene's one wind (9 m/s toward 30 degrees) for its water and clouds, and a Wind panel in Settings The water's and the clouds' own winds stay as fallbacks. The Water and Sky panels' wind sliders say they are unused while the scene has a wind. * docs(roadmap): O14 as built, terrain_lab's wind and its frame cost with the wind on and off * cvcGL: a generated world's trees lean and sway in the scene's wind Every prop mesh of a generated_world (the wood, which holds the native trees' crowns, the leaves, the needles, on every LOD rung) leans downwind and sways in the vertex shader while the scene has a wind, from uniforms alone: the wind's direction, the lean and sway, the clock, the camera and the gust field (cvc_wind_gust). No texture and no vertex array, which the low-memory mapper would spend a unit on. A vertex's height above the ground rides in its normal's length (1 + h / 64): the lighting normalises it away, and the shader reads it back, so a point moves as (h - 0.3)^2 and a trunk's foot stays put. The phase is the vertex's world position. The displacement goes in at //VTK::Clip::Impl as a #define of vertexMC, so either mapper's position code follows it. The inputs skip the shadow bake, so the trees' shadows stay at rest. The sway fades out 300-450 m from the camera. world.sway (prop sway, 1; Tree sway on the Terrain Lab panel) scales it; world.lean_dir publishes the way the trees lean. Without a scene wind they stand still, as before. * cvcGL: swaying trees look their shadows up at rest The trees' shadow map is baked at rest, and a swayed point that had moved behind its own rest-pose surface read as shadowed: dark streaks along the trunk and limbs, faint at 9 m/s close up and the trunk nearly black at 25 m/s. A prop mesh now passes its unswayed view-space position to the fragments and points the first shadow lookup (calcShadow of the FilteredShadowMapPass) at it, so a swaying tree is shaded as the at-rest map says. One varying, no texture or uniform. Docs: the roadmap's trees note gets this and the frame cost measured on a quiet machine (a GPU timer: a few tenths of a millisecond near the trees; nothing arigl's frame shows). * tests: IntentsMaybeSetFromAnotherThread waits for its writer's first intent The test runs 120 frames while a writer thread replaces vehicle a's intent, then expects a to be moving. A thread can start late: on a busy machine all 120 frames (a few tens of milliseconds) passed before the writer ran, no intent reached a, and only the last 6 frames moved it. That reads 0.10766078436440293 m/s, which is what recipe / windows-2022 / Release read on #1318, and what a writer held back until the frames end reads here, bit for bit. The frames now start once the writer has landed an intent (10 s at most). A failure says a's speed after the threaded frames, how many intents landed during them, and whether a existed. It passes with the writer started 300 ms late. * tests: IntentsMaybeSetFromAnotherThread steps on until an intent lands mid-run After its first intent the writer may still be descheduled for all 120 frames (a few tens of milliseconds on a busy machine), which would fail the check that an intent landed while the world stepped. The world now steps on, a frame at a time, until one does (10 s at most). * ariadne_python: the bridge ops pass self to server_link master fails to build arisrvx's python_engine.cpp: #1302 (bridged users) added room(), bridge_presence(), bridge_absent(), bridge_post() and listen_chat() calling server_link() with no argument, written against the process-wide server link that the P0a cleanup replaced with the module's own state, server_link(PyObject *self). Each of the five now names its module argument self and passes it, as the other server ops (lent(), publish(), ...) already do. Found in #1324's pycvc-linux / cp312 job (run 43956686020), which builds the PR merged with master. * cvcGL: cvcgl_ariadne_realize gets its own ctest timeout (1200 s) The realize suite runs every node type's checks in one process. In a Linux Debug job (Xvfb, llvmpipe) it took 250.6 s, 50 s under the 300 s a test without a TIMEOUT gets; on a slower runner (#1309's Debug job, where PhConvoy and Ewave also ran about 1.3x longer) it timed out on all three attempts. As cvcgl_ewave, cvcgl_wake and cvcgl_volren_node have, it gets a budget of its own with headroom, so only a real hang fails it. * world_vehicles: the boat note in the wind push's comment within the column limit
transfix
added a commit
that referenced
this pull request
Nov 18, 2026
The boat node's tests (AriadneBoatNode.FloatsSteersFromItsKeysAndNavTakesItToItsGoal and NavTakesTerrainLabsLaunchAcrossTheLake) took 156 and 77 s in master's Debug package job before #1318's inertial fluid, and ran past ctest's 300 s in #1335's, which builds on it; the crate drifting in the scene's wind timed out once there too. The binary's tests get 900 s, as the segmentation action test has.
transfix
added a commit
that referenced
this pull request
Nov 18, 2026
The boat node's tests (AriadneBoatNode.FloatsSteersFromItsKeysAndNavTakesItToItsGoal and NavTakesTerrainLabsLaunchAcrossTheLake) took 156 and 77 s in master's Debug package job before #1318's inertial fluid, and ran past ctest's 300 s in #1335's, which builds on it; the crate drifting in the scene's wind timed out once there too. The binary's tests get 900 s, as the segmentation action test has. (cherry picked from commit dc5fff6)
transfix
added a commit
that referenced
this pull request
Nov 18, 2026
The boat node's tests (AriadneBoatNode.FloatsSteersFromItsKeysAndNavTakesItToItsGoal and NavTakesTerrainLabsLaunchAcrossTheLake) took 156 and 77 s in master's Debug package job before #1318's inertial fluid, and ran past ctest's 300 s in #1335's, which builds on it; the crate drifting in the scene's wind timed out once there too. The binary's tests get 900 s, as the segmentation action test has. (cherry picked from commit dc5fff6)
transfix
added a commit
that referenced
this pull request
Nov 18, 2026
#1339) * World vehicles steer around each other, on one plant and across plants The world runtime turned on none of the navigator's inter-agent steering, so vehicles met only physically: two kinematic boxes drove through each other, and a kinematic box shoved a dynamic chassis back the way it came. - cvc::nav::sim_world::set_foreign_agents: points outside the world (another fleet's vehicles) that the separation steers each agent away from as from a peer; nothing moves them, and min_gap and yielding do not see them. Empty by default: runs are byte-unchanged. - sim_world::config::sep_side and sep_side_radius: passing on the right. A peer ahead, within sep_side_radius and no further than sep_radius off the agent's line, turns its carrot right by sep_side times the peer's weight times the carrot's distance, so two that meet head on both swing right and pass, where the push along the line between them only slowed them. Default 0 = off. set_separation_side sets them. - WorldVehicles: on by default (set_avoid, the vehicles.avoid key): every navigator's separation at 5 vehicle radii and 1.5 radii of strength, the turn at 0.6 with a 20-radius look-ahead, and before each fleet steps the other plants' vehicles as its foreign agents. Turning it off changes the navigators in place. Test: AriadneWorldVehicles.VehiclesSteerAroundEachOtherOnOneAndManyPlants (head on, 0.5 m off one line: two kinematic cars pass 2.40 m apart instead of 0.50 m; a kinematic car and a dynamic one pass 2.68 m apart and both get past, where without it the car shoved the other 52 m back; the key turns it off). * tests: ariadne_scene_world_test gets 900 s on slow Debug runners The boat node's tests (AriadneBoatNode.FloatsSteersFromItsKeysAndNavTakesItToItsGoal and NavTakesTerrainLabsLaunchAcrossTheLake) took 156 and 77 s in master's Debug package job before #1318's inertial fluid, and ran past ctest's 300 s in #1335's, which builds on it; the crate drifting in the scene's wind timed out once there too. The binary's tests get 900 s, as the segmentation action test has. (cherry picked from commit dc5fff6)
transfix
added a commit
that referenced
this pull request
Nov 18, 2026
#1341) * pycvc_gl.cars.HostCars: the cars template's cars in a host's own world The cars template ran its cars on worlds of its own (cars.py's builders) or, with --gym, headless in pycvc.WorldGym's own app, which a drawn host cannot show. HostCars runs them in the world the host's own document runs, so a drawn host shows them as that document draws its world, with the interface Cars and GymCars have (state, step, step_navigator, new_goals, reset, world): a controller's (steer, accel) goes to each car as its intent (a replace command until the next call; a NaN leaves the car to nav@1), step_navigator clears them, and the rays are cast on the world's grid. pycvc.WorldEntities gains what that needs: set_goal(id, x, y), set_wander(on), grid() (as pycvc.WorldGym.grid gives it), and in each list() entry the entity's velocity, steering, goal, reach, reached, collided and its body (length, width, wheelbase and its limits). Test: test_pycvc_gl_host_cars (four cars spawned in a headless host's world, a CarsState with rays, nav@1 drives them toward their goals, the controller's command takes over and a NaN gives them back, new goals, reset); test_pycvc_world_entities and test_pycvc_gl_cars still pass. * tests: ariadne_scene_world_test gets 900 s on slow Debug runners The boat node's tests (AriadneBoatNode.FloatsSteersFromItsKeysAndNavTakesItToItsGoal and NavTakesTerrainLabsLaunchAcrossTheLake) took 156 and 77 s in master's Debug package job before #1318's inertial fluid, and ran past ctest's 300 s in #1335's, which builds on it; the crate drifting in the scene's wind timed out once there too. The binary's tests get 900 s, as the segmentation action test has. (cherry picked from commit dc5fff6)
transfix
added a commit
that referenced
this pull request
Nov 18, 2026
…clients, and they draw them (#1335) * Relay 4a: arisrv runs its document's world, and a world starts with its vehicles ServerDocument no longer empties the parsed scene at load: it keeps a copy for the relay to publish (room_world_from_scene) and lets the load build the scene's world headless, as any runtime without a scene adapter does (SceneWorld: the physics world and bodies, the world sources, the vehicles of world: vehicles:), stepped on the app's world clock at each step(). That world is the document's, apart from the holon's; the entities' table stays under the document's prefix until the relay sends it (4b). A document's init: runs before its world is made, and WorldVehicles ignores a spawn request already set when it starts, so a document could not populate its world at load. world: vehicles: start: lists the vehicles a world starts with (archetype, count up to 256, name numbered per entry, team, controller, plant, policy, at and heading), spawned when the world's vehicles are made (WorldVehicles::spawn_starts). And vehicles.spawn.count spawns that many at one request. Tests: ServerDocumentTest.RunsItsScenesWorldAndItsVehicles (five start vehicles drive under nav@1 on the relay's steps; spawn.count adds two), AriadneWorldVehicles.TheWorldStartsWithItsStartVehicles (parse and its errors, and a headless runtime spawning them). The room scene's physics warning now says where the physics runs. * Relay 4b: the room's entities on the wire, and a client's playout of them The relay now sends the vehicles its document runs to every client: - Who they are: conference::room_entities writes each one's identity (name, archetype, plant, controller, team, colours, chassis size, the archetype's look with a file's name alone) as the room tree's entities section, conf.rooms.<room>.entities, a revisioned section rewritten when the vehicles change (WorldVehicles::revision); one that went stays with present 0, as the room's objects do. - Where they are: their poses ride the pose stream beside the participants', under entity pids ("~e<id>": no participant's pid, a state name, starts with '~'). room_pose_relay::step takes them as extra subjects, each due at most every entity_interval_ticks (30 Hz), all in a keyframe; one no longer given is in the next snapshot's gone. - arisrv: a room_entity_relay per room, stepped before the room's drain from the server document's SceneWorld vehicles. - A client: entity_playout, a client holon without physics, so each entity is played out as a peer avatar is (the holon's peer playout, no body anywhere). apply_pose_snapshot and apply_pose_samples give it the entity pids' samples; its pump reads the section when its revision moves and drops the entities it no longer lists. arigl feeds and pumps one; drawing them is the next step. Tests: RoomEntities.TheirPidsAreNoParticipants, TheSectionCarriesThemAndMarksTheOnesThatWent and TheRelaySendsThemAndAClientPlaysThemOut (relay to decoder to playout, the 30 Hz rate, an entity that goes); ServerDocumentTest's world test now runs a room_entity_relay over its live vehicles (seven listed and posed, rewritten only on a change, six after a removal). * Relay 4c: clients draw the room's entities room_view::update_entities draws each entity a client's playout shows (entity_playout, 4b) as a vehicle: vehicle_view's box look (chassis, cabin, four wheels), sized from its identity, in its two colours, posed at its chassis's centre and heading, and named among the labels. Its node is built again when its identity changes and removed when the room drops it; the view's teardown removes them too. A model look is drawn as its box for now: the relay's model files are its own, and the client does not look for the model itself yet. room_entity carries its wheels (wheelbase, track, a wheel's radius) from its vehicle, so the box look's wheels sit where the plant's do. arigl (and ariglx and the web client, which are arigl) calls it each frame after the room view's update. Test: cvcgl_room_view's entities section (no node before a first sample, posed at its centre, a box look with wheels, rebuilt on a new colour, removed when dropped, drawn again on return, torn down with the view). * Relay 4d: a stock server world with vehicles, and a client seeing them end to end - cvc://worlds/traffic.ari: a stock server world (arisrv --doc): a 160 m ground, twelve blocks on a grid of streets, and eighteen vehicles it starts with (world: vehicles: start:) driving under nav@1. The blocks are plain boxes, so the room publishes them and clients draw them. - arisrv --doc takes a cvc:// URI (the file libcvc installs), and says how many vehicles its document's world runs. - RoomRelayLoopbackTest.AClientSeesTheServerWorldsVehiclesMove: the loopback relay runs the pose stream with the room's entities as arisrv does (relay_options::pose_stream), and a client applying its snapshots with an entity_playout sees the server document's six vehicles listed, posed and moving, within 3 m of where the relay has them. - ServerDocumentTest.TheStockTrafficWorldRuns (all eighteen placed, most driving) and the arisrv_doc_vehicles ctest. - ARIADNE_WORLDS.md: WD3 started; §14 "On the relay", the start: list, the corrected "do not steer around each other" note, and the stale "boats drawn as hulls" note replaced (#1316 drew them). * tests: ariadne_scene_world_test gets 900 s on slow Debug runners The boat node's tests (AriadneBoatNode.FloatsSteersFromItsKeysAndNavTakesItToItsGoal and NavTakesTerrainLabsLaunchAcrossTheLake) took 156 and 77 s in master's Debug package job before #1318's inertial fluid, and ran past ctest's 300 s in #1335's, which builds on it; the crate drifting in the scene's wind timed out once there too. The binary's tests get 900 s, as the segmentation action test has. * Clients draw a room entity's model, and the tactical boat's model is its default look Clients watching a server world drew every entity as its box look. Now a room entity's model look (a file's name: Humvee.glb, TacticalBoat.glb) is drawn from the client's own copy, which find_vehicle_model finds in its cvcpkg packages, fitted to the chassis and set on the ground under it; one it has not installed is drawn as its box. - vehicle_view: make_vehicle_model_cache() and attach_vehicle_model(), the fitted-model path vehicle_view already uses, for other views (the lsystem_coast session's boat node adds the same two, byte for byte). - room_entity.base_z: the ground under the chassis's centre, relative to it, where a fitted model's base goes. - room_view: each entity's model look resolved locally, the box when it is not there or does not read; its own model cache. - find_vehicle_model: a name without an extension is its .glb (TacticalBoat: TacticalBoat.glb, as the vehicle-tactical-boat package installs it beside Humvee.glb). - resolve_vehicle_looks: a boat on the "tactical" preset (which the lsystem_coast session's PR adds) defaults to the TacticalBoat model, fitted, as a humvee defaults to Humvee.glb. Tests: LooksAreFoundWhereTheyAre (TacticalBoat by its name and its file's, the tactical preset's default look); cvcgl_room_view (a model look the host has not installed is drawn as its box).
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.
Floating bodies drift in the wind and the current. Before this, the water field's linear damping, set so a body follows the waves, held a 1 m crate to about 1.3 mm/s in a 10 m/s wind.
Stacked on #1317 (O14), which is stacked on #1311 (O13). The base is
feat/scene-wind; retarget down the stack as each one merges.What changed, and where
field::inertial(inc/cvc/physics/field.h,src/cvc/physics/field_step.cpp), for a fluid:velocity()reads per body per step, not per cell. A floating body weighs what it displaces, so this moves it as it moves the water: it rides the waves.waternode's field sets it (src/cvc/ariadne/scene_water.cpp), so terrain_lab's crates now drift in its wind and on its current."inertial": trueonly when it's set.docs/PHYSICS_API.md"Floating bodies: an inertial fluid";docs/ARIADNE.md's Wind section; the roadmap's "As built (after O14)" after E6.How it was checked (Windows 11, MSVC Release)
PhysicsField.AFloatingCrateDriftsDownwind: a 1 × 1 × 0.5 m crate (density 500) in a 10 m/s wind drifts:PhysicsField.AnInertialCrateDriftsWithTheCurrent: in a 0.5 m/s current the crate reaches 0.469 m/s in 60 s from rest. With a 10 m/s wind across the current it moves at (0.483, 0.155) m/s: the current plus its 0.156 m/s leeway.PhysicsFluidSurface.AnInertialBodyRidesTheSwell: in a 0.2 m, 4 s swell, the inertial slab:ABoxHeavesWithTheSwellrequires of the fully damped one;AriadneSceneWorld.ACrateOnTheWaterDriftsInTheScenesWind: on the water node's own field with 10 m/s of scene wind and small waves, the crate goes 4.1 m downwind in 30 s. With the field's damping back in every direction, it stays within 0.25 m.ABoxHeavesWithTheSwell,ABoxRidesTheSea, the lake and raft tests, andAWaterNodesLeeIsCalmerThanItsOpenWater(heave) all pass.PhysicsFluidSurface,PhysicsOceanSurface,PhysicsHull,PhysicsBoatandPhysicsJoltCrossPlatformGoldenHash, plusphysics_replay_test. Drawn and headless floating crates still agree (cvcgl_ariadne_physics).physics_replay_testand the boat tests.Not done, not checked
CVC_WITH_MUJOCOis off on this machine and MuJoCo isn't in its deps. Getting it building means downloading the MuJoCo package, which I haven't done without the owner's say-so. The seam is unchanged: the scene'swind_flowper body intomujoco_robot'sxfrc_applied.add_field/set_fielddon't takeinertialyet (bindings/pycvc/pycvc_physics.i); pycvc isn't built here.