# Minable ore patches Six ore patches for The Descent, built on 2026-10-13 after a reference picture from the user (four store assets: rocks with crystals and nuggets grown on them). Blender only: nothing here is imported into Unreal and no game code was written. Open `OrePatches.blend` (Blender 5.2). The six patches stand in a row, the single pieces behind them. ## What a patch is | Part | Object | What the game does with it | |---|---|---| | Host rock | `SM_OreRock__` | Static. Dark basalt with thin glowing ore veins. Stays when the patch is mined out. | | Ore clusters | `OrePatch___Ore_NN` (9 to 16 per patch) | **Each one is its own object**, seated in a socket of the rock. Mining takes one off and frees its `ore_units` loose chunks. | | Collision | `UCX_SM_OreRock_..._01` | One convex hull per rock (and per cluster and chunk mesh). | | Root | `OrePatch__` (empty) | Origin on the terrain surface, **+Z points out of the rock face**. The rock goes on below z = 0; that part is buried. | The clusters of a patch are instances of six cluster meshes per ore type (`SM_OreCluster__01..06`), turned and scaled. Three loose chunk meshes per ore type (`SM_OreChunk__01..03`, 0.34 m, the game's chunk size) are what flies into the suction. Under each cluster the rock has a shallow socket with ore flecks, so a mined-out patch still shows where the ore was. The rock's glow is its own texture (`_E`); fade it to zero when the last cluster is gone. Ore types are the game's own (DESIGN_UE 2.12): **ferrite** (orange metal nuggets), **cobalt** (cyan glass shards), **pearl** (magenta nodules on laminated rock). Silver, tin, obsidian and gold from the picture are not in the game and were not built; the picture's four rock shapes were used (slab, twin lobes, pyramid, mound). ## The six patches PATCH_TABLE All meshes: quads (crystal tips and base caps are triangles), no n-gons, no open edges, no zero-area faces, one UV map. No booleans were used. The pearl patches are the heaviest because every nodule is a closed sphere. ## Files | Path | What | |---|---| | `OrePatches.blend` | Scene `Ore Patches`: collections `Patches`, `Library`, `Collision` (hidden), `Studio` (camera, lights, ground; not exported). | | `OrePatches.json` | The layout for the game: per patch the rock mesh, its textures and every cluster (mesh, position, normal, rotation, scale, units). Metres, Z up, right-handed; for Unreal multiply by 100 and flip Y. | | `fbx\SM_*.fbx` | 33 files: 6 rocks, 18 clusters, 9 chunks, each at the origin with its `UCX_` hull. Triangulated on export (the .blend keeps quads). | | `fbx\assembled\OrePatch_*.fbx` | 6 files: a whole patch with its clusters in place, for a quick look or for dressing a scene. | | `textures\T_OreRock___{BC,N,ORM,E}.png` | 2048 px, one set per rock, baked from a 153,600-quad source of the same shape. | | `textures\T_Ore__{BC,N,ORM,E}.png` | 2048 px, one atlas per ore type for its six clusters and three chunks. | | `previews\` | A render of each patch, `OrePatches_sheet.png` (all six), `OrePatch_mining_stages.png` (full, half mined, mined out), `OrePieces_.png` (the nine pieces of each type). | | `build\` | `build_ore_patches.py` (builds everything headless), `verify_fbx.py` (reads every FBX back), `check_fit.py` (seating and crossing check) and their reports. | ## Textures in Unreal - `_BC` base colour (sRGB), `_E` emissive colour (sRGB), `_ORM` ambient occlusion / roughness / metallic in R / G / B (sRGB off), `_N` normal map in Unreal's convention (green down; leave "Flip Green Channel" off). - The emissive textures hold the game's ore glow colours at full strength; the strength is the material's number (the .blend uses 3.0 on rocks and 1.6 on ore). - Import the FBX files with normals imported and tangents computed (MikkTSpace); they carry the triangulation the normal maps were baked on. ## Rebuilding ``` blender -b --factory-startup --python build\build_ore_patches.py blender -b --factory-startup --python build\verify_fbx.py blender -b OrePatches.blend --python build\check_fit.py ``` `-- --quick` builds a small test set into `build\_quick`, `-- --only Ferrite_A,Pearl_B` builds some patches only. Shapes, cluster counts and sizes are the `PATCHES` table at the top of the script; a new ore type is one entry in `ORES` plus its piece shapes and its shader. The whole build takes about 12 minutes on the Radeon (Cycles, HIP). ## Limits - Not in the Unreal project. The game still draws its veins in the terrain material and builds its loose chunk in code; nothing reads `OrePatches.json` yet. - No LODs and no lightmap UVs. - One convex hull per rock: a twin-lobed rock has an invisible bridge over the saddle between its lobes. - The preview renders use the game meshes and the baked textures, lit by studio lights; under the Tender's lamp in dark water they will look darker and the glow will carry more.