Element · surface

grass

Grass made of separate sculpted blades, combed into meandering ribbons that part round patches of bare earth and wrap round rocks, trees and walls. Each blade is built in printer units, layer by layer, so it prints on a 0.4 mm nozzle without supports.

Two more plants grow on a tile: flower, a thing the grass grows round, and reeds at the waterline. The presets lawn and long-grass are definitions in parts/grass.

Sizes
any tile size; blades 3.5dmm .. 6.5dmm long by default
Printing
no supports; blades are whole 0.45 mm lines on 0.2 mm layers
Bases
DungeonBlocks and OpenLOCK
In the library
ground/1x1-grass, the meadow tiles, walls and water banks
Words used on this page
blade
One sculpted grass leaf: a stack of printed layers with a pointed tip.
flow
The smooth direction the grass leans, field-wide, like combed hair.
ribbon
A strand of blades shingled one after another along the flow, 15–30 mm long.
clearing
An eye-shaped patch of bare earth that the flow parts around.
bank
The edge of the grass where it meets a clearing: a pile of separate blades, not a wall.
undercut
The air under a blade's tip, which casts the shadow that makes grass read.
A one-square tile covered in combed grass blades over dirt
lib:tiles/ground/1x1-grass.dtile, built by the program today.

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

Kind
a surface: it paints the ground of its area
Place
at= region, line
Holds
a scatter inside it lands on it
Built
yes

Controls

ControlTakesDefaultWhat it does
lengthlength (dmm), over 0, or a range, or a weighted range3.5dmm..6.5dmmblade length along the ground
heightlength (dmm), over 0, or a range, or a weighted range1.5dmm..2dmmhow tall a blade stands over the ground
clearingsper square, 0 to 200patches of bare earth the grass parts round
coverpercent, 0% to 100%100%share of the ground grassed over
barepercent, 0% to 90%0%the least share left bare: clearings are added until the bare earth, rocks included, reaches it
flowwordwavyhow tidily the blades lean together
combed
blades lean together, tidily (provisional)
wavy
blades meander together, in phase
wild
blades every which way (provisional)

In the library

Generated from dharmatiles elements grass by cargo xtask docs.

Sizes and levels

Edges and joining tiles

Rules

What this element always does. A change to one of these is a change to the element.

Printing and painting

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.

Plan view, 70 × 70 mm.

    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:

    1. Flow: a direction field over the tile, with an in-phase meander (neighbouring streamlines wave together, like combed hair).
    2. 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.
    3. 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.
    4. 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.
    5. 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°.
    6. 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.