18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-21 07:24:57 +01:00
Files
maszyna/editor/editorTerrainStreamer.cpp
Claude 60941f2d92 feat(editor): Fields in the Terrain work mode, the ground under them made wavy, natural slopes
A Fields tool beside Fill: LMB outlines a field, which gets the material chosen in the palette
and is kept in a list (terrain/<name>/patches.txt, or in the manifest while there are few),
where its material, repeat, angle, transition and grass are changed later.

- painted into the terrain (the paint of the chunks, its edge blended over a transition and
  shifted by a noise, the 3D grass under it left, taken away or of another kind), or
- a surface of its own: the ground cut away within the outline and the field drawn over the
  hole as a mesh following the heights of the terrain, made around the camera as the water
  is. It doesn't take one of the 8 materials of a chunk; its edge is sharp.

The ground under a field can be made wavy before: rolling hills, furrows, bumps, long waves,
a hollow or a mound, hummocks in a grid, strips of fields; with a profile (rounded, sharp
ridges, sharp valleys, terraces, flat tops), roughness, variation and a fade from the edge.
The chunks under it are made finer where the waves need it.

The formation modifiers get an optional natural shape (natural: wander, scale, gentler,
soften, roughness in the manifest): the formation and the edges of the track bed stay, the
slopes and their foot wander, get gentler and meet the ground softly. Without it the
modifiers shape the ground as before.

Formats: new optional entries patches, patches_file and natural of the manifest, and the
patches file; a terrain without them reads and saves as before, and the release doesn't read
them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
2026-11-11 22:29:27 +01:00

94 KiB