feat(three/tree-layer): stronger canopy shape variety for spherical tree types#540
Open
charlieforward9 wants to merge 1 commit intovisgl:masterfrom
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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* 0.3)* 0.6)[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
🤖 Generated with Claude Code