Mirage Wells: Desert Dunes, Oasis and Ruins Kit
README.md
DesertMaterials
The resolver behind every desert surface name: DM.get(surface, { look }) returns a material (never nil) for a Model or an instanced draw, in the real, painted, toon, lowpoly or pixel look (nil / "auto" follow DesertLook). DM.surfaces(), DM.group(s), DM.isCard(s), DM.palette(s) (linear lowpoly colour), DM.source(s, opts) (own: / installed: / runtime: / fallback:), DM.footstep(s) (sand, softSand, gravel, rock, stone, mud, water, wood, grass, salt), DM.terrainLayers() (the 14 ground layers) and DM.terrainLayer(name, look) (a terrain.write surfaces record: albedo, normal, mask texture identities, tiling in metres, linear tint). Real looks are the package's own materials, a few installed collection materials, or runtime recipes on the package's desertRock / desertSand shaders and tropicalMaterials' shaders; the four stylised looks are built at runtime on tropicalStylised from the same textures. desertProps and desertKit call it; so can any scene.
local DM = require("desertMaterials.DesertMaterials")
local rock = DM.get("sandstoneVarnished") -- real look, follows DesertLook when look is nil
local leaf = DM.get("palmFrondDate", { look = "toon" })
local layer = DM.terrainLayer("sandDune", "painted")
print(DM.footstep("sandSlipFace")) -- softSand