Skip to content

feat(three/tree-layer): stronger canopy shape variety for spherical tree types#540

Open
charlieforward9 wants to merge 1 commit intovisgl:masterfrom
Agriculture-Intelligence:feat/tree-layer-stronger-canopy-variety
Open

feat(three/tree-layer): stronger canopy shape variety for spherical tree types#540
charlieforward9 wants to merge 1 commit intovisgl:masterfrom
Agriculture-Intelligence:feat/tree-layer-stronger-canopy-variety

Conversation

@charlieforward9
Copy link
Collaborator

Problem

The existing per-tree randomisation (random yaw + ±15% XY scale) has no visible effect on spherical canopy meshes (oak, cherry, birch, citrus). A sphere is rotationally symmetric, so yaw rotation alone changes nothing. The ±15% asymmetric XY scale creates an ellipsoid, but the variation is too subtle to read as distinct individuals in a dense farm/orchard row.

Changes

modules/three/src/tree-layer/tree-layer.ts_buildCanopyLayer

Before After
XY scale asymmetry ±15% (* 0.3) ±30% (* 0.6)
Orientation [0, yaw, 0] [pitch ±12°, yaw, 0]

The pitch component (± 12°) is derived from the same position seed as yaw so it is deterministic and stable across re-renders. Combined with the wider ellipsoid, each tree now presents a clearly distinct silhouette when viewed from a typical oblique / 3D map perspective (30–60° pitch).

Pine trees also benefit: the wider asymmetric scale makes layered tier silhouettes more varied across branch-level groups.

Visual impact

  • Dense orchards (citrus, oak, cherry) now show individual tree character instead of identical spheres
  • Pitch variation is subtle enough to read as natural lean rather than artificial tilt
  • No change to picking, performance, or API surface

🤖 Generated with Claude Code

…ree types

Increases per-tree XY scale asymmetry from ±15% to ±30% so that spherical
canopy meshes (oak, cherry, citrus) produce visually distinct ellipsoid shapes
rather than near-identical circles when viewed at farm viewing angles.

Adds a small random pitch component (±12°) to the canopy orientation so the
lean of each canopy varies independently of yaw, giving more silhouette variety
from oblique / 3D map perspectives.

Previously the random yaw was the only orientation signal, but a perfect sphere
is rotationally symmetric so yaw alone had no visual effect. The combination of
a larger asymmetric XY scale and a random pitch makes each tree read as a
distinct individual even in large uniform-spacing orchards.

Pine trees benefit too: the wider asymmetric scale makes tier silhouettes more
varied across branch-level groups.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant