@bendyline/molen-tooling 0.0.11 → 0.0.13

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 (70) hide show
  1. package/dist/capture/harness.js +682 -293
  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 +27 -2
  6. package/dist/docs-src/guide/adaptive-performance.md +42 -7
  7. package/dist/docs-src/guide/aircraft.md +249 -27
  8. package/dist/docs-src/guide/ambient-life.md +28 -5
  9. package/dist/docs-src/guide/audio.md +19 -5
  10. package/dist/docs-src/guide/boats.md +9 -4
  11. package/dist/docs-src/guide/boost-mode.md +64 -0
  12. package/dist/docs-src/guide/building-interiors.md +7 -2
  13. package/dist/docs-src/guide/determinism.md +1 -1
  14. package/dist/docs-src/guide/dioramas.md +17 -4
  15. package/dist/docs-src/guide/earth-view.md +225 -24
  16. package/dist/docs-src/guide/entities.md +87 -5
  17. package/dist/docs-src/guide/figures.md +31 -7
  18. package/dist/docs-src/guide/graphics-performance.md +203 -24
  19. package/dist/docs-src/guide/input.md +34 -1
  20. package/dist/docs-src/guide/liveries.md +167 -0
  21. package/dist/docs-src/guide/livery-catalog.md +2659 -0
  22. package/dist/docs-src/guide/livery-gallery.md +2684 -0
  23. package/dist/docs-src/guide/medium-fi.md +279 -27
  24. package/dist/docs-src/guide/navigation.md +5 -2
  25. package/dist/docs-src/guide/night-lighting.md +96 -0
  26. package/dist/docs-src/guide/project.md +6 -1
  27. package/dist/docs-src/guide/recognizable-places.md +6 -0
  28. package/dist/docs-src/guide/regional-fleets.md +94 -0
  29. package/dist/docs-src/guide/regional-world.md +19 -6
  30. package/dist/docs-src/guide/rendering-backends.md +6 -2
  31. package/dist/docs-src/guide/sky.md +36 -3
  32. package/dist/docs-src/guide/structure-library.md +4 -1
  33. package/dist/docs-src/guide/surface-rendering.md +276 -2
  34. package/dist/docs-src/guide/terrain.md +43 -0
  35. package/dist/docs-src/guide/typography.md +105 -0
  36. package/dist/docs-src/guide/vehicle-interiors.md +169 -9
  37. package/dist/docs-src/guide/vehicles.md +26 -3
  38. package/dist/docs-src/guide/weather.md +15 -8
  39. package/dist/docs-src/guide/worldgen.md +100 -13
  40. package/dist/docs-src/llms.txt +9 -1
  41. package/dist/docs-src/schemas/README.md +3 -0
  42. package/dist/docs-src/schemas/archstyle.md +65 -0
  43. package/dist/docs-src/schemas/components.md +2009 -213
  44. package/dist/docs-src/schemas/fleet-catalog.md +113 -0
  45. package/dist/docs-src/schemas/landmark.md +10 -0
  46. package/dist/docs-src/schemas/matgraph.md +11 -1
  47. package/dist/docs-src/schemas/pack-source.md +11 -1
  48. package/dist/docs-src/schemas/pack.md +1 -1
  49. package/dist/docs-src/schemas/project.md +1 -1
  50. package/dist/docs-src/schemas/regional-catalog.md +39 -0
  51. package/dist/docs-src/schemas/scatter.md +36 -0
  52. package/dist/docs-src/schemas/structure-placement-data.md +753 -0
  53. package/dist/docs-src/schemas/structure-placement-index.md +87 -0
  54. package/dist/docs-src/schemas/structure-placements.md +274 -0
  55. package/dist/docs-src/schemas/transport-network.md +8 -0
  56. package/dist/docs-src/schemas/types.md +1 -1
  57. package/dist/docs-src/schemas/worldgen-batch.md +145 -0
  58. package/dist/index.d.mts +2 -0
  59. package/dist/index.mjs +1 -1
  60. package/dist/{mcp-BbxqqnD1.mjs → mcp-BXaK46X-.mjs} +1 -1
  61. package/dist/{ops-b4Pag8U-.mjs → ops-Cm7WNvb9.mjs} +55 -22
  62. package/dist/templates/city-courier/gen/molen-types.ts +240 -17
  63. package/dist/templates/city-courier/scripts/molen-scripts.d.ts +240 -17
  64. package/dist/templates/figures-gallery/test/headless.test.ts +2 -1
  65. package/dist/templates/index.json +17 -17
  66. package/dist/templates/skybound/gen/molen-types.ts +240 -17
  67. package/dist/templates/skybound/scripts/molen-scripts.d.ts +240 -17
  68. package/dist/templates/top-down-arena/scripts/molen-scripts.d.ts +240 -17
  69. package/dist/templates/top-down-arena/src/gen/molen-types.ts +240 -17
  70. 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,13 +53,13 @@ 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 | Near-neutral white `#fff8f0`, intensity 6.1, `referenceElevation` 26° | Sunlit horizontal faces render near their authored color at any time of day: above 26° the rig adapts as a camera's exposure would, so midday is not brighter than the palette |
57
+ | Sky fill | `dayAmbient` 1.25 from the sky dome at `skyLightSaturation` 0.3, warm ground bounce `#9a8f70` | Faces in shade sit at roughly a third of lit faces, gently cool rather than blue, so slopes, streets 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
- | Water | `#286d83` with a soft sky reflection | Lakes and bays read clearly blue, never grey |
62
+ | Water | Deep teal `#1b4450` with a soft sky reflection; hosts may tint it per region (Puget Sound near-black navy, Sydney Harbour green-teal) | Water absorbs most light: from above it is far darker than land. Keep ripples legible nearby; fade small wave detail at airplane distance |
62
63
 
63
64
  Two consequences matter for authoring:
64
65
 
@@ -99,15 +100,20 @@ where real buildings have it. Avoid both grey-on-grey and candy color.
99
100
  | Urban wall: concrete, panel, limestone | 55–90% | 0–25% | light concrete `#d2cec5`, limestone `#ddd6c6`, cool grey `#b8bfc4`, graphite `#8f9397` |
100
101
  | Masonry, brick, timber walls | 45–65% | 25–45% | brick `#a8634b`, sandstone `#c9ab84`, cedar `#a77a54` |
101
102
  | Pitched roof (shingle, tile, slate) | 35–50% | 6–40% | charcoal `#575c62`, brown `#725c49`, moss `#5a6d55`, terracotta `#a5644b` |
102
- | Flat roof (membrane, gravel) | 62–80% | 0–12% | gravel `#a9a59c`, membrane `#c4c0b6` |
103
+ | Flat roof (membrane, gravel) | 45–90% | 0–12% | white membrane `#e6e6e2`, pale grey `#d3d4d0`, gravel `#b0a693`, dark membrane `#74777b`; mostly pale, a few dark |
103
104
  | Trim and frames | 85–95% or 22–30% | 0–30% | white `#f4f1ea`, dark frame `#3b3e42` |
104
105
  | Untextured window glass | 35–45% | 20–30% | blue-grey pane `#4d6178` |
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 | 35–42% | 0–10% | road `#646766` (near neutral and weathered: from the air streets read mid grey; 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
 
112
+ Regional ground palettes in the `molen.ecology` pack depart from the generic bands on purpose:
113
+ they are calibrated against matched orthophotos of real cities. Desert and dry soil sits near
114
+ 45–50% lightness as a warm mid brown, not pale sand; Pacific Northwest lawns and woodland floor
115
+ read darker and bluer under their conifer canopy; dense blocks pave over their unmapped ground.
116
+
111
117
  Palette rules:
112
118
 
113
119
  - **Houses carry the hue; urban blocks stay mostly neutral.** A house palette gives at least a
@@ -144,7 +150,7 @@ Budgets are per model and per level of detail. The scene and tile budgets in
144
150
  | 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
151
  | Landmark or authored structure | Closeup ≤ 64,000 | Street ≤ 16,000, district ≤ 4,000 | Skyline ≤ 1,000 |
146
152
  | 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 |
153
+ | 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
154
  | Ambient car or bus | ≤ 2,000 drawn | — | Proxy ≤ 160 |
149
155
  | Tree | 240–450 | 120–140 | 12–20 |
150
156
  | Street furniture (lamp, bench, rack) | 50–500 | 50–150 | 36–72 or none |
@@ -163,7 +169,8 @@ Geometry rules:
163
169
  least a pixel or two wide. Cables, mullions, railings, guy wires and lattice members that fall
164
170
  below that move into a texture, merge into a solid panel, or drop out of that level. Sub-pixel
165
171
  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.
172
+ - **No micro-bevels on scenery.** Controllable vehicles may use small edge breaks where they
173
+ visibly explain construction at the driver's eye; remove them from distance representations.
167
174
  - **One draw per material.** Merge a model's parts by material. Two to five materials is
168
175
  typical; more than eight needs a reason.
169
176
  - **Instance repeats.** Seats, windows, bollards, lamps and trees are instanced or merged, never
@@ -171,6 +178,166 @@ Geometry rules:
171
178
  - **Ground contact.** The base sits at Y=0, or on a declared attachment plane, with no floating
172
179
  gap and no deep embedding.
173
180
 
181
+ ## Controllable vehicles: close-view fidelity
182
+
183
+ Every vehicle the player can drive, ride, fly or helm is a close-view subject. This includes
184
+ cars, pickups, motorcycles, bicycles, buses, rail vehicles, aircraft, small boats and ships.
185
+ The distant world remains medium-fi, but the player's vehicle must hold up from the seat and
186
+ when walking alongside it. Do not remove useful cockpit or mechanical detail merely to meet
187
+ an ambient traffic triangle budget. An ambient-only prototype should acquire controls, seats,
188
+ collision and a usable operator view as it becomes a finished vehicle.
189
+
190
+ Keep the inherently polygonal style: deliberate planes, clean curves with finite segments,
191
+ coherent paint colors and believable material response. Increase fidelity through shape and
192
+ construction, not a blanket of photographic textures or exaggerated dirt. A model should still
193
+ read correctly with textures disabled. Model the parts a nearby player can understand:
194
+
195
+ - **Road and rail:** proportioned body panels, real window openings and pillars, door and hood
196
+ gaps, wheel wells, tires with shoulders, rims, lug hardware, brake discs/calipers where visible,
197
+ lamps with housings, mirrors and stalks, wipers, grilles, handles, badges and plates. Bicycles
198
+ and motorcycles also need brake levers, grips, drivetrain, fork and suspension detail,
199
+ cooling fins, footrests and correct rider contact points. Rail wheels have steel treads and
200
+ flanges, not car tires.
201
+ - **Cabins and controls:** a clear forward view at the declared eye position, seats and
202
+ headrests, panel/coaming depth, bezels, gauge marks, display frames, pedals, switches and
203
+ readable nearby labels. Live steering wheels, yokes, levers and instrument needles retain
204
+ stable named pivots. Decorative instruments must not be described as live telemetry.
205
+ Calibrate live needles and their face markings from the same measured scale. Use named
206
+ component signals and derived expressions with explicit units, local pivot axes, wraparound,
207
+ response and missing-data behavior; see [instrument wiring](vehicle-interiors.md#named-variables-and-expressions).
208
+ Verify zero, intermediate and maximum readings, heading wraparound, bank/pitch independently,
209
+ and unavailable data from the seated view. Also check both directions of cockpit/control-surface
210
+ movement in the imported hierarchy: actual grip, pedal and trailing-edge travel. Neutral
211
+ overlays do not reveal reversed pivots. Record measurement approximations (for example,
212
+ geometric altitude versus pressure altitude) and leave unsupported systems visibly inactive.
213
+ Give each vehicle an authored cabin profile: match the model generation's instrument
214
+ placement, vent shapes, screen arrangement, selector and steering-wheel form before adding
215
+ small controls. Vary upholstery, door cards, storage, stitching and hardware where references
216
+ support it. A central speedometer must not become a later generation's infotainment circle;
217
+ a car with driver-only instrumentation must not receive a generic center screen. Generic
218
+ Bendy models need purpose-specific controls too: yacht binnacles, workboat radios, ship radar
219
+ consoles, bus door switches and rail traction desks. Record citable photo sources, authors,
220
+ exact licenses, model/trim mismatches and gaps; prefer public domain/CC0, then appropriately
221
+ attributed CC references. The image's license is separate from the code's license. Review
222
+ a wide cabin/detail view in addition to the forward operator view.
223
+ - **Aircraft:** correct silhouette and airfoil/control-surface relationships first, then
224
+ skin panel boundaries, access covers, cowling fasteners, rivet rows following structural
225
+ attachments, hinges, intakes, exhausts, landing-gear joints, lights and antennas. Markings,
226
+ warning stencils, serials and decals should conform to the actual skin without floating or
227
+ z-fighting. Use references for the relevant variant: do not add a uniform rivet grid, rivet
228
+ transparent glazing, or expose rivets over filled/painted laminar-flow wing surfaces.
229
+ Record approximate fastener placement as approximate, not an engineering-accurate rivet map.
230
+ - **Boats:** a credible hull, sheer, transom and waterline, deck and cabin openings, glazing,
231
+ rails and stanchions, cleats/fairleads, mooring fittings, hatches, navigation lights, life
232
+ rings, propulsion hardware and a furnished helm. Sailboats add mast fittings and plausible
233
+ standing/running rigging. Large ships need useful bridge detail even when the whole hull is
234
+ distant from the camera.
235
+
236
+ Use small geometry or an authored decal/normal atlas for millimeter-scale details according
237
+ to their visibility. Flush rivets should stay nearly flush; do not turn them into oversized
238
+ bolts. Consolidate repeated fasteners and lettering by material, preserving articulated
239
+ groups. A thousand rivets must not mean a thousand draws. Small neutral authored atlases are
240
+ allowed; photographs, baked lighting and unnecessary unique 4K maps are not the default.
241
+
242
+ The 60,000-triangle near budget is a ceiling for an ordinary complete vehicle, not a quota.
243
+ A good 6,000-triangle road vehicle can be better than a noisy 60,000-triangle one. Larger ships
244
+ or complex flight decks may justify more with measured draw, memory and frame-time evidence.
245
+ Keep most static detail within roughly eight material batches; glass, lights, animated parts
246
+ and specialist cockpit materials can justify additional batches.
247
+
248
+ At medium distance, remove tiny fasteners, fine lettering, seat stitching and small fittings
249
+ first; retain windows, wheel proportions, control surfaces and recognizable livery. At far
250
+ distance use the existing instanced traffic/parking proxies or an authored simpler model.
251
+ Model-owned detail must not disappear while occupied. Record which distance fallback the host
252
+ actually uses; authoring a high-detail GLB alone does not install an LOD system.
253
+
254
+ Review the current model in neutral daylight with reflections and shadows: front/side/rear,
255
+ three-quarter, operator-eye, a close detail and normal chase/traffic distance. Check opacity,
256
+ outward normals, clear sight lines, wheel/propeller/rotor pivots, steering or gear travel,
257
+ rider/seat fit, boarding and scale. Validate and drive the same registered type headlessly.
258
+ Keep bulk captures local under `shots/` or `.artifacts/`, with concise hash-bound evidence and
259
+ one or two small summary previews.
260
+
261
+ ### Vehicle reference overlays
262
+
263
+ **Authoring goal: use calibrated drawing/photo overlays to verify the exterior and interior
264
+ of every vehicle.** This applies to road, rail, air and water vehicles, including Bendy models,
265
+ new assets and revisions. Aim for front, side and top exterior comparisons, plus the dashboard,
266
+ cockpit or helm and the surrounding cabin. Make comparisons during shape construction and
267
+ repeat affected views after corrections; a final decorative comparison sheet is insufficient.
268
+ For Bendy designs, use a documented design drawing or suitable real-world exemplars to check
269
+ plausible proportions and ergonomics, without claiming an exact make or variant match.
270
+
271
+ Suitable references will not always exist. This is a strong default authoring goal, not a
272
+ requirement to invent evidence or block all work on an undocumented vehicle. Record which
273
+ views were sought, which were usable, and why a particular overlay could not be made. Use
274
+ published dimensions, multiple photographs and explicit reconstruction assumptions for the
275
+ remaining work. Mark exterior and interior confidence separately; an unavailable cockpit
276
+ drawing does not invalidate a supported exterior comparison or establish cockpit accuracy.
277
+
278
+ For an identified real vehicle, the review must compare the actual geometry with references:
279
+
280
+ 1. Establish the exact variant and configuration. Gather useful exterior views and an
281
+ unobscured cabin view, plus a dimensioned drawing when available. A licensed photo of a
282
+ seat, canopy or exterior does not establish an instrument layout. Record missing views.
283
+ 2. Overlay front, side and top orthographic renders with suitable drawings. For photographs,
284
+ match camera position, orientation and field of view before comparing. Check major
285
+ landmarks in meters: axles, rotor
286
+ mast, wing roots, glazing corners, roof breaks, intakes and tail junctions. Distinguish
287
+ body length from overall length including rotors, propellers or appendages. Record the
288
+ measurements and discrepancies; do not claim an overlay comparison if none was made.
289
+ 3. Correct the silhouette, cross sections, openings and major panel shapes before adding
290
+ rivets, lettering or small controls. Shared generators may supply construction utilities;
291
+ a generic body scaled to published dimensions is not an aircraft-specific airframe.
292
+ 4. Compare the operator view and wide cabin with the correct variant's references. Aim for
293
+ overlays of the panel face and cabin sections where drawings exist, and matched-camera
294
+ overlays for photographs. Verify panel outline, depth and tilt, instrument positions and
295
+ sizes, seat/pedal relationships, console position and windshield framing. A frontal panel
296
+ image cannot establish cabin depth; review an additional angle or section. A repeated
297
+ six-pack or a different display count is insufficient.
298
+ 5. Establish a convincing representative model before expanding a family, then review every
299
+ member individually. Record visual acceptance separately from geometry validity, flight
300
+ tests and resource budgets. Unresolved silhouette or cabin mismatches leave the model a
301
+ prototype; successful rendering, triangle counts and reference citations do not pass it.
302
+
303
+ Use these rules to make an overlay meaningful:
304
+
305
+ - **Calibrate before judging.** Identify the reference variant, source/page, projection,
306
+ units and configuration (gear, steering, rotor azimuth, control surfaces). Set scale from
307
+ published dimensions or measured controls and align a fixed datum. Check additional
308
+ landmarks that were not used to align the images. Do not fit each body part independently.
309
+ - **Preserve proportions.** Normally use uniform scale, translation and rotation. Never
310
+ stretch or locally warp a drawing or render to make the model agree. Correct scan distortion
311
+ only when independent reference measurements establish it; record the original image,
312
+ controls and correction. Photo perspective and lens distortion require a documented camera
313
+ match or correction, not an arbitrary affine fit of a three-dimensional vehicle.
314
+ - **Keep disagreement visible.** Use a contrasting transparent outline, opacity toggle or
315
+ difference view alongside the unmodified reference and render. Inspect the actual overlay
316
+ at useful resolution. Note landmark offsets, missing volumes and uncertain boundaries;
317
+ do not treat a global pixel score as a fidelity verdict. Choose tolerances appropriate to
318
+ reference resolution, vehicle scale and the player's viewing distance, and record them.
319
+ - **Review both inside and outside.** Exterior bounds do not validate the cabin. Check glazing
320
+ and panel openings, coaming and console volumes, seat/eye/control relationships and clearance,
321
+ not just instrument count. Preserve a clear seated view while matching the reference.
322
+ - **Retain reproducible evidence.** Record source/author/license, reference image hash or
323
+ revision, model source/runtime hashes, camera/projection, crop, scale, alignment controls,
324
+ measurements, inspected views, corrections and unresolved gaps. Distinguish a measured
325
+ overlay, a qualitative photo comparison and an unsupported assumption. Keep bulk references,
326
+ overlays and iteration captures local under `shots/` or `.artifacts/`; retain concise reports
327
+ and one or two small summary previews under the normal model-review image policy. Required
328
+ authored source inputs remain in the source bundle. A saved citation alone is not a review.
329
+
330
+ ### Bendy house brand
331
+
332
+ Generic vehicles use **Bendy** display names: Bendy Sedan, Bendy Pickup, Bendy Motorcycle,
333
+ Bendy Bus, Bendy Light Rail and Bendy Small Airliner, as well as Bendy names for boats and
334
+ bicycles. Apply the name to source titles, runtime labels, documentation and visible badges.
335
+ Keep stable asset/type IDs so existing scenes and saved references continue to resolve.
336
+
337
+ Identified real vehicles retain their actual identities: **P-51D Mustang** and **OH-6** are
338
+ the first examples. Future models such as a 2024 Ford Mustang require variant-specific
339
+ reference and proportion work; Bendy styling is not a substitute for the real vehicle.
340
+
174
341
  ## Textures and materials
175
342
 
176
343
  - Use the shared material graphs in the default style pack (brick, siding, render, concrete,
@@ -179,11 +346,17 @@ Geometry rules:
179
346
  lists repeat sizes and intended use.
180
347
  - Textures are 256² seamless and low contrast, with true physical repeats: a 2 m facade holds
181
348
  2 m of brick courses, not two giant bricks.
349
+ - Roof coverings show their structure from the street and the air: the shared asphalt shingle
350
+ varies its tone tab by tab, shades the narrow band under each course and carries a stepped
351
+ course normal; the flat-roof membrane shows its lapped roll seams. Keep that structure in a
352
+ new roof graph, with the same near-white average.
182
353
  - A material graph that will be tinted averages near white (sRGB 0.85 or above), so palettes
183
354
  keep their meaning.
184
355
  - 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.
356
+ - Glass is a dark blue-grey pane with a modest reflection, not a mirror: the shared window graphs
357
+ give frames a satin roughness and panes a smooth one, so the sky reflects in the pane and
358
+ brightens it toward grazing angles. Identity lettering is geometry or vertex color, not a
359
+ texture per business.
187
360
  - Photographs from research are evidence, not textures, and never ship inside a model.
188
361
 
189
362
  ## Procedural buildings that fit any footprint
@@ -255,33 +428,104 @@ Further rules:
255
428
  ## Ground
256
429
 
257
430
  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:
431
+ gets variation from cheap sources rather than from per-polygon textures:
259
432
 
260
433
  - **The ground shader.** `createTerrainGroundMaterialAsync` from `@bendyline/molen-terrain/client`
261
434
  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.
435
+ 16 m patches, 4 m and 2 m clumps, 1 m grain, half-meter grain and, within a few meters of a
436
+ street-level camera, blade-scale grain about 9 cm across, plus
437
+ straw-colored dry areas, darker lush ones, a gentle drift between yellower and bluer greens
438
+ and small, faint specks of bare soil, on green ground only, so paving, sand and rock keep their
439
+ hue. Turf mottled darker turns slightly bluer, lighter turf slightly yellower, and on turf the
440
+ 4 m, 2 m, 1 m and half-meter layers are calmed in favor of quarter-meter grain: blotches from
441
+ half a meter to a few meters across, and a strong blue/yellow split between them, read as
442
+ camouflage from 10–40 m. Past about 18 m the layers from 4 m patches down to quarter-meter grain
443
+ ease by 70% and the soil specks by 60% (up close they read as grass, from a rooftop as
444
+ blobs), and turf mottle eases by a further 55% between 40 and 160 m away, where a lawn reads
445
+ as an even sward. The 2 m-and-finer layers fade out entirely between 60 and 120 m, so a lawn
446
+ filling an aerial view skips their lookups (it had run that view GPU-bound).
447
+ Green ground also loses a sixth of its saturation, so sunlit turf reads as grass, not lime,
448
+ and is then tinted a little greener and darker (sunlit lawns had drifted to a pale olive).
449
+ The same noise raises a few centimeters of relief that catches the sun. Finer layers fade out
450
+ before they fall below a pixel. It costs no geometry, texture or upload. The Earth view uses
451
+ it by default; the World Explorer's `?ground=flat` turns it off for comparison.
452
+ - **Soft class boundaries.** Neighboring land classes interpenetrate over about 9 m along a
453
+ ragged, noise-driven edge instead of meeting along a straight polygon edge, broken into
454
+ half-meter tufts and then blade-scale specks close to the camera; within the last few meters
455
+ the edge keeps only its broad wander, where tufts would read as torn paper. Mapped fields keep
456
+ their crisp edges. Landcover meshes carry the pair of classes and the blend weight per vertex.
266
457
  - **Ground cover.** Knee-high tussocks, ferns, small shrubs and stones from scatter rules on the
267
458
  `groundcover` layer (see [worldgen](worldgen.md)). They draw near the camera only, under 70
268
459
  triangles each, from their own budget so they never thin the trees, and not at Economy quality.
269
460
 
270
461
  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.
462
+ already brightens and darkens them by about ±10% and tints dry patches toward straw.
463
+
464
+ Roads, sidewalks, markings and lots use the companion `createTerrainPavementMaterialAsync`:
465
+ asphalt aggregate, polished wheel tracks, an oil line, gutter grit and the odd repaired section on
466
+ roads, oil stains in lots, saw-cut slabs on sidewalks and curbs, a paver grid on plazas, and
467
+ markings worn through to the asphalt. It reads coordinates the surface builder stores along each
468
+ band, so the detail follows the road instead of the world grid. Where paving meets bare ground (a
469
+ sidewalk's lawn side, a footpath, a shoulder, the rim of a lot) its edge frays into the ground
470
+ instead of ending on a ruled line: grass blades and tufts of lawn over cast paving, a wavier
471
+ 10 cm edge on dirt and gravel. See
472
+ [surface rendering](surface-rendering.md).
272
473
 
273
474
  ## Vehicles, aircraft, trees and figures
274
475
 
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.
476
+ - **Controllable vehicles require close detail.** Follow the close-view vehicle standard above:
477
+ readable controls, fittings and interiors are part of the model. Ambient copies retain a
478
+ simple silhouette and use the host's distance proxy where available.
278
479
  - **Vehicles are chunky but true.** Wheel arches, glasshouse and stance carry the type. Paint is
279
480
  one shared material with per-instance color from a palette of real car colors. Glass is one
280
481
  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).
482
+ - **Trees are faceted, with leaf-card crowns.** Use conifers of 5–12 sides by detail level,
483
+ with flat shading, a slightly darker base, and varied heights. Generated conifers stack
484
+ drooping bough tiers, each skirt flaring over the narrower top of the one below, so they read
485
+ as firs and cedars rather than smooth cones; up close and at medium distance, fir-spray bough
486
+ cards lie along each skirt from its neck to just past its rim (thirty-seven up close, ten at
487
+ medium distance), so the skirts show needles and their edges are feathered rather than cut in
488
+ facets. Broadleaf crowns up close and at medium distance are leaf cards: small double-sided
489
+ quads that the alpha test cuts out along a sprig of leaves, crossed in clusters over the
490
+ crown's shell (twenty clusters of four cards up close, six of three at medium distance) around
491
+ a solid core in the crown's own shade, so the outline breaks into sprigs of leaves and the gaps
492
+ show foliage rather than sky. Plants are sized by their foliage, not by the cards' clear
493
+ corners. A distant crown is one faceted volume (six-sided and lumpy for broadleaf trees), drawn
494
+ opaque. Clear atlas texels carry the tone of the leaves beside them, so filtering never blends
495
+ a pale rim into a card's cut edge. Cards are for tree crowns only, and only
496
+ through the shared scatter material: no alpha blending, no per-species textures, no cards on
497
+ buildings, fences or ground cover. That material (`createScatterMaterialAsync` from
498
+ `@bendyline/molen-worldgen/client`) carries the one foliage atlas, generated at startup
499
+ (512×256: a sprig of leaves, a fir spray, and an opaque white block that every other surface
500
+ samples), cuts the cards at half alpha with alpha to coverage, and keeps the share of texels
501
+ that pass at every mip level, so distant cards do not thin out. It adds the
502
+ rest in the shader: leaf speckle and clumps, irregular bough tiers, and occlusion from the base
503
+ of the crown to a lighter tip, read from a per-vertex `canopy` height the model library writes.
504
+ Generated crowns bend their foliage normals toward the crown's rounded volume, so a crown
505
+ shades as one soft mass. Each cluster catches the light a little differently from its
506
+ neighbors, its cards darken toward their lower edge, and the core sits in the crown's shade.
507
+ Cards cast leafy shadows through the same cut. On WebGPU the cut is a node (`alphaTestNode`,
508
+ with `maskShadowNode` for the shadow pass) rather than `alphaTest`: Three copies each caster's
509
+ `alphaTest` onto the light's one shadow-pass material, and every switch between a carded and a
510
+ solid caster made all later casters rebuild their render keys, every frame. Each scattered plant drifts a little in hue,
511
+ warmth and shade, so an autumn stand ranges from yellow to russet rather than one swatch.
512
+ - **Generated buildings weather in the shader.** The shared facade and roof textures repeat on
513
+ every house, so `createBuildingWeatheringAsync` (`@bendyline/molen-worldgen/client`, passed as
514
+ a material set's `decorate`) drifts each stretch of wall and roof a little in tone, runs faint
515
+ rain streaks down walls and lays weathered patches with a touch of lichen on roofs. Do not bake
516
+ that grime into the shared textures; authored landmark models carry their own.
517
+ - **Houses carry their own details.** North American homes have dark shutters, the odd dormer
518
+ and a chimney, and lap-sided homes case their outside corners with trim boards
519
+ (`cornerBoards`), all in the shared trim and roof materials, so they cost vertices but no draws.
520
+ The High tier's finest tiles budget 900,000 building vertices so a dense suburban block stays
521
+ fully detailed near the camera instead of dropping to simplified stand-ins. On WebGL, which
522
+ pays full price for every building and plant draw, the Earth view and the explorer ask for a
523
+ compact scene (`compact` on the semantic renderers): 320,000 building vertices and half the
524
+ plant scatter. The regional shop
525
+ and civic styles put a full-size rooftop unit on about every 150 m² of flat roof (2–14 a roof).
526
+ - **Humans use polygonal realism.** Model facial relief, shaped hands and footwear, and clear
527
+ garment construction on the shared animated skeleton. Spend close-view triangles on these
528
+ features and retain cheaper crowd tiers; see [figures](figures.md).
285
529
 
286
530
  ## Rendering modes
287
531
 
@@ -304,6 +548,11 @@ keep roofs darker than walls and to avoid baked shading. Hosts choose a fixed mo
304
548
  Run this review for every new or changed model, style or palette. A successful build is not a
305
549
  visual approval.
306
550
 
551
+ Perform these checks during the same continuous pass that builds the model. Reuse the brief,
552
+ reference pictures and map fit already established; do not restart research in a separate
553
+ validation phase. Choose views that cover several checks together, fix observed defects and
554
+ record the completed result once. Revisit it when a defect or relevant change warrants it.
555
+
307
556
  1. **Silhouette.** Render with textures off and flat shading. Name the object from the
308
557
  silhouette alone, at skyline distance.
309
558
  2. **Budget.** Record triangles, materials and draw calls per level, and check them against the
@@ -317,6 +566,9 @@ visual approval.
317
566
  5. **Modes.** Check the Economy mode (no shadows) as well as High.
318
567
  6. **Distance behavior.** Watch the switches between levels for popping, shimmer on thin parts,
319
568
  and floating or sinking at the base.
569
+ 7. **Family.** Models made by one builder or template fail together. Render the family's side
570
+ views at one scale on one sheet: an SUV with a sedan's rear, every pickup at a car's ride
571
+ height or two types with the same silhouette show there, not in one model's preview.
320
572
 
321
573
  Useful captures from a project:
322
574
 
@@ -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
 
@@ -0,0 +1,96 @@
1
+ # Night lighting
2
+
3
+ Earth views light occupied windows and street fixtures as the Sun sets. World Explorer and
4
+ `mountEarthView` share the same smooth transition: off above +2° solar altitude, fully on below
5
+ −6°. Date, location and time-of-day changes use the sky's Sun position, so a city's lights follow
6
+ its local night even when the controls display your own time zone.
7
+
8
+ ## Buildings and existing models
9
+
10
+ Generated buildings already identify their glass as the `window` material slot. The client adds
11
+ a compact emission layer on those actual panes. About 55% illuminate, with a deterministic mix
12
+ of warm and neutral whites and brightness levels. Each whole pane stays either on or off;
13
+ the pattern does not flicker with time, material loading or floating-origin shifts. The same
14
+ layer follows all three resident building detail levels. Silhouette boxes without windows stay
15
+ unlit.
16
+
17
+ Authored static GLB structures opt in through material metadata. Existing
18
+ `extras.molenSurface.slot: "window"` bindings are recognized automatically. For glass or lamp
19
+ faces with other materials, add this to the glTF **material's** extras:
20
+
21
+ ```json
22
+ {
23
+ "molenNightLight": {
24
+ "kind": "window",
25
+ "occupancy": 0.55,
26
+ "color": "#ffe4b0"
27
+ }
28
+ }
29
+ ```
30
+
31
+ Use `kind: "lamp"` for a permanently occupied fixture (default occupancy 1). `color` is optional;
32
+ omitting it gives the warm/neutral mix. An occupancy of 0 disables the layer. Model generators
33
+ should emit separate, disconnected glass panes for independent room occupancy. Connected glass
34
+ sheets illuminate as one surface. Mark only the emitting faces, not a combined wall-and-window
35
+ material. These tags also work on source-derived runtime LODs when those LODs retain the extras.
36
+
37
+ No window locations are guessed from a model's name, base colour or bounding box. Untagged
38
+ landmarks need a generator change to identify the intended glass or fixture faces. The light
39
+ layer follows the model's hierarchy, placement, clipping and lifetime; the original daytime
40
+ materials are retained.
41
+
42
+ ## Roads and signals
43
+
44
+ Modern surfaces place lamps along paved streets with sidewalks and at intersections. Placement
45
+ is bounded, terrain-aware and avoids mapped buildings and water. Long blocks get fixtures at roughly 28 m intervals, alternating sides.
46
+ Bridges, tunnels and unpaved roads do not receive inferred block lighting. Explicit
47
+ `tags.lit: "no"` disables block lamps. The existing surface style and `details.streetlights`
48
+ control whether fixtures are generated; historic and unlit styles keep their own choices.
49
+
50
+ Each surface tile batches illuminated lamp heads and soft pavement pools. Pools follow terrain
51
+ height, fade with dusk and share the fixtures' distance culling. Earth hosts also use sixteen
52
+ real warm point lights selected from visible street fixtures near the camera and the ground it
53
+ looks toward. They illuminate building walls, parked cars, moving vehicles and other lit
54
+ materials. The fixed pool keeps shader light counts stable as tiles stream. These lights do
55
+ not cast additional shadows; walls do not occlude them. Distant lamps keep their batched glow
56
+ and pavement pools beyond the real-light budget.
57
+
58
+ Traffic lenses remain self-lit in both daytime and nighttime and keep their simulation-driven
59
+ signal phases. Mapped props that replace inferred fixtures still need their own model lighting
60
+ metadata; arbitrary tagged model lamps currently emit without creating a point light.
61
+
62
+ ## Cars
63
+
64
+ Active traffic and the driven car get white headlights and red tail lights, including when
65
+ stopped at a signal. Lenses follow vehicle dimensions and the full chassis rotation, through
66
+ proxy/model changes and floating-origin shifts. Braking brightens the rear lenses. Four nearby
67
+ cars also receive forward, downward-aimed spotlights, with the driven car taking priority.
68
+ Their beams illuminate pavement, walls and vehicles ahead. Parked, unoccupied cars keep their
69
+ lamps off and receive light from their surroundings. Hidden/despawned traffic loses its lights.
70
+
71
+ Traffic lenses are two instanced batches, capped at 512 cars, and all artificial lighting fades
72
+ out at dawn. No light changes the deterministic simulation.
73
+
74
+ `details.maxStreetlightsPerTile` gives lamps their own budget (default
75
+ 1.5 × `maxFixturesPerTile`, normally 240), so block lighting does not take parking spaces away.
76
+ Worker and direct surface generation produce the same placement and light pools. Fresh tiles
77
+ and style replacements inherit the current night factor immediately.
78
+
79
+ ## Custom hosts
80
+
81
+ `createEarthWorldgen(...).setNightFactor(factor)` and
82
+ `TerrainSurfaceRenderer.setNightFactor(factor)` accept 0..1. Compute that factor with
83
+ `earthNightFactor(sunAltitudeDeg)` from `@bendyline/molen-earth/client`. Fixed daylight hosts
84
+ can leave the default 0. Direct surface objects use `updateTerrainStreetLights(object, factor)`.
85
+
86
+ Lower-level worldgen hosts can create `NightWindowLighting` from
87
+ `@bendyline/molen-worldgen/client`, assign it to their material set's `nightWindows`, and pass it
88
+ to `StructureModelLibrary` or `StructureLodStreamer` as `nightWindows`. Dispose the controller
89
+ after its building/model objects; model eviction retains the shared emission material.
90
+ Compose real spill and traffic lighting with `EarthNightLighting` from
91
+ `@bendyline/molen-earth/client`. Construct it with `{ root, world, surface, sampleHeight }`,
92
+ where `root` uses absolute simulation coordinates (normally the terrain stream object).
93
+ Pass `vehicleHeights` from the ambient content catalog for matching traffic model heights.
94
+ Call `update({ camera, direction, factor, drivenVehicleId })` each frame and dispose it before
95
+ its root. `TerrainSurfaceRenderer.visitStreetLights` exposes only attached, visible source tiles.
96
+ Both graphics backends use standard materials and lights, without shader injection.
@@ -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
@@ -73,7 +78,7 @@ archives, several GB in all) are on the rolling
73
78
  [`packs` release](https://github.com/bendyline/molen/releases/tag/packs) with every other pack:
74
79
  `npx molen pack fetch https://github.com/bendyline/molen/releases/download/packs/index.json
75
80
  <ids…>`. A browser can't read those downloads directly (GitHub sends no CORS headers); host the
76
- zips yourself, or read the unzipped copy at `https://qualla.com/_a/index.json`. Without its model
81
+ zips yourself, or read the hosted copy at `https://qualla.com/_a/index.json`. Without its model
77
82
  archives, the style pack draws landmarks as procedural buildings.
78
83
 
79
84
  A project lists the packs it uses, in order, and their types join the registry like the
@@ -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.