Log inGet started
World

Snowline Pass: Alpine Mountains and Pine Forest to Walk, with a Mountain Builder

README.md

alpineProps

High-mountain props for walkable alpine worlds: 58 kinds, from 30 cm gentians to 34 m veteran spruces, a dry-stone hut and a footbridge. Each one is placed with a single component and comes in three looks (real, painted, toon), all four seasons, and with or without snow. They have three baked levels of detail, colliders where a player needs them, and footstep surfaces. Every kind also registers with forestProps' Props, so forestKit's Forest / ForestRender can scatter and draw them instanced. Materials come from alpineMaterials. Works installed in any world (it finds its own files, wherever it sits).

Quick start

-- an old Norway spruce with snow on its branches
entity.spawn("tree").component.add("alpineProps.AlpineProp", { kind = "spruce", age = "veteran", snow = "on" })

-- a winter A-frame hut (door faces the entity's +Z), and a lettered trail sign
entity.spawn("hut").component.add("alpineProps.CabinHut", { style = "aFrame", season = "winter" })
entity.spawn("sign").component.add("alpineProps.Signpost", { arm1 = "Bergsee 20 min", dir1 = 0, arm2 = "Gipfelkreuz 2 h", dir2 = 150 })

-- every kind side by side, in labelled rows
entity.spawn("gallery").component.add("alpineProps.PropGallery", {})

From code: require("alpineProps.AlpineProps") lists kinds (kinds(), kindsOf("rock")), describes one (info(kind)) and returns its draws (parts(kind, { age, season, look, variant, lod, snow }) → { { mesh, material } }). require("alpineProps.Cabin").build(style, opts) and require("alpineProps.Signs").make(parent, opts) place huts and signs.

Components

ComponentWhat it placesKey fields
AlpinePropany one kindkind, age (sapling, young, mature, veteran; "old" = veteran), season, look, variant, seed (non-zero picks variant and yaw), detail (auto, near, mid, far), collide, snow (auto, on, off)
Cabina whole hut: logHut, stoneHut, aFramestyle, season, look, snow, seed
Signposta post with up to four lettered armsarm1..4 text, dir1..4 degrees, season, look, snow
PropGalleryevery kind in labelled rowssections, look, summerSeason, detail, labels, gap

All of them build temporary children from synced fields, so every player sees the same prop and a reload rebuilds it.

Kinds

Triangle counts are read from the Baked* tables: real look, snow excluded, the range over variants.

Conifers (category tree, four ages)

KindVariants per ageLOD0 saplingLOD0 youngLOD0 matureLOD0 veteranLOD1 matureLOD2 mature
spruce31398-14004996-50001149919496-194993447-3449490
scotsPine31396-1398500011496-1150019496-194982773-2835490
fir31396-14004996-499811496195003447-3448490
larch31396-13984996-499811497-1150019499-195003446490
stonePine3140049981149619496-195003444-3446490
mugoPine31122-11962910-30566616-726210652-109981806-1860490

Norway spruce, Scots pine, silver fir, European larch (gold in autumn, bare in winter), Swiss stone pine and mugo (dwarf mountain) pine. Sizes run from about 1.4 m saplings to 34 m veterans (mugo: 0.6-3 m).

Dead and odd trees, shrubs, grasses, flowers

KindCategoryVariantsLOD0LOD1LOD2
deadSprucedeadtree33190-31981020488
krummholzdeadtree27304-79962100-2377489-490
windbentPinedeadtree27068-80401944-2013490
fallenSprucelog21421-1468450-462322-367
arnicaflower36012-
alpenrosebush31444-1636438-51024
edelweissflower348-848-16-
juniperbush31144-1336312-36816
alpineAsterflower372-8412-16-
greenAlderbush32388-2708594-686104-122
gentianflower396-12016-20-
dwarfWillowbush3784-1084282-39814
saxifrageflower3102-11420-
campanulaflower360-9612-16-
globeflowerflower354-7212-
cottonGrassgrass3156-20436-48-
alpineTussockgrass484-9024-28-

Flowers and grasses have no LOD2 (-): they drop out at distance.

Rocks and cliffs

KindCategoryVariantsLOD0LOD1LOD2
cliffSpirecliff33864-4512988-1112168-196
cliffFacecliff34176-4584980-1112280-292
graniteBoulderrock41440-1944360-45644-96
rockOutcroprock31368-2280488-556144-148
screeStonerock3240-28836-4428-32
screePatchrock32564-2652608-636236-272
flatSlabrock3336-1152240-33632-36
cairnrock31852-1984572-872272-292

Trail props

KindCategoryVariantsLOD0LOD1LOD2
benchstructure1168126120
woodpilestructure13224232072
waterTroughstructure1234137122
signpoststructure4324-583686-19816-128
signArmstructure1642828
waymarkPoststructure12609040
footbridgestructure1117803122776
summitCrossstructure13924181258
lookoutstructure11732866722
trailStepsstructure1840144144
fenceRailstructure2175-21049-7452-72
infoBoardstructure15085391146

The footbridge deck, lookout stairs and platform and trail-step treads carry walkable box colliders.

Hut parts (what Cabin assembles; usable alone)

KindCategoryVariantsLOD0LOD1LOD2
logWallSectionstructure2756-812132-14412
logCornerstructure2130637824
stoneWallSectionstructure3892-1640212-40224
timberWallSectionstructure11449624
wallWindowstructure4628-1808364-522124-172
wallDoorstructure4502-1078228-500128-164
gableLogstructure113482488
gableStonestructure1229846016
gableTimberstructure2492-616492-61610
roofShinglestructure1707833860
roofSlatestructure1329831060
aFrameRoofstructure1997039460
chimneyStonestructure2218-5700140-128488-96
porchDeckstructure5224-488190-262190-262
stoneFoundationstructure1106822224

Wall parts sit on a 0.5 m grid (StructureGen.DIM), run along local X with the outside at +Z.

Looks, seasons and snow

  • Looks: real (photoreal PBR), painted (hand-painted stylised), toon (cartoon; conifers swap to dedicated toon needle meshes up close).
  • Seasons: spring, summer, autumn, winter. Larch turns gold in autumn and is bare in winter; grasses go to straw; materials follow alpineMaterials' seasonal variants.
  • Snow: snow = "auto" draws snow loads on branches, roofs, rails and rocks in winter only. Use "on" or "off" to force it in any season.

Gallery

PropGallery.component lays out every kind: each conifer species at all four ages without and with snow, then dead and odd trees, shrubs, grasses and flowers (as small patches), rocks and cairn, cliffs, the three hut styles, trail props and hut parts. A last row catches any kind added later. PropGallery.scene frames it with a meadow ground, a sun and ambient light, a procedural sky and a camera. Check shots: design/checks/props/gallery_overview.jpg and gallery_conifers.jpg in the Snowline Pass world.

Known limits

  • Flowers are true to scale (10-40 cm), so they read only up close or in drifts; scatter them in numbers.
  • Destroying an entity whose AlpineProp parts carry MeshLod logs one harmless "component this proxy names was removed" error per part from the engine's MeshLod onDestroy (reported upstream). Changing fields to rebuild does not.
  • A structure part with no bake falls back to building its mesh at runtime once per session.
  • AlpineProp places one prop per entity. For forests and boulder fields use forestKit's Forest/ForestRender (instanced) with these kinds.
  • Bakers (ConiferBake, FloraBake, StructureBake) are authoring tools. Re-baking writes hundreds of meshes, so run one kind at a time.

Tests

tests/conifers, tests/flora and tests/structures (tools.use("tests", "run", { suite = "conifers" })) cover registration, every kind × age × season × look × variant × LOD resolving to baked meshes, snow switching, triangle budgets, colliders a player walks on, and the components.