@bendyline/molen-tooling 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/capture/harness.js +610 -271
  2. package/dist/capture/worldgen-preview.js +396 -298
  3. package/dist/cli.mjs +2 -2
  4. package/dist/docs-src/guide/3d-art-guidelines.md +34 -10
  5. package/dist/docs-src/guide/3d-model-assets.md +40 -2
  6. package/dist/docs-src/guide/adaptive-performance.md +12 -4
  7. package/dist/docs-src/guide/aircraft.md +126 -26
  8. package/dist/docs-src/guide/ambient-life.md +13 -4
  9. package/dist/docs-src/guide/audio.md +19 -5
  10. package/dist/docs-src/guide/building-interiors.md +7 -2
  11. package/dist/docs-src/guide/determinism.md +1 -1
  12. package/dist/docs-src/guide/dioramas.md +6 -0
  13. package/dist/docs-src/guide/earth-view.md +121 -20
  14. package/dist/docs-src/guide/entities.md +84 -5
  15. package/dist/docs-src/guide/figures.md +31 -7
  16. package/dist/docs-src/guide/graphics-performance.md +27 -12
  17. package/dist/docs-src/guide/medium-fi.md +269 -25
  18. package/dist/docs-src/guide/navigation.md +5 -2
  19. package/dist/docs-src/guide/project.md +5 -0
  20. package/dist/docs-src/guide/recognizable-places.md +6 -0
  21. package/dist/docs-src/guide/regional-fleets.md +94 -0
  22. package/dist/docs-src/guide/regional-world.md +398 -0
  23. package/dist/docs-src/guide/sky.md +36 -3
  24. package/dist/docs-src/guide/structure-library.md +4 -1
  25. package/dist/docs-src/guide/surface-rendering.md +264 -2
  26. package/dist/docs-src/guide/terrain.md +5 -0
  27. package/dist/docs-src/guide/typography.md +105 -0
  28. package/dist/docs-src/guide/vehicle-interiors.md +169 -9
  29. package/dist/docs-src/guide/vehicles.md +13 -2
  30. package/dist/docs-src/guide/weather.md +15 -8
  31. package/dist/docs-src/guide/worldgen.md +88 -10
  32. package/dist/docs-src/llms.txt +5 -1
  33. package/dist/docs-src/schemas/README.md +6 -0
  34. package/dist/docs-src/schemas/archstyle.md +66 -0
  35. package/dist/docs-src/schemas/components.md +1087 -66
  36. package/dist/docs-src/schemas/ecology-atlas.md +236 -0
  37. package/dist/docs-src/schemas/fleet-catalog.md +113 -0
  38. package/dist/docs-src/schemas/landmark.md +10 -0
  39. package/dist/docs-src/schemas/matgraph.md +11 -1
  40. package/dist/docs-src/schemas/pack-source.md +11 -1
  41. package/dist/docs-src/schemas/pack.md +1 -1
  42. package/dist/docs-src/schemas/project.md +1 -1
  43. package/dist/docs-src/schemas/region-atlas.md +6 -0
  44. package/dist/docs-src/schemas/regional-catalog.md +1436 -0
  45. package/dist/docs-src/schemas/scatter.md +110 -4
  46. package/dist/docs-src/schemas/structure-placement-data.md +662 -0
  47. package/dist/docs-src/schemas/structure-placement-index.md +87 -0
  48. package/dist/docs-src/schemas/structure-placements.md +183 -0
  49. package/dist/docs-src/schemas/terrain-package.md +41 -0
  50. package/dist/docs-src/schemas/transport-network.md +8 -0
  51. package/dist/docs-src/schemas/types.md +1 -1
  52. package/dist/docs-src/schemas/wildlife-ranges.md +251 -0
  53. package/dist/docs-src/schemas/worldgen-batch.md +61 -0
  54. package/dist/index.d.mts +2 -0
  55. package/dist/index.mjs +1 -1
  56. package/dist/{mcp-BbxqqnD1.mjs → mcp-BXaK46X-.mjs} +1 -1
  57. package/dist/{ops-b4Pag8U-.mjs → ops-Cm7WNvb9.mjs} +55 -22
  58. package/dist/templates/city-courier/gen/molen-types.ts +138 -17
  59. package/dist/templates/city-courier/scripts/molen-scripts.d.ts +138 -17
  60. package/dist/templates/figures-gallery/test/headless.test.ts +2 -1
  61. package/dist/templates/index.json +17 -17
  62. package/dist/templates/skybound/gen/molen-types.ts +138 -17
  63. package/dist/templates/skybound/scripts/molen-scripts.d.ts +138 -17
  64. package/dist/templates/top-down-arena/scripts/molen-scripts.d.ts +138 -17
  65. package/dist/templates/top-down-arena/src/gen/molen-types.ts +138 -17
  66. package/package.json +13 -13
@@ -36,9 +36,10 @@ Three constraints decide the style, and every rule below follows from one of the
36
36
  3. **Fit any footprint.** Procedural buildings are generated from whatever outline the map
37
37
  supplies: L-shapes, courtyards, slivers and curves. A style has to stay coherent on all of
38
38
  them, so it is built from simple, rule-driven parts.
39
- 4. **Low-poly with levels of detail.** Cars are a little chunky, trees show their facets, and
40
- buildings carry few adornments. LODs add detail as the camera approaches. High-priority
41
- entities, such as the vehicle the player is in, earn more polygons than ambient copies.
39
+ 4. **Low-poly with levels of detail.** Cars are a little chunky, trunks and distant trees show
40
+ their facets, and buildings carry few adornments. LODs add detail as the camera approaches.
41
+ High-priority entities, such as the vehicle the player is in, earn more polygons than ambient
42
+ copies.
42
43
  5. **Three rendering modes.** Economy, Medium and High (see
43
44
  [Rendering modes](#rendering-modes)) change resolution, shadows and level of detail. They
44
45
  never change the palette or the style, so every mode looks like the same world.
@@ -52,11 +53,11 @@ exported from `@bendyline/molen-earth/client` as `EARTH_SKY_PALETTE`, `EARTH_LIG
52
53
 
53
54
  | Element | Value | What it means for an asset |
54
55
  | --- | --- | --- |
55
- | Sun | Warm white `#fff1d8`, intensity 3.5 | Sunlit horizontal faces render near their authored color |
56
- | Sky fill | `dayAmbient` 2 from the sky dome, warm ground bounce `#7a7258` | Faces in shade sit at roughly a third of lit faces, cool-tinted |
57
- | Tone mapping | Khronos PBR Neutral, exposure 1 | Authored colors keep their hue and saturation below the highlights |
56
+ | Sun | Warm white `#fff1d8`, intensity 4.4 | Sunlit horizontal faces render near their authored color |
57
+ | Sky fill | `dayAmbient` 2 from the sky dome at `skyLightSaturation` 0.18, warm ground bounce `#9a8f70` | Faces in shade sit well under half of lit faces, gently cool rather than blue, so slopes and darks read with photographic contrast |
58
+ | Tone mapping | ACES filmic, exposure 1.05 | Authored colors keep their hue with a little mid-tone contrast; shade reads cool grey, not navy |
58
59
  | Cast shadows | On from the Medium tier up, in a shadow map that follows the camera | Do not bake shadows or ambient occlusion into colors or textures |
59
- | Sky | Saturated zenith `#2f7fd3` over a pale horizon `#c4dcec` | Large pure-white surfaces outshine it; prefer off-whites and creams |
60
+ | Sky | Saturated zenith `#2a6cc4` over a pale horizon `#b2cde4`, both lifted by ACES on screen | Large pure-white surfaces outshine it; prefer off-whites and creams |
60
61
  | Haze | The sky's own horizon color, from about 2 km | Distant ground dissolves into the horizon; do not add a fog color of your own |
61
62
  | Water | `#286d83` with a soft sky reflection | Lakes and bays read clearly blue, never grey |
62
63
 
@@ -105,7 +106,7 @@ where real buildings have it. Avoid both grey-on-grey and candy color.
105
106
  | Lawn and residential ground | 45–55% | 25–35% | lawn `#8aa065`, grass `#7fa258`, park `#6c9a55` |
106
107
  | Paved and commercial ground | 60–70% | 5–12% | paving `#aaa59a` |
107
108
  | Forest floor and conifers | 30–40% | 25–35% | forest `#3c6a3f`, fir `#3e7052` |
108
- | Asphalt | 25–32% | 0–10% | road `#41484d`, with markings `#eee9d4` and `#e8bd57` |
109
+ | Asphalt | 25–36% | 0–10% | road `#56595b` (near neutral and not too dark: a bluer gray turns navy in shade, a darker one crushes to black), with markings `#eee9d4` and `#e8bd57` |
109
110
  | Identity and wayfinding accents | 35–60% | 55–90% | signal red `#b81d18`, chrome yellow `#e7b52a` |
110
111
 
111
112
  Palette rules:
@@ -144,7 +145,7 @@ Budgets are per model and per level of detail. The scene and tile budgets in
144
145
  | Procedural building | Style tier 0: roof, windows, trim, dormers, props | Tier 1: roof and windows, no trim or props | Tier 2 or an instanced stand-in box |
145
146
  | Landmark or authored structure | Closeup ≤ 64,000 | Street ≤ 16,000, district ≤ 4,000 | Skyline ≤ 1,000 |
146
147
  | Small static building | 1,000–8,000 | 500–2,000 | Box or silhouette ≤ 200 |
147
- | Hero vehicle (player car, aircraft) | 10,000–60,000 | 5,000–15,000 | ≤ 2,000 |
148
+ | Controllable vehicle (road, rail, aircraft or boat) | Up to 60,000; use the close-view standard below | 5,000–15,000 or a simpler silhouette | ≤ 2,000; instanced proxy for traffic |
148
149
  | Ambient car or bus | ≤ 2,000 drawn | — | Proxy ≤ 160 |
149
150
  | Tree | 240–450 | 120–140 | 12–20 |
150
151
  | Street furniture (lamp, bench, rack) | 50–500 | 50–150 | 36–72 or none |
@@ -163,7 +164,8 @@ Geometry rules:
163
164
  least a pixel or two wide. Cables, mullions, railings, guy wires and lattice members that fall
164
165
  below that move into a texture, merge into a solid panel, or drop out of that level. Sub-pixel
165
166
  geometry shimmers and costs as much as solid geometry.
166
- - **No micro-bevels.** Chamfer only the largest edges of a hero model, and only once.
167
+ - **No micro-bevels on scenery.** Controllable vehicles may use small edge breaks where they
168
+ visibly explain construction at the driver's eye; remove them from distance representations.
167
169
  - **One draw per material.** Merge a model's parts by material. Two to five materials is
168
170
  typical; more than eight needs a reason.
169
171
  - **Instance repeats.** Seats, windows, bollards, lamps and trees are instanced or merged, never
@@ -171,6 +173,166 @@ Geometry rules:
171
173
  - **Ground contact.** The base sits at Y=0, or on a declared attachment plane, with no floating
172
174
  gap and no deep embedding.
173
175
 
176
+ ## Controllable vehicles: close-view fidelity
177
+
178
+ Every vehicle the player can drive, ride, fly or helm is a close-view subject. This includes
179
+ cars, pickups, motorcycles, bicycles, buses, rail vehicles, aircraft, small boats and ships.
180
+ The distant world remains medium-fi, but the player's vehicle must hold up from the seat and
181
+ when walking alongside it. Do not remove useful cockpit or mechanical detail merely to meet
182
+ an ambient traffic triangle budget. An ambient-only prototype should acquire controls, seats,
183
+ collision and a usable operator view as it becomes a finished vehicle.
184
+
185
+ Keep the inherently polygonal style: deliberate planes, clean curves with finite segments,
186
+ coherent paint colors and believable material response. Increase fidelity through shape and
187
+ construction, not a blanket of photographic textures or exaggerated dirt. A model should still
188
+ read correctly with textures disabled. Model the parts a nearby player can understand:
189
+
190
+ - **Road and rail:** proportioned body panels, real window openings and pillars, door and hood
191
+ gaps, wheel wells, tires with shoulders, rims, lug hardware, brake discs/calipers where visible,
192
+ lamps with housings, mirrors and stalks, wipers, grilles, handles, badges and plates. Bicycles
193
+ and motorcycles also need brake levers, grips, drivetrain, fork and suspension detail,
194
+ cooling fins, footrests and correct rider contact points. Rail wheels have steel treads and
195
+ flanges, not car tires.
196
+ - **Cabins and controls:** a clear forward view at the declared eye position, seats and
197
+ headrests, panel/coaming depth, bezels, gauge marks, display frames, pedals, switches and
198
+ readable nearby labels. Live steering wheels, yokes, levers and instrument needles retain
199
+ stable named pivots. Decorative instruments must not be described as live telemetry.
200
+ Calibrate live needles and their face markings from the same measured scale. Use named
201
+ component signals and derived expressions with explicit units, local pivot axes, wraparound,
202
+ response and missing-data behavior; see [instrument wiring](vehicle-interiors.md#named-variables-and-expressions).
203
+ Verify zero, intermediate and maximum readings, heading wraparound, bank/pitch independently,
204
+ and unavailable data from the seated view. Also check both directions of cockpit/control-surface
205
+ movement in the imported hierarchy: actual grip, pedal and trailing-edge travel. Neutral
206
+ overlays do not reveal reversed pivots. Record measurement approximations (for example,
207
+ geometric altitude versus pressure altitude) and leave unsupported systems visibly inactive.
208
+ Give each vehicle an authored cabin profile: match the model generation's instrument
209
+ placement, vent shapes, screen arrangement, selector and steering-wheel form before adding
210
+ small controls. Vary upholstery, door cards, storage, stitching and hardware where references
211
+ support it. A central speedometer must not become a later generation's infotainment circle;
212
+ a car with driver-only instrumentation must not receive a generic center screen. Generic
213
+ Bendy models need purpose-specific controls too: yacht binnacles, workboat radios, ship radar
214
+ consoles, bus door switches and rail traction desks. Record citable photo sources, authors,
215
+ exact licenses, model/trim mismatches and gaps; prefer public domain/CC0, then appropriately
216
+ attributed CC references. The image's license is separate from the code's license. Review
217
+ a wide cabin/detail view in addition to the forward operator view.
218
+ - **Aircraft:** correct silhouette and airfoil/control-surface relationships first, then
219
+ skin panel boundaries, access covers, cowling fasteners, rivet rows following structural
220
+ attachments, hinges, intakes, exhausts, landing-gear joints, lights and antennas. Markings,
221
+ warning stencils, serials and decals should conform to the actual skin without floating or
222
+ z-fighting. Use references for the relevant variant: do not add a uniform rivet grid, rivet
223
+ transparent glazing, or expose rivets over filled/painted laminar-flow wing surfaces.
224
+ Record approximate fastener placement as approximate, not an engineering-accurate rivet map.
225
+ - **Boats:** a credible hull, sheer, transom and waterline, deck and cabin openings, glazing,
226
+ rails and stanchions, cleats/fairleads, mooring fittings, hatches, navigation lights, life
227
+ rings, propulsion hardware and a furnished helm. Sailboats add mast fittings and plausible
228
+ standing/running rigging. Large ships need useful bridge detail even when the whole hull is
229
+ distant from the camera.
230
+
231
+ Use small geometry or an authored decal/normal atlas for millimeter-scale details according
232
+ to their visibility. Flush rivets should stay nearly flush; do not turn them into oversized
233
+ bolts. Consolidate repeated fasteners and lettering by material, preserving articulated
234
+ groups. A thousand rivets must not mean a thousand draws. Small neutral authored atlases are
235
+ allowed; photographs, baked lighting and unnecessary unique 4K maps are not the default.
236
+
237
+ The 60,000-triangle near budget is a ceiling for an ordinary complete vehicle, not a quota.
238
+ A good 6,000-triangle road vehicle can be better than a noisy 60,000-triangle one. Larger ships
239
+ or complex flight decks may justify more with measured draw, memory and frame-time evidence.
240
+ Keep most static detail within roughly eight material batches; glass, lights, animated parts
241
+ and specialist cockpit materials can justify additional batches.
242
+
243
+ At medium distance, remove tiny fasteners, fine lettering, seat stitching and small fittings
244
+ first; retain windows, wheel proportions, control surfaces and recognizable livery. At far
245
+ distance use the existing instanced traffic/parking proxies or an authored simpler model.
246
+ Model-owned detail must not disappear while occupied. Record which distance fallback the host
247
+ actually uses; authoring a high-detail GLB alone does not install an LOD system.
248
+
249
+ Review the current model in neutral daylight with reflections and shadows: front/side/rear,
250
+ three-quarter, operator-eye, a close detail and normal chase/traffic distance. Check opacity,
251
+ outward normals, clear sight lines, wheel/propeller/rotor pivots, steering or gear travel,
252
+ rider/seat fit, boarding and scale. Validate and drive the same registered type headlessly.
253
+ Keep bulk captures local under `shots/` or `.artifacts/`, with concise hash-bound evidence and
254
+ one or two small summary previews.
255
+
256
+ ### Vehicle reference overlays
257
+
258
+ **Authoring goal: use calibrated drawing/photo overlays to verify the exterior and interior
259
+ of every vehicle.** This applies to road, rail, air and water vehicles, including Bendy models,
260
+ new assets and revisions. Aim for front, side and top exterior comparisons, plus the dashboard,
261
+ cockpit or helm and the surrounding cabin. Make comparisons during shape construction and
262
+ repeat affected views after corrections; a final decorative comparison sheet is insufficient.
263
+ For Bendy designs, use a documented design drawing or suitable real-world exemplars to check
264
+ plausible proportions and ergonomics, without claiming an exact make or variant match.
265
+
266
+ Suitable references will not always exist. This is a strong default authoring goal, not a
267
+ requirement to invent evidence or block all work on an undocumented vehicle. Record which
268
+ views were sought, which were usable, and why a particular overlay could not be made. Use
269
+ published dimensions, multiple photographs and explicit reconstruction assumptions for the
270
+ remaining work. Mark exterior and interior confidence separately; an unavailable cockpit
271
+ drawing does not invalidate a supported exterior comparison or establish cockpit accuracy.
272
+
273
+ For an identified real vehicle, the review must compare the actual geometry with references:
274
+
275
+ 1. Establish the exact variant and configuration. Gather useful exterior views and an
276
+ unobscured cabin view, plus a dimensioned drawing when available. A licensed photo of a
277
+ seat, canopy or exterior does not establish an instrument layout. Record missing views.
278
+ 2. Overlay front, side and top orthographic renders with suitable drawings. For photographs,
279
+ match camera position, orientation and field of view before comparing. Check major
280
+ landmarks in meters: axles, rotor
281
+ mast, wing roots, glazing corners, roof breaks, intakes and tail junctions. Distinguish
282
+ body length from overall length including rotors, propellers or appendages. Record the
283
+ measurements and discrepancies; do not claim an overlay comparison if none was made.
284
+ 3. Correct the silhouette, cross sections, openings and major panel shapes before adding
285
+ rivets, lettering or small controls. Shared generators may supply construction utilities;
286
+ a generic body scaled to published dimensions is not an aircraft-specific airframe.
287
+ 4. Compare the operator view and wide cabin with the correct variant's references. Aim for
288
+ overlays of the panel face and cabin sections where drawings exist, and matched-camera
289
+ overlays for photographs. Verify panel outline, depth and tilt, instrument positions and
290
+ sizes, seat/pedal relationships, console position and windshield framing. A frontal panel
291
+ image cannot establish cabin depth; review an additional angle or section. A repeated
292
+ six-pack or a different display count is insufficient.
293
+ 5. Establish a convincing representative model before expanding a family, then review every
294
+ member individually. Record visual acceptance separately from geometry validity, flight
295
+ tests and resource budgets. Unresolved silhouette or cabin mismatches leave the model a
296
+ prototype; successful rendering, triangle counts and reference citations do not pass it.
297
+
298
+ Use these rules to make an overlay meaningful:
299
+
300
+ - **Calibrate before judging.** Identify the reference variant, source/page, projection,
301
+ units and configuration (gear, steering, rotor azimuth, control surfaces). Set scale from
302
+ published dimensions or measured controls and align a fixed datum. Check additional
303
+ landmarks that were not used to align the images. Do not fit each body part independently.
304
+ - **Preserve proportions.** Normally use uniform scale, translation and rotation. Never
305
+ stretch or locally warp a drawing or render to make the model agree. Correct scan distortion
306
+ only when independent reference measurements establish it; record the original image,
307
+ controls and correction. Photo perspective and lens distortion require a documented camera
308
+ match or correction, not an arbitrary affine fit of a three-dimensional vehicle.
309
+ - **Keep disagreement visible.** Use a contrasting transparent outline, opacity toggle or
310
+ difference view alongside the unmodified reference and render. Inspect the actual overlay
311
+ at useful resolution. Note landmark offsets, missing volumes and uncertain boundaries;
312
+ do not treat a global pixel score as a fidelity verdict. Choose tolerances appropriate to
313
+ reference resolution, vehicle scale and the player's viewing distance, and record them.
314
+ - **Review both inside and outside.** Exterior bounds do not validate the cabin. Check glazing
315
+ and panel openings, coaming and console volumes, seat/eye/control relationships and clearance,
316
+ not just instrument count. Preserve a clear seated view while matching the reference.
317
+ - **Retain reproducible evidence.** Record source/author/license, reference image hash or
318
+ revision, model source/runtime hashes, camera/projection, crop, scale, alignment controls,
319
+ measurements, inspected views, corrections and unresolved gaps. Distinguish a measured
320
+ overlay, a qualitative photo comparison and an unsupported assumption. Keep bulk references,
321
+ overlays and iteration captures local under `shots/` or `.artifacts/`; retain concise reports
322
+ and one or two small summary previews under the normal model-review image policy. Required
323
+ authored source inputs remain in the source bundle. A saved citation alone is not a review.
324
+
325
+ ### Bendy house brand
326
+
327
+ Generic vehicles use **Bendy** display names: Bendy Sedan, Bendy Pickup, Bendy Motorcycle,
328
+ Bendy Bus, Bendy Light Rail and Bendy Small Airliner, as well as Bendy names for boats and
329
+ bicycles. Apply the name to source titles, runtime labels, documentation and visible badges.
330
+ Keep stable asset/type IDs so existing scenes and saved references continue to resolve.
331
+
332
+ Identified real vehicles retain their actual identities: **P-51D Mustang** and **OH-6** are
333
+ the first examples. Future models such as a 2024 Ford Mustang require variant-specific
334
+ reference and proportion work; Bendy styling is not a substitute for the real vehicle.
335
+
174
336
  ## Textures and materials
175
337
 
176
338
  - Use the shared material graphs in the default style pack (brick, siding, render, concrete,
@@ -179,11 +341,17 @@ Geometry rules:
179
341
  lists repeat sizes and intended use.
180
342
  - Textures are 256² seamless and low contrast, with true physical repeats: a 2 m facade holds
181
343
  2 m of brick courses, not two giant bricks.
344
+ - Roof coverings show their structure from the street and the air: the shared asphalt shingle
345
+ varies its tone tab by tab, shades the narrow band under each course and carries a stepped
346
+ course normal; the flat-roof membrane shows its lapped roll seams. Keep that structure in a
347
+ new roof graph, with the same near-white average.
182
348
  - A material graph that will be tinted averages near white (sRGB 0.85 or above), so palettes
183
349
  keep their meaning.
184
350
  - Never bake directional light, shadows, ambient occlusion or dirt gradients into base color.
185
- - Glass is a dark blue-grey pane with a modest reflection, not a mirror. Identity lettering is
186
- geometry or vertex color, not a texture per business.
351
+ - Glass is a dark blue-grey pane with a modest reflection, not a mirror: the shared window graphs
352
+ give frames a satin roughness and panes a smooth one, so the sky reflects in the pane and
353
+ brightens it toward grazing angles. Identity lettering is geometry or vertex color, not a
354
+ texture per business.
187
355
  - Photographs from research are evidence, not textures, and never ship inside a model.
188
356
 
189
357
  ## Procedural buildings that fit any footprint
@@ -255,33 +423,104 @@ Further rules:
255
423
  ## Ground
256
424
 
257
425
  Large map polygons (a lawn, a meadow, a forest floor) are one color edge to edge, so the ground
258
- gets variation from two cheap sources rather than from per-polygon textures:
426
+ gets variation from cheap sources rather than from per-polygon textures:
259
427
 
260
428
  - **The ground shader.** `createTerrainGroundMaterialAsync` from `@bendyline/molen-terrain/client`
261
429
  multiplies terrain and landcover vertex colors by world-space value noise: broad 64 m mottling,
262
- 16 m patches, 4 m clumps and 1 m grain, plus straw-colored dry areas and darker lush ones on
263
- green ground only, so paving, sand and rock keep their hue. Finer layers fade out before they
264
- fall below a pixel. It costs no geometry, texture or upload. The Earth view uses it by default;
265
- the World Explorer's `?ground=flat` turns it off for comparison.
430
+ 16 m patches, 4 m and 2 m clumps, 1 m grain, half-meter grain and, within a few meters of a
431
+ street-level camera, blade-scale grain about 9 cm across, plus
432
+ straw-colored dry areas, darker lush ones, a gentle drift between yellower and bluer greens
433
+ and small, faint specks of bare soil, on green ground only, so paving, sand and rock keep their
434
+ hue. Turf mottled darker turns slightly bluer, lighter turf slightly yellower, and on turf the
435
+ 4 m, 2 m, 1 m and half-meter layers are calmed in favor of quarter-meter grain: blotches from
436
+ half a meter to a few meters across, and a strong blue/yellow split between them, read as
437
+ camouflage from 10–40 m. Past about 18 m the layers from 4 m patches down to quarter-meter grain
438
+ ease by 70% and the soil specks by 60% (up close they read as grass, from a rooftop as
439
+ blobs), and turf mottle eases by a further 55% between 40 and 160 m away, where a lawn reads
440
+ as an even sward. The 2 m-and-finer layers fade out entirely between 60 and 120 m, so a lawn
441
+ filling an aerial view skips their lookups (it had run that view GPU-bound).
442
+ Green ground also loses a sixth of its saturation, so sunlit turf reads as grass, not lime,
443
+ and is then tinted a little greener and darker (sunlit lawns had drifted to a pale olive).
444
+ The same noise raises a few centimeters of relief that catches the sun. Finer layers fade out
445
+ before they fall below a pixel. It costs no geometry, texture or upload. The Earth view uses
446
+ it by default; the World Explorer's `?ground=flat` turns it off for comparison.
447
+ - **Soft class boundaries.** Neighboring land classes interpenetrate over about 9 m along a
448
+ ragged, noise-driven edge instead of meeting along a straight polygon edge, broken into
449
+ half-meter tufts and then blade-scale specks close to the camera; within the last few meters
450
+ the edge keeps only its broad wander, where tufts would read as torn paper. Mapped fields keep
451
+ their crisp edges. Landcover meshes carry the pair of classes and the blend weight per vertex.
266
452
  - **Ground cover.** Knee-high tussocks, ferns, small shrubs and stones from scatter rules on the
267
453
  `groundcover` layer (see [worldgen](worldgen.md)). They draw near the camera only, under 70
268
454
  triangles each, from their own budget so they never thin the trees, and not at Economy quality.
269
455
 
270
456
  New ground palettes stay inside the lawn and forest bands in the palette table: the shader
271
- already brightens and darkens them by about ±12% and tints dry patches toward straw.
457
+ already brightens and darkens them by about ±10% and tints dry patches toward straw.
458
+
459
+ Roads, sidewalks, markings and lots use the companion `createTerrainPavementMaterialAsync`:
460
+ asphalt aggregate, polished wheel tracks, an oil line, gutter grit and the odd repaired section on
461
+ roads, oil stains in lots, saw-cut slabs on sidewalks and curbs, a paver grid on plazas, and
462
+ markings worn through to the asphalt. It reads coordinates the surface builder stores along each
463
+ band, so the detail follows the road instead of the world grid. Where paving meets bare ground (a
464
+ sidewalk's lawn side, a footpath, a shoulder, the rim of a lot) its edge frays into the ground
465
+ instead of ending on a ruled line: grass blades and tufts of lawn over cast paving, a wavier
466
+ 10 cm edge on dirt and gravel. See
467
+ [surface rendering](surface-rendering.md).
272
468
 
273
469
  ## Vehicles, aircraft, trees and figures
274
470
 
275
- - **Hero entities get more.** The car or aircraft the player controls may use the high end of
276
- its budget, smooth hulls where the real object is curved, and an interior. Ambient copies of
277
- the same type use a lower level of detail and a proxy at distance.
471
+ - **Controllable vehicles require close detail.** Follow the close-view vehicle standard above:
472
+ readable controls, fittings and interiors are part of the model. Ambient copies retain a
473
+ simple silhouette and use the host's distance proxy where available.
278
474
  - **Vehicles are chunky but true.** Wheel arches, glasshouse and stance carry the type. Paint is
279
475
  one shared material with per-instance color from a palette of real car colors. Glass is one
280
476
  dark material.
281
- - **Trees are faceted.** Use 6–12-sided conifers and icosahedral crowns with flat shading, a
282
- slightly darker base, and varied heights. Never use alpha-card foliage.
283
- - **Figures stay stylized.** Mitten hands, disc eyes and block shoes keep them out of the uncanny
284
- valley; see [figures](figures.md).
477
+ - **Trees are faceted, with leaf-card crowns.** Use conifers of 5–12 sides by detail level,
478
+ with flat shading, a slightly darker base, and varied heights. Generated conifers stack
479
+ drooping bough tiers, each skirt flaring over the narrower top of the one below, so they read
480
+ as firs and cedars rather than smooth cones; up close and at medium distance, fir-spray bough
481
+ cards lie along each skirt from its neck to just past its rim (thirty-seven up close, ten at
482
+ medium distance), so the skirts show needles and their edges are feathered rather than cut in
483
+ facets. Broadleaf crowns up close and at medium distance are leaf cards: small double-sided
484
+ quads that the alpha test cuts out along a sprig of leaves, crossed in clusters over the
485
+ crown's shell (twenty clusters of four cards up close, six of three at medium distance) around
486
+ a solid core in the crown's own shade, so the outline breaks into sprigs of leaves and the gaps
487
+ show foliage rather than sky. Plants are sized by their foliage, not by the cards' clear
488
+ corners. A distant crown is one faceted volume (six-sided and lumpy for broadleaf trees), drawn
489
+ opaque. Clear atlas texels carry the tone of the leaves beside them, so filtering never blends
490
+ a pale rim into a card's cut edge. Cards are for tree crowns only, and only
491
+ through the shared scatter material: no alpha blending, no per-species textures, no cards on
492
+ buildings, fences or ground cover. That material (`createScatterMaterialAsync` from
493
+ `@bendyline/molen-worldgen/client`) carries the one foliage atlas, generated at startup
494
+ (512×256: a sprig of leaves, a fir spray, and an opaque white block that every other surface
495
+ samples), cuts the cards at half alpha with alpha to coverage, and keeps the share of texels
496
+ that pass at every mip level, so distant cards do not thin out. It adds the
497
+ rest in the shader: leaf speckle and clumps, irregular bough tiers, and occlusion from the base
498
+ of the crown to a lighter tip, read from a per-vertex `canopy` height the model library writes.
499
+ Generated crowns bend their foliage normals toward the crown's rounded volume, so a crown
500
+ shades as one soft mass. Each cluster catches the light a little differently from its
501
+ neighbors, its cards darken toward their lower edge, and the core sits in the crown's shade.
502
+ Cards cast leafy shadows through the same cut. On WebGPU the cut is a node (`alphaTestNode`,
503
+ with `maskShadowNode` for the shadow pass) rather than `alphaTest`: Three copies each caster's
504
+ `alphaTest` onto the light's one shadow-pass material, and every switch between a carded and a
505
+ solid caster made all later casters rebuild their render keys, every frame. Each scattered plant drifts a little in hue,
506
+ warmth and shade, so an autumn stand ranges from yellow to russet rather than one swatch.
507
+ - **Generated buildings weather in the shader.** The shared facade and roof textures repeat on
508
+ every house, so `createBuildingWeatheringAsync` (`@bendyline/molen-worldgen/client`, passed as
509
+ a material set's `decorate`) drifts each stretch of wall and roof a little in tone, runs faint
510
+ rain streaks down walls and lays weathered patches with a touch of lichen on roofs. Do not bake
511
+ that grime into the shared textures; authored landmark models carry their own.
512
+ - **Houses carry their own details.** North American homes have dark shutters, the odd dormer
513
+ and a chimney, and lap-sided homes case their outside corners with trim boards
514
+ (`cornerBoards`), all in the shared trim and roof materials, so they cost vertices but no draws.
515
+ The High tier's finest tiles budget 900,000 building vertices so a dense suburban block stays
516
+ fully detailed near the camera instead of dropping to simplified stand-ins. On WebGL, which
517
+ pays full price for every building and plant draw, the Earth view and the explorer ask for a
518
+ compact scene (`compact` on the semantic renderers): 320,000 building vertices and half the
519
+ plant scatter. The regional shop
520
+ and civic styles put a full-size rooftop unit on about every 150 m² of flat roof (2–14 a roof).
521
+ - **Humans use polygonal realism.** Model facial relief, shaped hands and footwear, and clear
522
+ garment construction on the shared animated skeleton. Spend close-view triangles on these
523
+ features and retain cheaper crowd tiers; see [figures](figures.md).
285
524
 
286
525
  ## Rendering modes
287
526
 
@@ -304,6 +543,11 @@ keep roofs darker than walls and to avoid baked shading. Hosts choose a fixed mo
304
543
  Run this review for every new or changed model, style or palette. A successful build is not a
305
544
  visual approval.
306
545
 
546
+ Perform these checks during the same continuous pass that builds the model. Reuse the brief,
547
+ reference pictures and map fit already established; do not restart research in a separate
548
+ validation phase. Choose views that cover several checks together, fix observed defects and
549
+ record the completed result once. Revisit it when a defect or relevant change warrants it.
550
+
307
551
  1. **Silhouette.** Render with textures off and flat shading. Name the object from the
308
552
  silhouette alone, at skyline distance.
309
553
  2. **Budget.** Record triangles, materials and draw calls per level, and check them against the
@@ -91,8 +91,11 @@ verticalRadius: 40 })` with `update(root, x, z, y)` keeps ground far below an ai
91
91
  tree entirely. Queries reach at most `radius - rebuildDistance` from the subject. Leave
92
92
  `verticalRadius` unset for a walker, whose placement ray scans the whole column.
93
93
 
94
- Meshes opt out with `userData.walkIgnore = true`. Water materials and landcover overlays are never
95
- solid. A missing terrain tile pauses movement until it arrives, rather than dropping the walker.
94
+ Meshes opt out with `userData.walkIgnore = true`; world-generation ground cover does, so walkers
95
+ pass through ferns and moss. Water materials and landcover overlays are never solid. An aircraft can
96
+ pass `instanceBounds: true`, which collides with each instance of an instanced mesh as its bounding
97
+ box rather than its triangles. A missing terrain tile pauses movement until it arrives, rather than
98
+ dropping the walker.
96
99
 
97
100
  ## Follow
98
101
 
@@ -23,6 +23,11 @@ agents can extend without collisions. `molen new <name>` scaffolds all of this.
23
23
  Every op discovers the project by walking up from the scene/cwd (or takes `--project`), so
24
24
  `molen sim run main --ticks 30` works by scene *name*. `molen project info` prints the summary.
25
25
 
26
+ Asset ids use dot-separated lowercase letters, digits and underscores. The first segment starts
27
+ with a letter; later segments may start with a digit, as in `landmark.30_st_mary_axe`.
28
+ The same asset ids work in type asset references and content pack indexes. Type ids, namespace
29
+ reservations and pack ids still require each segment to start with a letter.
30
+
26
31
  ## The type registry (`molen/types@1`)
27
32
 
28
33
  A types document declares entity types under one dotted namespace: default components, doc
@@ -163,3 +163,9 @@ Raw model buffers are available through `generateLandmarkModel` and `generateSig
163
163
 
164
164
  The data and shapes are intentionally stylized. Mapping accuracy, coverage and source freshness
165
165
  bound recognition. A sign treatment must not be interpreted as recovered photographic appearance.
166
+
167
+ ## Font-backed sign names
168
+
169
+ Storefront sign designs select a `font` id or role and optional `letterSpacing`. Pass the host's
170
+ font library to `ModelLibrary` or the standalone sign generators; Earth content wires this
171
+ automatically. See [Fonts and lettering](typography.md) for loading faces and generating labels.
@@ -0,0 +1,94 @@
1
+ # Regional vehicle fleets
2
+
3
+ Earth traffic and parked cars share a small fleet catalog. It assigns relative weights to existing
4
+ vehicle type IDs and contains no models. China, Japan, Korea, several European, South American and
5
+ African markets, and North America have separate mixtures. These are visual approximations, not
6
+ sales or registration statistics. Unknown areas use a global fallback. Aircraft and ships keep
7
+ their independent global pools.
8
+
9
+ ## Content and selection
10
+
11
+ Publish `molen/fleet-catalog@1` documents through `provides.fleet` in a content pack. The stock
12
+ catalog is `content/entities/fleets/road.json`. Each has `id`, integer `version`, `description`,
13
+ `fallback`, atlas `regions` bindings, and named `profiles` with `title`, optional `extends`, and
14
+ `weights`. All parents and bindings in a standalone document must resolve. Positive weights are
15
+ relative prevalence; zero excludes an inherited model. Missing models are filtered against the
16
+ loaded type library. Cycles and duplicate profile IDs or region bindings are rejected.
17
+
18
+ ```json
19
+ {
20
+ "format": "molen/fleet-catalog@1",
21
+ "id": "example.fleet",
22
+ "version": 1,
23
+ "description": "Illustrative road mix",
24
+ "fallback": "global",
25
+ "regions": { "library.china": "china" },
26
+ "profiles": [
27
+ { "id": "global", "title": "Global", "weights": { "example.compact": 1 } },
28
+ { "id": "china", "title": "China", "extends": "global", "weights": {
29
+ "example.seagull": 12, "example.qin": 10, "example.compact": 0.5
30
+ } }
31
+ ]
32
+ }
33
+ ```
34
+
35
+ `createFleetLibrary` from `@bendyline/molen-ambient/kernel` resolves inheritance and makes a stable
36
+ weighted shortlist: default 16 distinct models per profile, retaining the four most common types
37
+ and sampling the rest without replacement. The profile name seeds selection; camera movement,
38
+ download completion and property order do not change it. Paint palettes add variety without more
39
+ geometry. A model can appear in many profiles through the same asset ID.
40
+
41
+ `loadEarthContent` reads fleet metadata and the Earth atlas even when architectural styling is
42
+ disabled. `createEarthFleet` from `@bendyline/molen-earth` resolves only fleet-bound atlas regions,
43
+ so a local architectural overlay cannot hide its country's fleet. Moving traffic chooses at its
44
+ spawn position. Parking chooses at the terrain tile center and passes weighted specifications and
45
+ colors into both synchronous and worker generation; border parking follows the tile's profile.
46
+ Existing traffic changes naturally through despawning, without replacing a car being watched.
47
+
48
+ `mountEarthView` wires this automatically. Set `fleet: { maxModels: 12 }` for a smaller shortlist
49
+ (valid range 1–128). Custom hosts pass `fleet.carsAt` to `EarthAmbient`/`installAmbient`, and
50
+ `fleet.parkedAt` as the third argument of `createTerrainSurfaceRenderer`. Hosts without fleet
51
+ content retain their original behavior.
52
+
53
+ ## Downloads and residency
54
+
55
+ World Explorer builds an entity archive for distribution and a versioned directory manifest for
56
+ browser use. The index points to `molen-pack.json`, so even a static server without HTTP Range
57
+ downloads only requested GLBs. Opening the catalog fetches no GLBs; distant traffic and parking
58
+ use instanced proxies. Explicit player selection may load any vehicle. Node pack hosting also
59
+ accepts a hosted directory index. Content hashes identify shared files in the Earth byte cache.
60
+
61
+ Directory reads share transfers. Cancelling one reader preserves another reader's request; when
62
+ the last reader cancels, queued or active work is aborted. Failed/aborted reads can retry. The
63
+ directory pack's byte cache defaults to 16 MiB with least-recently-used eviction. Browser HTTP and
64
+ IndexedDB storage are separate from decoded Three.js models.
65
+
66
+ The ambient detailed vehicle pool defaults to four idle instances, two concurrent loads and
67
+ 32 MiB of estimated geometry/decoded-texture buffers. Active count also respects `detailedCars`.
68
+ Cars and boats have separate bounded pools. Idle instances are evicted least recently used first;
69
+ a model that would exceed the byte budget stays a proxy. Eviction disposes geometry, material
70
+ clones and textures; late loads after cancellation or disposal are discarded. GPU bookkeeping,
71
+ JS object overhead and temporary decoding allocations are outside this estimate, so it is a
72
+ residency budget rather than a process-wide memory ceiling.
73
+
74
+ Configure `idleVehicleModels`, `vehicleModelBytes`, and `vehicleLoads` on `EarthAmbientSettings`
75
+ or `AmbientRenderBudget`. Zero idle retention is supported. Parking independently loads at most
76
+ eight nearby detailed cars with two background requests. Driven cars retain simulation state but
77
+ release their model outside the near set. The mounted car and explicitly host-owned cars are
78
+ exceptions, owned until removal. Aircraft keep their existing budget.
79
+
80
+ ## Coverage and authoring
81
+
82
+ The initial expansion adds 24 shared models, predominantly 2024 plus the 2025 four-door Wuling
83
+ Hongguang MINI EV. Profiles also reuse older and US-market models. Country-specific trim,
84
+ steering variants, fleet age distributions and local commercial coverage remain approximate.
85
+ The atlas groups the Korean peninsula; that fleet profile primarily represents South Korea.
86
+ Some shared models use export-market bodies or steering layouts. Road driving side comes from
87
+ Earth's country sign geography, shared by traffic, markings and signals; an explicit ambient
88
+ `drivingSide` overrides it. Fleet prevalence does not change traffic rules. Unbound regions fall back.
89
+
90
+ Add a model once and reference its ID in appropriate profiles. Preserve older cars and several
91
+ body classes. Every drivable model follows [Medium-fi](medium-fi.md) close-view requirements:
92
+ clear driver sightlines, modeled cabin and controls, named moving wheels/steering, glazing,
93
+ coherent lamps and panel details. Keep bulk captures local. The entities pack's
94
+ `REGIONAL-VEHICLES.md` and `regional-vehicles-review.json` hold the roster and hash-bound review.