What it looks like
At tabletop distance grass reads because of its middle-scale order, not its fine detail. Blades gather into ribbons that follow one smooth flow. The flow meanders in gentle S-curves about 15 mm long, and neighbouring ribbons wave together, the way wind lays long grass flat. A 2×2 tile has at least three main directions, never one sweep across the board.
Each blade stands on the dirt by itself: a keel at the bottom, a single-line ridge on top, pointed at both ends, rising from its root and levelling off toward a tip that overhangs open air. Blades overlap downstream like shingles. Between ribbons the dirt shows as dark seams.
With clearings set (none by default; 1.5 per square is a natural meadow, about a tenth of the tile), bare clearings sit in low ground. They are eye-shaped, stretched along the flow. The grass parts at their upstream end and closes again downstream, like water round a stone, and their banks are piles of separate blades. The ground under everything rolls gently: hills rise from flat plains at the tile edge and never dip below it.
Using it in a tile
Grass grows on the surface the stack painted, so write dirt first; the dirt shows between the blades and in the clearings:
dharmatiles version="1.0.0"
tile size="1x1" seed=1 {
stack {
base
dirt
grass
}
}
The stack is built in the order it is listed: the blades grow round the rocks, trees, walls and flowers listed above the grass, so list the grass after them. Most library tiles use a preset:
dharmatiles version="1.0.0"
use "parts/grass" lawn // or long-grass: longer, taller blades
tile size="2x2" seed=4 {
stack {
base
dirt
scatter perSquare=1 { rock size="4dmm .. 8dmm" }
lawn cover="85%" // a definition's params are set like controls
}
}
Every control at once, at its default:
grass length="3.5dmm .. 6.5dmm" height="1.5dmm .. 2dmm" clearings=0 cover="100%" bare="0%" flow=wavy
Reference
at= region, linescatter inside it lands on itControls
| Control | Takes | Default | What it does |
|---|---|---|---|
length | length (dmm), over 0, or a range, or a weighted range | 3.5dmm..6.5dmm | blade length along the ground |
height | length (dmm), over 0, or a range, or a weighted range | 1.5dmm..2dmm | how tall a blade stands over the ground |
clearings | per square, 0 to 20 | 0 | patches of bare earth the grass parts round |
cover | percent, 0% to 100% | 100% | share of the ground grassed over |
bare | percent, 0% to 90% | 0% | the least share left bare: clearings are added until the bare earth, rocks included, reaches it |
flow | word | wavy | how tidily the blades lean together
|
In the library
1x1-grass.dtilelib:tiles/ground/1x1-grass.dtile · Open in the editor1x1-soil+grass-angle.dtilelib:tiles/ground/1x1-soil+grass-angle.dtile · Open in the editor1x1-soil+grass-corner.dtilelib:tiles/ground/1x1-soil+grass-corner.dtile · Open in the editor1x1-soil+grass.dtilelib:tiles/ground/1x1-soil+grass.dtile · Open in the editor1x1-soil-corridor+grass.dtilelib:tiles/ground/1x1-soil-corridor+grass.dtile · Open in the editor1x1-soil-corridor-open+grass.dtilelib:tiles/ground/1x1-soil-corridor-open+grass.dtile · Open in the editor1x1-soil-corridor-t+grass.dtilelib:tiles/ground/1x1-soil-corridor-t+grass.dtile · Open in the editor1x1-soil-corridor-turn+grass.dtilelib:tiles/ground/1x1-soil-corridor-turn+grass.dtile · Open in the editor1x1-soil-corridor-x+grass.dtilelib:tiles/ground/1x1-soil-corridor-x+grass.dtile · Open in the editor1x1-soil-u+grass.dtilelib:tiles/ground/1x1-soil-u+grass.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.dtilelib:tiles/water/1x1-water+grass.dtile · Open in the editor1x1-water-corridor+grass.dtilelib:tiles/water/1x1-water-corridor+grass.dtile · Open in the editor1x1-water-corridor-open+grass.dtilelib:tiles/water/1x1-water-corridor-open+grass.dtile · Open in the editor1x1-water-corridor-t+grass.dtilelib:tiles/water/1x1-water-corridor-t+grass.dtile · Open in the editor1x1-water-corridor-turn+grass.dtilelib:tiles/water/1x1-water-corridor-turn+grass.dtile · Open in the editor1x1-water-corridor-x+grass.dtilelib:tiles/water/1x1-water-corridor-x+grass.dtile · Open in the editor1x1-water-u+grass.dtilelib:tiles/water/1x1-water-u+grass.dtile · Open in the editor
Generated from dharmatiles elements grass by cargo xtask docs.
Sizes and levels
- Tile. Any size in 35 mm squares; 2×2 by default.
- Blades. 2.8–7.2 mm long (longer toward the downstream end of each swath), 2–4 lines (0.9–1.8 mm) wide, 1.5–2.0 mm tall. No grass stands more than 3.5 mm above the local ground.
- Grass top. The mean grass top sits in the DungeonBlocks grass band: 4.4–5.9 mm above the terrain datum (15.3–16.8 mm above the bottom of the piece). Seed 1 measures 5.24 mm.
- Ground. The tile edge is at 3.4 mm, the lowest ground on the tile. Hills rise from it to about 6.6 mm; at least 60% of the tile slopes 12° or less and nothing passes 34°.
- Grass reaches its edge. Where grass grows in a region, it runs up to the region's edge (a line, another region, the waterline) whichever way the flow runs there: wherever ground within 4 mm of the edge would have no blade over it, a blade is started upstream of it so its full part lies over the ground, or grown back against the edge where the edge is right behind it. The tile's own edge keeps its rim rule.
- Clearings. None unless
clearingsorbareasks for them;clearings=1.5draws 1.3–1.8 per square, at least 13 mm apart and 7 mm from the rim, covering about 10% of the tile, sunk 0.4 mm below the grass ground.
Edges and joining tiles
- The ground feathers to the 3.4 mm edge level over the last 9 mm, so any two grass tiles meet flush at the ground.
- Grass is never sliced at the edge. Blades are shortened so their tips stop just inside the wall, by a varying amount, so the rim is never a ruled line.
- No blade crosses the tile's vertical plane: a blade whose width or lean would reach it is moved in until it clears it, so tiles never jam in clips or on a board. The sides below the edge-round stay bare earth.
- Near the rim the flow points at the wall or runs along it, never away from it, so the grass reads as running off the tile into the next one. The blades themselves do not line up across a seam.
- Tile sizes, edge names 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.
- Grass is separate blades, modelled in printer units (0.2 mm layers of whole 0.45 mm lines), standing on dirt with no turf mass under them.
- Grass ends as grass: no bevels, carved walls or steps at its border. Its height exists only as blades, and a bank is a pile of blades.
- Hills rise from a constant perimeter; nothing dips below the edge level.
- Blades curve coherently: a flow carries their direction. Blades at the rim never point away from the edge.
- Bare patches are natural in size, not scaled to fit; grass presses against rocks rather than leaving a ring round each one.
- Grass is as thick between rocks as on open ground: scattered stones take only the ground they stand on.
at=names the region it grows in; a point is refused (dt::type). With neither it grows on all the open dirt.
Printing and painting
- No supports, by construction. Each blade is a stack of 0.2 mm layers, each a whole number of 0.45 mm lines wide; nothing is narrower than one line, so the slicer drops nothing. Each layer reaches at most half a line past the one below.
- Undercut tips. Only the top layer reaches the tip; each layer below stops 0.2 mm short. The tip therefore overhangs air by design, in steps a printer can bridge.
- No islands. Every blade is sunk 0.3 mm into the ground. The STL is one watertight body that survives a float32 reload.
- FDM or resin. The STL is the stroke stack smoothed: the layer steps are melted, but the outline, keel and points are kept, so it also prints cleanly on resin.
- Painting. Prime dark and drybrush. Crests catch the highlight; the gaps between blades, the air under each tip and the seams between ribbons stay dark.
- File size. A 2×2 tile is about 1.7 million faces and 87 MB, and takes about 100 s to build.
The full printing rules are on the printing page.
How it is made
Step by step
Grass reads at tabletop distance because of how it is organised at mid scale: ribbons that flow, meander and part round clearings and obstacles. The blades themselves are built in printer units, stacks of 0.2 mm layers each a whole number of 0.45 mm lines wide.
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:
- Flow: a direction field over the tile, with an in-phase meander (neighbouring streamlines wave together, like combed hair).
- Clearings and obstacles: patches of bare earth, and the footprints of rocks, trunks, walls and flowers (built first), part the flow; it wraps round them. Pebbles and stones narrower than the shortest blade do not: the blades run up to them and tuck against them.
- Strands: streamlines traced along the flow from seeds 1.9 mm apart, blades rooted along them; a root that falls under a solid moves along its streamline to where it leaves the solid and grows there, and blades stand lower beside one.
- Edge blades: after the strands, ground near the area's edge that no blade covers gets a blade of its own, grown and shortened by the same rule as every other.
- Blades: each a loft through one outline per 0.2 mm layer, whole 0.45 mm lines wide, draped on the ground; where the ground slopes the layers follow it only so far that nothing overhangs past 55°.
- Shingling: blades overlap like shingles; they are grouped into solids of mutually clear blades and unioned.
The code: crates/dt-elements/src/grass/.
Seen from the language
The guide pages that use grass: The stack, Worked tiles.
