Mirage Wells: Desert Dunes, Oasis and Ruins Kit
- ..
- .metadata84 B
- BakedFlora.module
- BakedRock.module
- Camp.module
- DesertProp.component
- FloraBake.module
- FloraCacti.module
- FloraCatalog.module
- FloraKit.module
- FloraPalms.module
- FloraPlants.module
- PropGallery.component
- Props.module
- README.md20.3 KB
- RockBake.module
- RockCatalog.module
- RockGen.module
- RockGeo.module
- Ruins.module
- guides
- meshes
- package.yaml1.1 KB
- tests
README.md
desertProps
Desert props for any world, each placed with one component: date palms (tall, leaning, young, offshoot clumps, dead snags), doum and desert fan palms, oasis reeds, cattails, papyrus, rushes and grass, desert flowers and bunch grasses, saguaro, barrel, prickly pear, cholla, organ pipe, agave and aloe, creosote, saltbush, tamarisk and other shrubs, umbrella acacia and joshua trees, tumbleweeds and palm litter, plus boulders, sandstone formations and arches, ruins and caravan leftovers. Every prop has near, middle and far versions, 3 seeded shapes, colliders tagged with a footstep surface, and draws in five looks (real, painted, toon, lowpoly, pixel) that switch world-wide with one call. Materials come from its dependency desertMaterials; geometry kits from tropicalProps.
Quick start
Install desertProps (it brings desertMaterials and tropicalProps). In any world:
-- a date palm, and a leaning one over the water (+Z)
entity.spawn("palm", { position = { 0, 0, 0 } }).component.add("desertProps.DesertProp", { kind = "palmDate", variant = 2 })
entity.spawn("palm2", { position = { 5, 0, 2 } }).component.add("desertProps.DesertProp", { kind = "palmDateLeaning" })
-- reeds at its foot; shape and turn picked from a seed (for scattering)
entity.spawn("reeds", { position = { 2, 0, 4 } }).component.add("desertProps.DesertProp", { kind = "reedClump", seed = 41 })
-- every prop that follows the world look (look = "auto", the default) turns cartoon:
require("desertMaterials.DesertLook").set("toon")
-- or synced to every player: one entity of the scene carries the look
entity.spawn("Desert Look").component.add("desertMaterials.DesertLookSetting", { look = "lowpoly" })
Add a desertProps.PropGallery to an entity far from your playable area to see every kind side by side, one band per look ({ looks = "real", kinds = "palm,cactus" } narrows it).
The package works from wherever it is installed (the world root or deps/<world>/): its files reach each other with ~. names, its dependencies by package name, and the bakers find their folder from their own location.
Guides
- How do I add date palms, cacti, oasis plants, desert shrubs, rocks and ruins to my world? Placing a prop, every kind by family, variants and seeds, looks, colliders and footsteps, scattering, the gallery.
- Plant a small oasis: date palms, reeds and desert scrub round a pool. From an empty world to a planted oasis corner, step by step.
DesertProp
Builds one child entity per part (a Model whose mesh swaps between three LODs by screen size, every part together) and static colliders, all temporary and rebuilt from the synced fields, so every peer builds the same prop. Changing any field rebuilds.
| Field | Default | Meaning |
|---|---|---|
kind | palmDate | any kind Props.kinds() lists (tables below) |
look | auto | auto follows DesertLook; or real, painted, toon, lowpoly, pixel |
variant | 1 | baked shape, 1..3 (wraps); used when seed is 0 |
seed | 0 | non-zero: picks the variant and a yaw turn from the seed |
detail | auto | auto picks near / mid / far by screen size (one test per prop every 6 frames); near, mid, far pins one |
collide | true | build the colliders, each tagged with the attribute desertSurface = the entry's footstep class |
real, painted and pixel draw the same geometry under that look's material; toon draws a chunkier bake (fewer, broader fronds and leaves, stacked trunks); lowpoly a faceted flat-shaded bake.
Kinds
Palms (category palm, footsteps wood, trunk capsule chains)
| Kind | What it is |
|---|---|
palmDate | Tall date palm 10-16 m: diamond-knobbed trunk, dense crown of 30-36 stiff blue-green fronds with V-raised leaflets and basal spines, dry-frond skirt, 4-7 orange-brown date bunches |
palmDateLeaning | Date palm leaning 20-32 degrees toward +Z (the water), curving back up; 8.5-13 m |
palmDateYoung | 2-4 m: a knobbly stub and a fountain of upright fronds |
palmDateCluster | Offshoot clump: a 9-12 m mother palm and 2-4 younger trunks and trunkless offshoots, leaning apart |
palmDateDead | v1 collapsed dry crown, v2 headless silvered snag with a splintered top, v3 tall grey trunk with a few dry fronds |
palmDoum | Doum palm: a trunk forking into 2-4 branches, each crowned with stiff fans, dead fans and brown fruit |
palmFanDesert | Washingtonia: stout column 9-14 m, crown of split-tipped fans, thatched skirt of dead fans (v1 long, v2 trimmed, v3 burnt) |
Oasis plants, grasses and flowers (category plant, no colliders)
| Kind | What it is |
|---|---|
reedClump | Common reed, 26-36 culms 2-3 m with drooping blades and feathery plumes |
cattail | Strap leaves and 3-6 brown velvet heads |
papyrus | 12-22 splaying stems topped by starburst umbels |
grassOasis | 5-8 fresh green tufts |
rushWater | Dense thin upright rushes at the water line |
flowerDesert | Small blooms on a leafy tuft: v1 yellow, v2 purple, v3 a mixed patch |
grassDesertTuft | Straw bunch grass |
grassDuneTuft | Sparse splayed dune grass (footsteps softSand) |
Cacti and succulents (category cactus)
| Kind | What it is | Collider |
|---|---|---|
saguaro | Ribbed column 6-11 m, v1 three arms, v2 one, v3 five | capsule chain (column + arms) |
saguaroYoung | Armless column 1-3 m (v3 an arm bud) | capsule chain |
barrelCactus | Squat ribbed barrel leaning toward +Z, crown of yellow flowers | capsule |
pricklyPear | Chains of oval pads with blooms | sphere |
cholla | Fuzzy pale-gold jointed stems | capsule |
organPipe | 7-14 columns 2-5 m from one base | capsule |
agave | Rosette of thick blue-grey leaves; v3 with a 5 m flower pole | sphere |
aloe | Fleshy recurved rosette(s) with orange flower spikes | none |
Shrubs (category bush, footsteps grass, no colliders) and trees (category tree)
| Kind | What it is |
|---|---|
creosoteBush | Open vase of slender grey stems, small dark leaves at the twig ends (v2 flowering) |
saltbush | Dense silvery grey-green mound |
tamarisk | Feathery small tree 3-4.5 m, drooping sprays, pink plumes (v1, v3) |
desertBroom | Upright green switch twigs |
shrubDead | Bleached bare twig tangle |
acaciaUmbrella | Flat-topped thorn acacia, layered canopy 8-10 m across (trunk and limb capsules) |
joshuaTree | Shaggy forking arms ending in balls of dagger leaves (trunk capsule) |
Litter (category litter, no colliders)
tumbleweed (0.8-1.1 m), tumbleweedSmall (0.4-0.6 m), deadBranch (silvered, 1.6-2.8 m), palmFrondFallen (a dry date frond on the sand), dateLitter (fallen dates, a fruit stalk, loose leaflets).
Rocks, formations, ruins and caravan leftovers
<!-- STONE HALF: the agent building RockCatalog fills this section (kinds tables for rock, formation, ruin, camp; colliders; budgets). -->Categories rock, formation, ruin and camp (50 kinds, registered by RockCatalog). Walk-through and walk-on pieces carry mesh colliders with one collision mesh per variant; footsteps are rock on natural stone, stone on ruins, wood on timber.
Rocks (category rock, footsteps rock)
| Kind | What it is | Collider |
|---|---|---|
boulderSandstone | Layered orange sandstone block, rounded strata edges, jointed faces, sand-dusted foot (1.6-3.8 m) | mesh |
boulderVarnished | Angular fractured block under black-brown desert varnish streaks (1.3-3.2 m) | mesh |
boulderRounded | Smooth wind-rounded corestone with faint exfoliation, bigger ones two-lobed (1.2-3.4 m) | mesh |
rockCluster | 3-5 jointed blocks fused into one heap (3.5-6 m) | mesh |
rockSlab | Broad tilted tabular slab, one end buried; walk on it (2.6-5 m) | mesh |
pebbleScatter | Desert pavement: 40-96 dark varnished flat pebbles over 1.6-3.2 m | none |
ventifact | Wind-polished three-faceted stone, fluted along the wind (0.5-1.4 m) | sphere |
Formations (category formation, footsteps rock)
| Kind | What it is | Collider |
|---|---|---|
archNatural | The big walk-through arch: a thick, irregular, slightly lopsided span of cross-bedded sandstone with overhanging ledges, a lumpy spalled underside and varnish streaks running down from its ledges, over a leaning opening 8.6-10 m wide and 7.6-8.8 m high, span 21-25 m along X, on uneven legs and stepped buttresses. Walk through along Z; origin on the ground under the opening's centre | mesh, opening clear |
archSmall | Window arch: a fin 11-15 m long, 6.5-9 m tall, with a 3.6-5.2 m window | mesh |
outcropLayered | 2-4 tiers stepping back into ledges and undercuts, cut by joints (6.5-15 m) | mesh |
hoodoo | Banded spire 5.5-11.5 m necking under a pale caprock, on a talus mound | mesh |
hoodooCluster | 3-5 capped hoodoos on one mound (9-13 m across) | mesh |
rockFin | Thin ragged blade 9-14 m long, 6-10 m high, notched by joints | mesh |
mushroomRock | Sand-blasted pedestal under a broad pale head (3-5.5 m) | mesh |
cliffWall | 12 m layered cliff face 10-16 m tall facing +Z; tiles along X (shared edge profile at x = +-6), top runs 4 m back | mesh |
mesaButte | Horizon landmark: talus apron, sheer banded cliff, flat caprock; v1 butte 40 m, v2 table mesa ~115 x 68 m, v3 two-tier | mesh (far LOD) |
Ruins (category ruin, footsteps stone)
| Kind | What it is | Collider |
|---|---|---|
ruinWallMudBrick | 4 m mud-brick wall along X, top broken in brick steps, eroding plaster, 2.2-3.6 m tall | mesh |
ruinWallCorner | L-shaped corner, 3 m arms along +X and +Z | mesh |
ruinWallStone | 4 m coursed ashlar wall, stepped broken top, fallen blocks | mesh |
ruinWallWindow | 4 m mud-brick wall with an arched window (v3 also a niche) | mesh |
ruinGateway | Stone gateway: coursed piers, round arch with keystone, entablature, engaged columns; opening 2.6-2.9 m x 4.3-4.8 m; walk through along Z (v2 broken side, v3 pediment) | mesh, opening clear |
ruinArchway | Mud-brick archway 4.4-5 m wide, arch 2-2.4 m; walk through along Z | mesh, opening clear |
ruinColumn | Fluted column 4.8-5.6 m with base and capital (v3 snapped) | capsule |
ruinColumnBroken | Stump 1-2.3 m with a jagged top (v3 a drum beside it) | capsule |
ruinColumnFallen | 3-4 drums lying along X, half sunk (v2 with its capital) | mesh |
ruinTower | Crumbling watchtower 4-4.6 m square, 6.8-8.8 m tall, door on +Z, slit windows; walk in | mesh, door clear |
ruinHouse | Roofless room 5.5-7 x 4.5-5.5 m, doorway on +Z, window on +X | mesh |
ruinDomeBroken | Bleached pavilion, an arch on every side, dome half fallen in; walk in | mesh |
ruinStairs | 6-8 worn steps rising toward -Z to a landing, cheek walls | mesh (stepped) |
ruinFloorTiles | 4 x 4 m flagstones with a band of faded glazed tiles | box |
wellStone | Round coursed-stone well, timber frame, pulley, rope, hanging bucket | mesh |
statueHead | Huge fallen carved head (3.2-4 m) on its side, striped headcloth (v2 nose broken) | mesh |
statueFeet | Giant feet and snapped shins on a stepped plinth | mesh |
obeliskFallen | 7.2-8.8 m obelisk snapped in two, incised glyph columns | mesh |
amphora | Two-handled terracotta jar 0.85 m: upright, leaning, broken on its side | capsule |
potteryShards | 6-14 curved terracotta sherds | none |
Caravan leftovers (category camp)
| Kind | What it is | Collider |
|---|---|---|
crateWooden | Slatted plank crate 0.7-0.95 m (v3 burst open) | box |
barrelWooden | Staved barrel, iron hoops: standing, on its side, sprung | mesh |
cartBroken | Two-wheeled cart tipped where a wheel came off, shaft snapped, the wheel beside it | mesh |
wheelBroken | Spoked wheel with iron tyre, half buried, spokes missing | none |
tentBedouin | Tattered striped goat-hair tent 6-7.2 x 4-4.8 m on poles, back wall to the sand (-Z), open to +Z; walk under | mesh (poles) |
rugRolled | Rolled red woven rug (v2 half unrolled) | none |
campfireRing | Soot-blackened stone ring, ash bed, charred crossed logs; light hook | none |
camelSkull | Bleached camel skull (v2 with its jaw) | none |
bonesRibcage | Spine and curved ribs half sunk (v2 with leg bones) | none |
saddleBags | Two leather bags on a strap, brass buckles | none |
lanternBrass | Pierced brass lantern: on the sand, or hanging from a crook pole; light hook | none |
signpostWooden | ~2 m post with a 0.9 x 0.3 m board facing +Z and arrow boards; label face at (0, 1.45, 0.1) | box |
treasureChest | Closed chest 0.9 x 0.68 x 0.6 m: vaulted lid, iron bands, brass lock plate on +Z; origin on the ground | box |
waterskin | Goatskin waterskin with a tied neck | none |
Hooks for night and for labels: RockCatalog.LIGHTS (campfireRing at (0, 0.45, 0), lanternBrass per variant; RC.lightOffset(kind, variant)), RockCatalog.SIGN_FACE (the signpost board face), RockCatalog.shape(kind, variant) (baked size, arch / gateway opening, tower door).
Budgets (stone half, triangles, real form, variant 1)
| LOD0 | LOD1 | LOD2 | |
|---|---|---|---|
archNatural | 17.6-18.9k | 4.4-4.8k | 950-970 |
| other formations (window arch, outcrop, hoodoos, fin, mushroom) | 4.3-11.8k | 1.1-2.5k | 240-510 |
cliffWall / mesaButte | 7.3k / 3.4k | 1.6k / 740 | 190 / 150 |
| boulders, cluster, slab, ventifact | 0.9-3.6k | 220-850 | 50-180 |
| mud-brick walls, archway, house, tower | 3.3-10.4k | 0.7-2.4k | 150-450 |
| stone wall, gateway, columns, stairs, floor | 0.7-6.2k | 170-1.6k | 12-420 |
| well, statue head / feet, obelisk | 6.6-14.1k | 1.7-3.4k | 340-710 |
| camp kinds, pottery | 0.1-4.4k | 50-1.2k | 4-400 |
1-3 parts per kind (stone body + pale cap, brick + plaster, stone + carved trim, wood + iron + brass, ...); collision meshes 24-3.6k triangles.
<!-- /STONE HALF -->Props API
local Props = require("desertProps.Props") -- "~.Props" inside the package
Props.kinds() -> { string } -- every kind, registration order
Props.kindsOf(category) -> { string } -- palm, plant, cactus, bush, tree, litter, rock, formation, ruin, camp
Props.info(kind) -> Entry? -- { kind, category, variants, radius, height, collider?, surface?, walkable?, trunks?, description }
Props.parts(kind, { look?, variant?, lod? }) -> { { mesh, material, part } } -- same parts, same order at every LOD
Props.register(entry, partsFn) -- how a catalog adds kinds
info.radius is the footprint radius (metres) to space props by; info.surface the footstep class. info.collider is the kind's one collider (capsule radius/height/offset, sphere, box size/offset, or mesh with meshes[variant]). Palms, saguaros, the acacia and the joshua tree also carry info.trunks[variant] = { { x0, y0, z0, x1, y1, z1, r }, ... }: capsule segments (local metres) following that variant's baked trunk(s), columns or limbs, which DesertProp builds as a capsule chain instead.
For thousands of props draw Props.parts instanced: one draw per part per LOD, 1-4 parts per vegetation kind, every part of a kind sharing one bounding box.
Budgets (vegetation, triangles, worst variant, real form)
| LOD0 | LOD1 | LOD2 | |
|---|---|---|---|
| date palm / leaning | 9.5-11.9k | 2.3-2.7k | 354-386 |
| young / dead date palm | 2.7-4.1k | 574-768 | 90-160 |
| date palm clump (3-5 trunks) | 19.0k | 4.7k | 546 |
| doum palm (2-4 crowns) | 13.9k | 4.1k | 380 |
| desert fan palm | 9.7k | 2.7k | 294 |
| reeds, cattail, papyrus, rushes | 296-1960 | 104-640 | 32-116 |
| grasses, flowers | 42-192 | 6-42 | culled |
| saguaro | 6.1k | 1.8k | 288 |
| organ pipe | 8.0k | 2.5k | 324 |
| other cacti, agave, aloe | 748-1620 | 248-768 | 36-180 |
| shrubs | 1.3-3.8k | 516-1300 | 54-158 |
| acacia, joshua tree | 1.1-1.8k | 650-994 | 248-250 |
| litter | 128-588 | 42-186 | culled-33 |
The toon form is about a quarter of real and the low form a tenth; far LODs of small plants are culled (the empty mesh).
Mesh contract
Real-world metres, +Y up, origin at the ground contact. Leaning palms lean toward +Z; barrel cacti lean toward +Z (the sun). Vertex RGB is a tint the material multiplies its albedo by; vertex alpha is the wind weight on foliage cards (0 at the base, 1 at the tips; near 0 on litter) and 1 on solid parts (trunks, cactus bodies, pads, stalks, wood, dates). Front faces are counter-clockwise and agree with the normals. Every part of a prop shares one bounding box, so all parts swap LOD together.
UVs: cards (leaflets, fan segments, reed blades and plumes, blooms, small leaves, acacia sprays, agave leaves) carry one item per 0..1 square (u across, midrib u = 0.5, v = 0 at the base) and never leave 0..1 (card textures are clamped); grass is tuft cards (v = 0 at the ground); tumbleweeds are shells mapped u around, v pole to pole; bark, cactus skin and wood wrap u once per metre of girth with v = metres along; cactus pads map one pad card per face. Leaf-material stalks sample the opaque midrib strip of the leaf texture. No texture is shipped here: every surface comes from desertMaterials.DesertMaterials.get(surface, { look }).
Regenerating
Meshes are generated once and baked into the package (meshes/flora/<kind>/), read through the generated literal index BakedFlora, so installing costs no generation and gameplay never resolves a computed asset name.
- Vegetation: edit
FloraPalms/FloraPlants/FloraCacti(shared helpersFloraKit, on tropicalProps'VegGeo; catalogFloraCatalog), then in a taskrequire("desertProps.FloraBake").run()(all, about two minutes) or.run({ kinds = { "palmDate" }, forms = { "toon" } });.report()answers the triangle table. Mesh names:<kind>_<form>_v<n>_l<lod>_<part>, formsreal,toon,low.
- Stone and built kinds: edit
RockGen(rocks, formations),RuinsorCamp(shared helpersRockGeo: signed-distance shapes meshed by surface nets at a triangle budget, strata and varnish tints, lathes, dressed blocks, on tropicalProps'ShoreGeo; catalogRockCatalog), then in a taskrequire("desertProps.RockBake").run()(all 50, about three minutes) or.run({ kinds = { "archNatural" } });.status()answers progress. Meshes land undermeshes/rock/<kind>/with the same names (<kind>_<form>_v<n>_l<lod>_<part>, plus<kind>_v<n>_colcollision meshes) and the literal indexBakedRock.zero tests run desertRockschecks the stone half (bake completeness, budgets, colliders, clear walk-through openings, ground contact, hooks, determinism).
Tests: zero tests run desertProps (edit mode) checks every kind x look x variant x LOD, contract categories and surfaces, colliders and trunk chains, budgets and DesertProp rebuilds.
Known limits
- The props were measured in the desktop editor only. The author cannot start a web build (#20946), so the frame rate in the browser is checked by whoever commissioned the package; models load slowly on the web (#22751), so a scene full of props takes longer to appear there.
- Every
DesertPropis a shared entity. A world that places thousands of them as entities loses frame rate to keeping them in sync (#20750); for big scatters drawProps.partsinstanced (as desertKit does) and keep entities for the few props players touch. - Installing brings desertMaterials and its seven material packages plus tropicalProps, so the first install can take a few minutes (#21420); the ZeroMind listing text can trail the newest release (#19258), and a dependency removed from a nested package can come back on the next install (#23635).
- Running
zero tests run desertPropsordesertRocksin a shared editing room swaps the open scene for everyone in it (#23636); run them in a world of your own. - Re-baking writes about 3000 meshes. Frames are slow while the engine makes their previews (#22778), publishing before the previews finish makes the release change again once they land (#23611, #23686), and checking what changed takes a while in a world this size (#23706). Wait for the previews before you push.