What it looks like
Miniature bare earth, readable at four scales at once. Broad, low rises swell up to about 3 mm from the edge level, with flat plains between. Over them lie soil clods: lumpy crumbs in patches, with smoother tamped ground between the patches. A fine grit and a few sand grains cover everything. Pebbles gather in loose clusters, mostly in the low ground, as if washed there: many small ones (0.5–1.5 mm) and some medium (2.2–4.5 mm). Dirt beds no larger stones: rocks on it are a scatter listed after it (scatter perSquare=1 { rock size="4dmm .. 8dmm" }), or a single rock. There are no footprints, no tracks and, by default, no cracks.
Every patch of the surface keeps at least one printed layer of relief, so a dark primer and a drybrush pick out the clod tops and pebble facets everywhere, not just in a render.
The dirt texture is also the exposed ground in every other lab: grass stands on it, water's shore and banks use it, and rocks sit in it.
Using it in a tile
The plainest tile is dirt on its own: the library's top, hills spanning 1dmm over the ground height. top sets how high it may be, bumpSize how wide its hills are, and clods how cloddy the soil is:
dharmatiles version="1.0.0"
tile size="1x1" seed=13 {
stack {
base
dirt top="[$groundHeight .. $groundHeight + 2.5dmm]" bumpSize="14dmm" { // hills up to 2.5dmm, about 14dmm across
clods some // or: none, few, many
}
}
}
With clods=none the dirt is plain: its hills alone, with no soil roughness, clods, grit or pebbles. A pond's bed, or ground a tree or a wall stands on, can be written so.
Under other elements, write dirt first and let the rest stand on it. Restrict it to a region with at=:
dharmatiles version="1.0.0"
tile size="1x1" seed=42 {
line margin wobble="5dmm" { through "n" "s" }
region meadow { boundedBy margin; fill "(0.25sq, 0.5sq)" }
stack {
base
dirt
grass at=meadow
}
}
Against a cliff, the bank is drawn: the dirt is pinned high under the cliff and given a wide band across the apron beside it, and a scatter written inside it lands on it (from 2x1-cliff). A second dirt laid on the cliff's stones lies on their tops, as it would on any surface:
dirt top="$dirtEdgeHeight" {
pin top="[$dirtEdgeHeight .. $dirtEdgeHeight + 3.5dmm]" at=apron
pin top="$dirtEdgeHeight + [1.5dmm .. 3.5dmm]" at=crag
scatter perSquare=45 { pebble size="1dmm .. 2.2dmm" buried="20%..50%" }
}
dirt top="$bottom + [0.6dmm .. 1.2dmm]" at=crag // 0.6 to 1.2dmm over whatever is under it, where that is under 35°
A dirt lies on loose rocks the same way, when it is listed after them: the stack is built in the order it is listed, so the rocks stand first, and the dirt lies on their tops where they are flat enough (a dome is steeper than 35°, so a flat-topped slab holds dirt and a boulder does not). The same holds for a scatter that mixes rocks with trees and flowers, and for a dirt listed after a tree: it banks against the trunk and never lies on a crown, and it covers the foot of a flower. A dirt listed before them is laid first, and they stand on it, the rocks bedding into it as always.
dirt
scatter count=2 { rock shape=flat size="14dmm .. 17dmm" }
dirt top="$bottom + [0.6dmm .. 1.2dmm]" // on the tops of the flat ones
Reference
at= region, linescatter inside it lands on itControls
| Control | Takes | Default | What it does |
|---|---|---|---|
top | height | — | the band the body fills over its region, as a height: $dirtEdgeHeight + 35dmm; the library's edge top when not written |
bumpSize | length (dmm), 5 to 70 | — | how wide the hills are in its band: broad and rolling, or choppy |
clods | word | some | lumps of earth on the surface
|
maxSlope | angle (deg), 5 to 85 | 35deg | the steepest surface under it that dirt stays on; on anything steeper it slides off and leaves it bare |
In the library
1x1-cliff-corner.dtilelib:tiles/cliffs/1x1-cliff-corner.dtile1x1-cliff-mound.dtilelib:tiles/cliffs/1x1-cliff-mound.dtile1x1-cliff-spire.dtilelib:tiles/cliffs/1x1-cliff-spire.dtile1x1-cliff.dtilelib:tiles/cliffs/1x1-cliff.dtile2x1-cliff-blocks.dtilelib:tiles/cliffs/2x1-cliff-blocks.dtile2x1-cliff-escarpment.dtilelib:tiles/cliffs/2x1-cliff-escarpment.dtile2x1-cliff-needles.dtilelib:tiles/cliffs/2x1-cliff-needles.dtile2x1-cliff-rubble.dtilelib:tiles/cliffs/2x1-cliff-rubble.dtile2x1-cliff.dtilelib:tiles/cliffs/2x1-cliff.dtile2x2-cliff-canyon.dtilelib:tiles/cliffs/2x2-cliff-canyon.dtile2x2-cliff-corner.dtilelib:tiles/cliffs/2x2-cliff-corner.dtile2x2-cliff-massif.dtilelib:tiles/cliffs/2x2-cliff-massif.dtile2x2-cliff-plateau.dtilelib:tiles/cliffs/2x2-cliff-plateau.dtile1x1-floor-planks.dtilelib:tiles/floors/1x1-floor-planks.dtile1x1-floor-stone-wall.dtilelib:tiles/floors/1x1-floor-stone-wall.dtile1x1-floor-stone.dtilelib:tiles/floors/1x1-floor-stone.dtile1x1-grass-flowers.dtilelib:tiles/ground/1x1-grass-flowers.dtile1x1-grass-tree.dtilelib:tiles/ground/1x1-grass-tree.dtile1x1-grass.dtilelib:tiles/ground/1x1-grass.dtile1x1-soil+grass-angle.dtilelib:tiles/ground/1x1-soil+grass-angle.dtile1x1-soil+grass-corner.dtilelib:tiles/ground/1x1-soil+grass-corner.dtile1x1-soil+grass.dtilelib:tiles/ground/1x1-soil+grass.dtile1x1-soil-corridor+grass.dtilelib:tiles/ground/1x1-soil-corridor+grass.dtile1x1-soil-corridor-open+grass.dtilelib:tiles/ground/1x1-soil-corridor-open+grass.dtile1x1-soil-corridor-t+grass.dtilelib:tiles/ground/1x1-soil-corridor-t+grass.dtile1x1-soil-corridor-turn+grass.dtilelib:tiles/ground/1x1-soil-corridor-turn+grass.dtile1x1-soil-corridor-x+grass.dtilelib:tiles/ground/1x1-soil-corridor-x+grass.dtile1x1-soil-u+grass.dtilelib:tiles/ground/1x1-soil-u+grass.dtile1x1-soil.dtilelib:tiles/ground/1x1-soil.dtile2x1-tree-row.dtilelib:tiles/ground/2x1-tree-row.dtile2x2-glade.dtilelib:tiles/ground/2x2-glade.dtile2x2-grass-tree.dtilelib:tiles/ground/2x2-grass-tree.dtile1x1-wall-brick-corner.dtilelib:tiles/walls/1x1-wall-brick-corner.dtile1x1-wall-brick.dtilelib:tiles/walls/1x1-wall-brick.dtile1x1-wall-fieldstone-corner.dtilelib:tiles/walls/1x1-wall-fieldstone-corner.dtile1x1-wall-fieldstone.dtilelib:tiles/walls/1x1-wall-fieldstone.dtile1x1-wall-stone-corner.dtilelib:tiles/walls/1x1-wall-stone-corner.dtile1x1-wall-stone.dtilelib:tiles/walls/1x1-wall-stone.dtile2x2-wall-curve.dtilelib:tiles/walls/2x2-wall-curve.dtile1x1-water+grass-angle.dtilelib:tiles/water/1x1-water+grass-angle.dtile1x1-water+grass-corner.dtilelib:tiles/water/1x1-water+grass-corner.dtile1x1-water+grass-tree.dtilelib:tiles/water/1x1-water+grass-tree.dtile1x1-water+grass.dtilelib:tiles/water/1x1-water+grass.dtile1x1-water+soil-angle.dtilelib:tiles/water/1x1-water+soil-angle.dtile1x1-water+soil-corner.dtilelib:tiles/water/1x1-water+soil-corner.dtile1x1-water+soil.dtilelib:tiles/water/1x1-water+soil.dtile1x1-water-corridor+grass.dtilelib:tiles/water/1x1-water-corridor+grass.dtile1x1-water-corridor+soil.dtilelib:tiles/water/1x1-water-corridor+soil.dtile1x1-water-corridor-open+grass.dtilelib:tiles/water/1x1-water-corridor-open+grass.dtile1x1-water-corridor-open+soil.dtilelib:tiles/water/1x1-water-corridor-open+soil.dtile1x1-water-corridor-t+grass.dtilelib:tiles/water/1x1-water-corridor-t+grass.dtile1x1-water-corridor-t+soil.dtilelib:tiles/water/1x1-water-corridor-t+soil.dtile1x1-water-corridor-turn+grass.dtilelib:tiles/water/1x1-water-corridor-turn+grass.dtile1x1-water-corridor-turn+soil.dtilelib:tiles/water/1x1-water-corridor-turn+soil.dtile1x1-water-corridor-x+grass.dtilelib:tiles/water/1x1-water-corridor-x+grass.dtile1x1-water-corridor-x+soil.dtilelib:tiles/water/1x1-water-corridor-x+soil.dtile1x1-water-u+grass.dtilelib:tiles/water/1x1-water-u+grass.dtile1x1-water-u+soil.dtilelib:tiles/water/1x1-water-u+soil.dtile1x1-water.dtilelib:tiles/water/1x1-water.dtile3x3-water.dtilelib:tiles/water/3x3-water.dtile
Generated from dharmatiles elements dirt by cargo xtask docs.
Sizes and levels
- Tile. Any size in 35 mm squares.
- Edge height. The library pins the first dirt to
$dirtEdgeHeight,3.4dmmabove the base, at every tile edge (library/parts/edges.dtile); a pin the tile writes later wins where they overlap. - A cloud top.
top="$groundHeight + low(0dmm .. 3dmm)": the hills are one smooth surface whose heights come up as often as the weighting says (Clouds); a pin replaces the cloud where it holds and the dirt eases back at its slope. - Hills in a band. The default top is
[$groundHeight .. $groundHeight + 1dmm]: broad hills (bumpSize) spanning that band, easing down to the edge pin at the dirt's slope,24degunless it says otherwise. Where the band is wide (a bank drawn between a bed and the land) the dirt takes the smoothest surface the band allows. - Pebbles. Per square: 45–75 small pebbles (0.5–1.5 mm) and 8–13 medium (2.2–4.5 mm).
- Flat ground. A single height for
topis flat, exactly:dirt top="$groundHeight".
Edges and joining tiles
- The grain runs on to the rim and over the edge-round: no fade, no frame and no bare strip. The edge height is the most the rim reaches, not an exact level: the grain is set into the surface, so the rim sits up to the grain's depth under it at its low points and its high points reach it (within about 0.4 mm at the library's defaults). Dirt tiles touch at their high points.
- The tile's sides carry the same grain as the top, low relief: set back behind the plane up to 0.6 mm at the 35 mm square (never under the printer's one line, 0.45 mm), continuous with the top's grain over the edge-round and round the tile's rounded vertical corners, where a face is set back behind both planes at once. At least 15% of a face stays within 0.1 mm of the plane, so neighbours touch. The relief fades to zero over two layers at the base, under the edge-round and at layer boundaries, and never leans out past the overhang angle. Nothing is ever past the plane. Where water lies over the dirt at an edge, the water's side is smooth; where no dirt reaches an edge there is no relief.
- The edge-round belongs to the dirt: 0.2 mm at the 35 mm square, a drop of the top at the rim cut from the sharp corner at the edge height (so the ground on the edge is at the edge height less 0.2 mm), mitred at the tile's corners and tapering to none on dirt thinner than the printer's skin. It only lowers the top. The tile's four vertical corners are rounded 0.5 mm in plan at the 35 mm square (scaled with the system).
- The surface is set in for the grain: the kit moves the hills down by the greatest height the grain stands to within 6 mm (smoothed over 3 mm) and adds the grain back, so a clod, a pebble or a bank never stands above the surface the band holds, and the surface is lowered only as far as the grain beside it stands, the rim included. The set-in is capped at half the dirt's thickness and never reaches into the printer's skin at the bottom (or the base). It stops short of any water laid over the dirt, so dry ground stays dry.
- Grass, water and cliff tiles meet ground at the same edge level; this is the edge contract on the tile system page.
Rules
What this element always does. A change to one of these is a change to the element.
- Plain earth with clods, grit and half-sunk pebbles: no footprints, no cracks.
- Dirt beds no stones. Rocks on dirt are a
rockor ascatterof rocks, listed in the stack like anything else. - Dirt lies in its region on the surface under it, whatever that is (ground, a floor, a cliff's stones, the tops of loose rocks listed before it), and that surface is its uneven base: its band (
top="$bottom + [0.6dmm .. 1.2dmm]") is measured from the surface, wherever it stands, and its grain is the same on stone as on soil. It does not know what it lies on. A dirt lies on a rock only when it is listed after the rock; listed before, the rock beds into it. This holds for a mixed scatter too, since the stack is built in the order it is listed; a tree's crown is never a surface for dirt, a trunk is a rise the dirt banks against, and a flower the dirt covers is covered. - Dirt stays only where the surface under it is flatter than
maxSlope(35degby default: an angle, which never scales). On anything steeper it slides off and leaves the surface bare, so a cliff's faces are clean. It is not laid where the surface drops away: on the high side of a drop deeper than 1 mm, nor within 1.5 mm of one (at the 35 mm square, scaled with the system like every size), so it never hangs over an edge or bridges a slit between two stones. A rise is no drop: dirt runs up to the foot of a stone and banks against it, where it cannot overhang. The outline is rounded to a few cells so it has no comb. Where dirt is under 2 mm thick over what is under it, no stone is bedded in it. - Pebbles stay off ground steeper than about 22 to 34 degrees (a bank), and off the rim; with
clods=nonethere is no texture at all. - Strong contrast between cloddy and smooth patches, and texture everywhere that shows at 0.2 mm layers.
- Pebbles big enough to read at tabletop distance.
- No frame or rim at the tile edge.
- Exposed ground is dirt on every tile; there is no separate mud texture.
- It is a body of the stack:
top=says how high it may be, as a band (a height, or a range[low .. high]),pinlines hold the band to a height at a place, andat=names the region it fills. The first dirt (the first land layer) starts with the library's top,[$groundHeight .. $groundHeight + 1dmm], and a pin atedgesat$dirtEdgeHeight; a tile's own top replaces the top, and its pins win over the rim pin where they overlap. A second dirt, such astop="$bottom + [0.6dmm .. 1.2dmm]", is a distinct layer and gets no defaults.slope "30deg"in the block sets how steeply this dirt lies (24degby default).checkreads and solves these andbuildfills them. In a top or a pin,$dand$aare the dirt's place in its own region (how far in from its edge, how far round), sotop="$groundHeight + 3dmm * (1 - $d * $d)"is a dome over it. See pin, let and heights.
Printing and painting
- No supports. Print base down at 0.2 mm layers with a 0.4 mm nozzle. The earth, clods and pebbles are one height field, which cannot overhang.
- Texture that survives slicing. In any 1.5 mm window there is at least 0.2 mm (one layer) of relief, over at least 97% of the tile. Dirt reaches about 98%. This is the printable-texture rule.
- Painting. Prime dark, drybrush light: clod tops and pebble facets catch the highlight, and the creases keep the base coat. Paint the pebbles grey after.
- Checked on every build. Each STL is one watertight body that survives a float32 reload.
The full printing rules are on the printing page.
How it is made
Step by step
Dirt is one height field built up in order of scale. The layers are combined with a smooth maximum, not added: adding read as porridge, while the smooth maximum keeps every clod and pebble a distinct object sitting on the ground, with a soft fillet at its foot.
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:
- Hills: the calculator draws broad hills in the dirt's band, the smoothest surface the band allows plus noise spread over as much of the band as there is room, plus a low soil roughness. Where water covers the dirt the texture below fades out.
- Clods: patchy, by a 6 mm patch field that never drops below 30%; each clod is 1–3 lumpy lobes with a flattish tilted top, partly sunk and soft-maxed onto the soil.
- Grit: fine noise and sparse sand grains.
- Pebbles: dart-thrown into loose clusters biased into low ground, largest first; each a flattened cap cut by tilted planes, sunk 25–45%.
- Edge: the texture runs on to the rim; the kit sets it into the band's surface, so the rim is at most the edge level, and cuts the edge-round from the sharp corner.
- Printable texture: every patch keeps at least 0.2 mm of relief in any 1.5 mm window, so a drybrush finds it.
The code: crates/dt-elements/src/dirt.rs.
Seen from the language
The guide pages that use dirt: The stack, Names, Heights, Defaults and the edge contract, Clouds, Worked tiles.
