Skip to content

world: a data node's world dataset draws with the generated-world renderer (GB3 part 2) - #1508

Merged
transfix merged 4 commits into
masterfrom
feat/gb3-world-dataset-draw
Nov 25, 2026
Merged

transfix merged 4 commits into
masterfrom
feat/gb3-world-dataset-draw

Conversation

@transfix

Copy link
Copy Markdown
Owner

GB3 part 2 of ARIADNE_WORLDS section 18.8 ("one renderer"): a source: { data } node whose dataset is a world now draws with cvcGL's generated-world renderer, the one the terrain lab and generated_world use. That covers a city bundle like Austin, a saved world, or a generate: generated_world dataset. Part 1 (#1496) put everything that renderer draws into the bundle and added world_from_bundle; this PR wires it into the data node.

What changes

  • A world dataset draws as a generated world does (world_nodes.h, new DataWorldView):
    • Terrain: LOD chunks wearing the dataset's ground: ground.png, else a city's satellite.png at its own width and height (it need not be square), else the terrain's surface colour.
    • Props, buildings, roads, water: the props in LOD cells swaying in the scene's wind; the buildings and roads; the water by depth.
    • Edges: the sea past a shore edge, and the rock under a floating world (underside: 1, off by default for a data node).
    • Where the work runs:
      • A sliced job (DataWorldTask, natively on the background pool) makes the drawn world from what the decoder already holds in the store: the world, the manifest's fields, the decoded aerial image, and the files. The glbs are not parsed again.
      • The world goes into the scene a piece at a time, through the install the generated node uses.
      • A reloaded dataset's world replaces the shown one once it is all in.
    • Where the nodes live: under the data node's group (<id>_terrain and its chunks, <id>_props, _foliage, _needles, _buildings, _roads, _water, _underside), so visible: and the world source's switch hide and show the whole world.
    • Colour: a mesh with no vertex colours takes its surfaces' colours, as the plain draw gave it. tint: satellite colours the buildings and roads by the ground under them.
    • Props and progress: look, water, texture (the water texture's size) and sway work as on generated_world. Progress is under <id>.draw.* (busy, progress, phase, status).
  • scene_realize:
    • Every data node gets a view at realize, with a pending_work probe, so a settled-frame host waits for the world to be in.
    • sync_scene_data starts the job for a world dataset and clears the view for anything else.
    • tick_scene ticks the view: install, retire, and LOD for the frame's camera.
    • New finish_scene_data(realized) runs the jobs and installs to their end, for tests and hosts that don't tick.
    • The node's height field and frame: bounds still come from the dataset at once, and its bodies are unchanged.
  • The plain draw (each item a mesh, the aerial image draped) now covers only a terrain that takes a live texture (material: { texture: { stream } }) and datasets that are not worlds (a mesh, a terrain alone, a volume).
  • The renderer itself (refactor; the generated node draws as before):
    • The parts beside the terrain node are found or made through find_part / make_part: top-level for generated_world, under the group for a data node.
    • The ground texture has a width and a height rather than one size.
    • The per-frame work is one tick_world, shared by both kinds of node.
    • generated_world also gains an underside: prop (default 1, as before).
  • world_from_bundle draws only the mesh items with role_render. A collider-only item is no longer merged into the buildings.

Tests

cvcgl_ariadne_data (5 tests, 2 new):

  • The city bundle test now goes through the world renderer. After finish_scene_data:
    • the node's children are city_terrain and the parts beside it;
    • the terrain holds the 2 x 2 aerial image, and its chunk's UVs put the image's top-left at the north-west corner;
    • after a reload, the old world's nodes are gone and the shown world is the new dataset's;
    • a city without an aerial image wears its surface colour.
  • The hidden-node test checks the ground chunk's rung: it is registered but not visible while the node is hidden, and shows with the node.
  • New test_a_city_ground_that_is_not_square:
    • a 4 x 2 satellite.png becomes a 4 x 2 ground texture;
    • the node's pending_work probe is true while the world is drawing and false once it is in;
    • the status is empty once the world is drawn.
  • New test_a_generated_worlds_dataset_draws_as_its_node_does, on a generate: generated_world dataset:
    • one LOD ladder per prop cell under city_props;
    • the buildings mesh under its holder;
    • one chunk ladder per terrain chunk;
    • a water ladder per wet chunk;
    • the 2048 ground.png as the ground texture.

world_bundle_v2_test: 9 of 9 pass.

Locally (MSVC Release, full build): 2,141 matching world, ariadne, data, nav, bundle and cvcGL ariadne tests pass (the skips need CUDA, Jolt or the real Austin bundle), cvcgl_ariadne_physics among them. Some changed lines were reformatted, whitespace only, after that run.

Not in this PR

  • A world drawn from a dataset has no generator raster, so the renderer's other colour modes (risk, occupancy, height) aren't offered for it. It draws its stored ground.
  • A bound material: { opacity } reaches only what the plain draw makes.
  • GB4 (Save in the terrain lab) and GB5 (clients) are next.

…derer (GB3 part 2)

A source: { data } node whose dataset is a world (a city bundle such as
Austin, a saved world, a generate: generated_world dataset) now draws as
the generated_world node draws its own: terrain LOD chunks on the
dataset's ground (ground.png, else satellite.png at its own width and
height), the props' LOD cells, buildings, roads and water.

world_nodes: DataWorldView and DataWorldTask make the drawn world with
world_from_bundle from what the decoder left in the store, off the frame
thread, and put it in through the generated node's install, under the
data node's group. The renderer's parts are found or made through
find_part / make_part, the ground texture has a width and height, and
the per-frame work is one tick_world shared by both nodes.

scene_realize: every data node gets a view and a pending_work probe;
sync_scene_data loads a world dataset into it or clears it; tick_scene
ticks it; finish_scene_data runs the draws to their end. The plain draw
stays for a terrain with a live texture and for non-world datasets.

world_from_bundle draws only items with role_render.
…ay, region, water_level)

The closed .ari schema (#1464) checks a source: { data } node against
node_builtin. GB3 part 2 reads look, water, underside, texture and sway on
it, and GB2 reads region and water_level, so each was an unknown key.
…ug load can't use it up

The run's clock starts before the document loads. On CI's Debug job (on
master too) the load took over a second, so the 1 s timeout ran out before
test 'waits' began and the message had no "in test 'waits'".
@transfix
transfix merged commit d2b7b0c into master Nov 25, 2026
30 checks passed
@transfix
transfix deleted the feat/gb3-world-dataset-draw branch November 25, 2026 00:09
transfix added a commit that referenced this pull request Nov 25, 2026
Conflict in ari_test_command_test.cpp: #1508 gave FramesAndTimeout's stuck
document 5 s for the same Debug-runner flake that a651d0c gave 4 s;
master's version kept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant