Skip to content

Agent skill for creative 3D visualization: turn an idea into a Three.js/Blender scene worth exploring. Claude Code + Codex plugin, 223 recipes, 440 knowledge records, 22 proved kits, 37 runnable studies.

5.1 KB
Raw Blame
{
  "schema_version": 1,
  "id": "knowledge.reasoning-terrain-height-authority",
  "revision": 1,
  "status": "active",
  "record_kind": "creative",
  "knowledge_kind": "reasoning-rule",
  "title": {
    "en": "One elevation function owns ground contact"
  },
  "aliases": {
    "en": [
      "terrain height authority",
      "single height field",
      "grounding placement"
    ]
  },
  "direction_ids": [
    "environments-dioramas",
    "earth-environment"
  ],
  "summary": "Sample the same elevation function that renders the ground when placing buildings, roads, water and walkable paths.",
  "objective": "Decide which representation owns terrain elevation so that placement, traversal and the rendered surface cannot disagree.",
  "applies_when": [
    "A scene has non-flat terrain and objects that must rest on it.",
    "Buildings, props or vegetation are scattered procedurally or from a layout table.",
    "A camera or character walks, drives or hovers over the ground.",
    "Water level, roads or foundations are placed relative to the landscape."
  ],
  "constraint_level": "correctness",
  "subject_terms": [
    "terrain",
    "height field",
    "ground contact",
    "scatter placement",
    "displacement",
    "walkable surface"
  ],
  "tags": [
    "reasoning-rule",
    "correctness",
    "terrain",
    "placement"
  ],
  "intent_signals": [
    "objects float above or sink into terrain",
    "place buildings on a hillside",
    "walk over uneven ground"
  ],
  "example_prompts": [
    "Scatter houses and trees over the hills so nothing floats or sinks.",
    "Let me walk over the island terrain instead of sliding across a flat plane."
  ],
  "negative_signals": [
    "Deliberately floating architecture, dream logic or a stylised world where contact with the ground is not intended.",
    "Flat-stage scenes where every object shares one ground plane."
  ],
  "not_for": [
    "Deliberately floating architecture, dream logic or a stylised world where contact with the ground is not intended.",
    "Flat-stage scenes where every object shares one ground plane."
  ],
  "content": {
    "principles": [
      "Terrain elevation is application state, not a look. If mesh displacement, the placement routine and the walking controller each compute height in their own way, the three drift apart and the mismatch appears as floating or buried objects.",
      "A height source can be a noise or spline function, a sampled height array, or a collider raycast. What matters is that one of them is authoritative and the others are derived from it. Where the ground is not a single-valued surface, because of bridges, overhangs, caves or stacked storeys, the authority becomes a surface-identity query rather than one elevation per horizontal position, and consumers must say which surface they mean.",
      "Placement needs more than a height value: slope and normal decide whether a foundation should be cut, terraced or rejected."
    ],
    "implementation": [
      "Choose the authority first: an analytic height function for procedural worlds, a height array for imported or edited terrain, a collider raycast when the ground includes overhangs or separate props.",
      "If the renderer displaces vertices in a shader, that displacement is not automatically available to placement or gameplay code on the CPU. Bridge it deliberately: evaluate the same function on the CPU, sample the same source data, or perform an explicit GPU readback or compute query, and say which of these the scene relies on.",
      "Return position, surface normal and slope from one query, then let each consumer decide: cut a flat pad, add a plinth or stilts, terrace the slope, or exclude the site.",
      "Store the sampled elevation with the placement so a later terrain edit can report which instances became stale instead of silently detaching."
    ],
    "observable_checks": [
      "Move the camera to a grazing angle at the base of scattered objects on a slope; gaps and sunken corners are visible there and invisible from above.",
      "Change one terrain parameter, such as amplitude or seed, and confirm placed objects either follow the new surface or are reported as stale.",
      "Walk or drive across a steep region and a valley floor; a controller reading a different height source snaps, hovers or falls through.",
      "Check a water plane against shoreline geometry: a constant water height crossing an inconsistent ground surface shows flooded interiors."
    ]
  },
  "related_ids": [
    "recipe.terrain-island",
    "recipe.fantasy-village-diorama",
    "knowledge.terrain-landmark-rhythm"
  ],
  "creative_affordances": [
    "Terraces, retaining walls, stilts and carved pads are all legitimate answers to a steep site; the rule constrains consistency, not architectural language.",
    "Deliberate exceptions such as a floating shrine stay expressive as long as they are authored exceptions rather than sampling bugs."
  ],
  "known_limits": [
    "Authored construction guidance; no runtime scene has been rendered or measured for this record.",
    "Says nothing about terrain generation quality, erosion realism or level-of-detail strategy."
  ],
  "claims": []
}