Meld
Docs menu
world features

Farmlands & crops

OpenStreetMap knows where farmland is, but not what it looks like: a tagged field is just a polygon. Before Meld 1.8.0 “Farmlands”, that polygon rendered as one flat carpet of farmland blocks, and the countryside, which is most of any country, read as filler. The farmland system (Meld 1.8.0, Arnis fork 3.0.4) replaces the carpet with agricultural land that behaves like the real thing.

Why it exists

Real farmland has structure you can see from the air: parcels at different angles, long strips next to blocky plots, different crops at different stages of growth, hedges and rocks between them. None of that is in the map data, so the generator has to invent it, and invent it deterministically, because Meld renders a world as many parallel cells and two neighbouring cells must agree on every field they share. Everything on this page is a pure function of position and seed, so parcels and crops line up across cell seams.

How it works

Parcels that follow the roads

Farmland is cut into rotated field parcels, long strips and blocky plots, that sit in orientation domains aligned to the nearby road network, the way real fields align to the lanes that serve them. Domain borders wander organically instead of running straight, and the farmland feathers into the surrounding grassland rather than ending at a hard polygon edge. Parcel sizes track the map scale, and a Pattern size slider (25 to 400 percent, the fork’s --field-scale) zooms the whole pattern.

Real crop plots

A Farm plots slider group (the fork’s --farm-crops) weights seven plot kinds: wheat, potato, carrot, beetroot, sunflower rows, pumpkin patches, and fallow. Each field grows one crop at one growth stage, and neighbouring fields ripen differently, so the patchwork you see from a hill looks like a season in progress rather than a texture. Stray bird-sown patches and hay-bale bundles break up the monoculture, and sunflower fields cluster in the low, open parts of the map, which is where they grow in real life.

The crop system also got its hardest bug report from a real server: “the crops would be black and then break”. Crops were missing from the generator’s light-transparency list, so the skylight scan treated wheat as opaque and wrote SkyLight 0 into every crop’s own cell; the client rendered it black, then destroyed it, because a crop needs light 8. Measured on a real farmland world before the fix: 3,211,825 of 3,211,825 crop cells at SkyLight 0. Fork 3.0.6 added crops (and stems, cocoa, torchflower, pitcher crops and big dripleaf) to the list; they bake at 15 now.

Three land profiles

The texture covers more than tagged farmland. A Profile picker gives each land kind its own mix of five shares (coarse dirt / plains / flowers / farmland / moss, click-to-type on every slider):

These map to the fork’s --grass-mix and --land-mix flags. Everything carries vanilla-density ground cover: short grass, ferns, large ferns, tall grass, ten wildflower species, sunflowers, dead bushes and moss. The release added 11 new blocks to the fork’s palette to make that possible.

Rocks and bushes

One selector (Rocks + bushes / Rocks / Bushes / None) scatters 8 rock formations and 60 bush schematics at random rotations across farm, grass and untagged land: bushes land in roughly 5% of chunks and rocks in about 2%, and never on rivers, lakes, roads or tilled fields. Nothing floats either, sunflowers, moss and schematic pieces refuse to stamp over water, and stray snow needs real mountain relief before it caps a field.

What it costs

Fork 3.1.1 made the texture much cheaper without changing a block. Measured on the farmland-dense Flevoland bbox upstream used to report the regression (61 farmland polygons, one process, best of three runs): peak memory fell from 4929 MB to 1333 MB and generation time from 24.5 s to 11.8 s, with every render verified byte-identical to 3.1.0 by world hash.

How to use it

  1. Open Settings and the Farmland texture drawer.
  2. Pick a profile and drag the five shares. Plains 60% means roughly 60% of that land kind becomes open grass.
  3. Weight the Farm plots sliders if you want, say, a sunflower-heavy valley or no pumpkins.
  4. Press Preview pattern. The preview canvas mirrors the generator, angled parcels, domain borders, per-crop tints, vegetation speckle and scatter dots, with scroll-zoom, so you can check the look before rendering anything.
  5. Leave “Also texture open grassland” and “Also texture untagged land” on (the default) unless you want the effect confined to tagged farmland only.

The pattern reads best from 1:10 and closer, where parcels are big enough to walk through; see Choosing a scale. Related reading: Terrain & snow for the snow modes that interact with fields, Region tree packs for what grows between them, and The Arnis fork for where the engine lives.