What it looks like
Each rock is broad and flat at the bottom and never wider above the ground than at it, so it sits on the earth rather than perching. A few large facets give it its mass; many small ones break up the corners, like a stone that has been knapped. No two rocks on a tile are copies: each draws its own footprint (round to twice as long as wide), height, profile and facets. About one placement in four is a cluster of two to four stones of different sizes leaning together. The ground between them is bare dirt, with open floor left for miniature bases.
| Shape | What it is | Share |
|---|---|---|
| dome | A rounded mound, widest at the ground | 35% |
| wedge | A ridge or pyramid whose peak leans to one side | 25% |
| slab | A low, flat-topped stone, about 60% of the usual height | 20% |
| block | A blocky stone on a squarish footprint | 20% |
Using it in a tile
A thing is one of itself. Place one rock with at= (a point, counted from the north-west corner), or leave at= out to let it land anywhere in its area:
rock at="(0.5sq, 0.5sq)" size="6dmm .. 10dmm" // one rock, there
rock at=pool // one rock, anywhere in the pool region
Many rocks are a scatter:
dharmatiles version="1.0.0"
tile size="2x2" seed=1 {
stack {
base
dirt top="$dirtEdgeHeight"
scatter perSquare="2.25..3" gap="1.5dmm" { rock }
}
}
Scattered at="foot(cliff)", stones and boulders gather at the cliff's foot as scree. Every rock is seated into the ground under it, and grass grows round it wherever the grass is listed. A rock lays its top into the surface laid after it: a dirt listed after the rock lies on its top where that is flatter than the dirt's maxSlope, and a dirt listed before it is laid first and the rock beds into it.
Reference
at= region, pointControls
| Control | Takes | Default | What it does |
|---|---|---|---|
size | length (dmm), over 0, up to 200, or a range, or a weighted range | 6dmm..15dmm | rock width |
shape | word | a mix of all three | river stones, broken rock, flat slabs
|
wear | word | — | sharp, or chipped and rounded edges not built yet check accepts it; build refuses it
|
buried | percent, 0% to 100%, or a range, or a weighted range | — | how much of each rock is under the ground |
top | height | its own height, not held to a level | how high the top stands, as a height worked out where it stands: $bottom + [4dmm .. 9dmm] |
In the library
1x1-cliff-corner.dtilelib:tiles/cliffs/1x1-cliff-corner.dtile · Open in the editor1x1-cliff-mound.dtilelib:tiles/cliffs/1x1-cliff-mound.dtile · Open in the editor1x1-cliff-spire.dtilelib:tiles/cliffs/1x1-cliff-spire.dtile · Open in the editor1x1-cliff.dtilelib:tiles/cliffs/1x1-cliff.dtile · Open in the editor2x1-cliff-blocks.dtilelib:tiles/cliffs/2x1-cliff-blocks.dtile · Open in the editor2x1-cliff-escarpment.dtilelib:tiles/cliffs/2x1-cliff-escarpment.dtile · Open in the editor2x1-cliff-needles.dtilelib:tiles/cliffs/2x1-cliff-needles.dtile · Open in the editor2x1-cliff-rubble.dtilelib:tiles/cliffs/2x1-cliff-rubble.dtile · Open in the editor2x1-cliff.dtilelib:tiles/cliffs/2x1-cliff.dtile · Open in the editor2x2-cliff-canyon.dtilelib:tiles/cliffs/2x2-cliff-canyon.dtile · Open in the editor2x2-cliff-corner.dtilelib:tiles/cliffs/2x2-cliff-corner.dtile · Open in the editor2x2-cliff-massif.dtilelib:tiles/cliffs/2x2-cliff-massif.dtile · Open in the editor2x2-cliff-plateau.dtilelib:tiles/cliffs/2x2-cliff-plateau.dtile · Open in the editor2x2-glade.dtilelib:tiles/ground/2x2-glade.dtile · Open in the editor1x1-water+grass-angle.dtilelib:tiles/water/1x1-water+grass-angle.dtile · Open in the editor1x1-water+grass-corner.dtilelib:tiles/water/1x1-water+grass-corner.dtile · Open in the editor1x1-water+grass-tree.dtilelib:tiles/water/1x1-water+grass-tree.dtile · Open in the editor1x1-water+grass.dtilelib:tiles/water/1x1-water+grass.dtile · Open in the editor1x1-water+soil-angle.dtilelib:tiles/water/1x1-water+soil-angle.dtile · Open in the editor1x1-water+soil-corner.dtilelib:tiles/water/1x1-water+soil-corner.dtile · Open in the editor1x1-water+soil.dtilelib:tiles/water/1x1-water+soil.dtile · Open in the editor1x1-water-corridor+grass.dtilelib:tiles/water/1x1-water-corridor+grass.dtile · Open in the editor1x1-water-corridor+soil.dtilelib:tiles/water/1x1-water-corridor+soil.dtile · Open in the editor1x1-water-corridor-open+grass.dtilelib:tiles/water/1x1-water-corridor-open+grass.dtile · Open in the editor1x1-water-corridor-open+soil.dtilelib:tiles/water/1x1-water-corridor-open+soil.dtile · Open in the editor1x1-water-corridor-t+grass.dtilelib:tiles/water/1x1-water-corridor-t+grass.dtile · Open in the editor1x1-water-corridor-t+soil.dtilelib:tiles/water/1x1-water-corridor-t+soil.dtile · Open in the editor1x1-water-corridor-turn+grass.dtilelib:tiles/water/1x1-water-corridor-turn+grass.dtile · Open in the editor1x1-water-corridor-turn+soil.dtilelib:tiles/water/1x1-water-corridor-turn+soil.dtile · Open in the editor1x1-water-corridor-x+grass.dtilelib:tiles/water/1x1-water-corridor-x+grass.dtile · Open in the editor1x1-water-corridor-x+soil.dtilelib:tiles/water/1x1-water-corridor-x+soil.dtile · Open in the editor1x1-water-u+grass.dtilelib:tiles/water/1x1-water-u+grass.dtile · Open in the editor1x1-water-u+soil.dtilelib:tiles/water/1x1-water-u+soil.dtile · Open in the editor
Generated from dharmatiles elements rock by cargo xtask docs.
A rock's top
A rock takes a top= like a tree's: a cloud, a low surface, a high surface and one weighting, as a height above zero, where $bottom is the land at the rock's foot. It is worked out once for each stone, at the stone's middle: $x and $y are the tile's coordinates there, $d is 0% and $region is the stone's own disc, so parent($region) is the region it stands in (d(parent($region), %) reads how far into it the stone is). The stone rolls one number in the cloud and its peak stands there: the rock keeps its width and its facets and is stretched or squeezed upward to the height the cloud gives it, so it never undercuts.
rock at="(0.5sq, 0.5sq)" size="10dmm" top="$bottom + [4dmm .. 9dmm]"
scatter count=8 { rock top="$bottom + high(3dmm .. 9dmm)" } // a few low, most tall
scatter count=8 { boulder top="$bottom + 3dmm + 6dmm * (1 - d(parent($region), %))" }
Rolls are one smooth field over the tile (stones a square apart are alike), read by rank over the stones of the entry so a weighting's odds hold; a lone stone draws its own roll from its seed. Each stone of a cluster rolls on its own. A plain range builds with every height equally likely. A top that leaves a peak under 1 mm or over 120 mm above the stone's foot is refused with top on the rock's line. A rock without a top= builds as it always has. stone, boulder and pebble take it the same way.
Sizes and levels
- Rocks.
6dmmto15dmmwide, every size equally likely (writesize="low(6dmm .. 15dmm, 3)"to lean small); 2.5–9 dmm tall (height 0.45–0.85 of the width, slabs lower). Stones in a cluster are at least4dmmwide. - Density. 9–12 placements on a 2×2 tile, at least
1.5dmmapart. A placement that finds no free spot is dropped. - Ground. The dirt surface sits
4dmmabove the base datum, inside the DungeonBlocks dirt band. Rocks sink0.55dmminto it, so no gap shows under them.
Edges and joining tiles
- Every rock lies inside the tile, at least 1 mm from its edge. Nothing is cut by the tile boundary, so any rock tile butts against any other.
- The ground between rocks is the shared dirt surface, so a rock tile meets a plain dirt tile with the same texture. Edge levels and the edge contract are on the tile system page.
Rules
What this element always does. A change to one of these is a change to the element.
- Three scales of texture: rough faces, chipped corners and a fine grain. The largest faces stay small.
- Large stones carry engraved cracks a wash can pool in.
- Stones stand bedded in the dirt around them.
- A
top=is read at each stone's middle; the stone keeps its width and facets and its peak stands at the roll, never wider above the ground than at it. buriedis a share written as a percent,buried="20%..50%"(weighted forms too), from 0% to 100%;%is a plain fraction, soburied=0.3is the same 30% andburied=30is out of range; a length there isdt::type.- A rock is seated on the land as it is laid, grain included: its foot is under the lowest land it can touch, so no gap shows under it (the build notes
seat_gap_maxandseat_gap_stonesmeasure it).
Printing and painting
- No supports. Print base down with a 0.4 mm nozzle. No face points down more than 30° past vertical, well inside the project's 55° limit. Rock may lean to 65° anywhere (its faces in the 55–65° band are painted orange and not counted against the band's budget), so a rougher underside still passes.
- No floating pieces. Each rock and cluster is fused into the ground; the tile is one watertight body that survives a float32 reload.
- Small rocks stay printable. Chip depth scales with the rock's size, and the grain is only about 0.12 mm high and fades to nothing at the base.
- Painting. Prime dark and drybrush: the crisp facet edges catch the highlight and the grain gives the brush something to grip.
The full printing rules are on the printing page.
How it is made
Step by step
A rock is a convex body cut by planes. The facets come from cutting half-spaces away, not from pushing a surface around, so the edges stay crisp and the facets come in mixed sizes. That is also why every rock is closed and prints: it is one convex solid with a flat base.
The animation is a simplified stand-in for the idea, drawn in your browser; it is not the program's output. What the program does, in order:
- Body: the convex hull of a profile that never widens going up (dome, slab, block or wedge), with lumps that depend only on the angle round it.
- Facets: blue-noise seeds of mixed sizes on the body; each seed's tangent plane, tilted up to 14°, cuts the body. No cut may leave a face pointing down past 30°.
- Chips: small planes at the corners and along edges sharper than 18°, 8 to 16 a rock, each refused if it would remove more than 3% of the volume.
- Scale and grain: the shape is scaled to the system like a photocopy, then given a fine grain in true millimetres.
- Seat: each rock is set into the ground under it, 0.25 mm below the lowest point of its footprint, so it never floats on a slope.
- Scatter: a quarter of placements are clusters of 2 to 4 stones; the largest go first, 1.5 mm apart and 1 mm inside the rim.
The code: crates/dt-elements/src/rock.rs.
Stone finish
Rocks, cliffs and walls share one idea of what worked stone looks like at miniature scale. Photos and measured DungeonBlocks floors show the same thing: stone reads as a calm plateau carved downward. Most of a face is flat; the relief is recesses, worn channels and shallow dished patches, with almost nothing finer than 2 mm. Even waves of noise, which go up as much as down, read as choppy water or wrinkled cloth instead.
- The relief. Wall blocks, floor slabs and fieldstone carve a smooth noise field downward only where it passes a threshold, so about half of each face stays untouched, then add a gentle dish so big faces are not dead planes. The noise has no direction, so nothing lines up on a flat face.
- Rocks and cliffs. Rocks get their texture from their facets and chipped corners, with a fine grain on top. Cliffs use their own cuts and grain.
- Discrete marks stay separate. Chips, cracks and spalls are their own steps; the relief only supplies the calm between them.
Seen from the language
The guide pages that use rock: The stack, Placement and scatter, Values and ranges, Weighted ranges, Clouds, Things and layers.
