feat(gfx): per-plant flora size, placement & tint variation (#675) - #676
Merged
Conversation
All flora of a species rendered identically: solid flora stamped the same full-cell shape for every individual, and cross-billboard plants sat dead-centre on the grid with one fixed rosette orientation, their triangular per-cell jitter averaging back to a uniform carpet. - Solid flora: per-column bell x rare outliers (~0.45..1.0) plus a height-vs-radius squash; shrink-only, collider scales with the visual (AddShapedBlock sizeXZ/sizeY, building shapes pass 1/1 and stay exact). - De-grid: per-plant XZ offset (width re-clamped inside the cell) and rosette spin, keyed per column so kelp/vine strands stay straight. - Visible distribution: FloraScale blends the fine bell 50/50 with a coarse 8x8-cell patch hash (meadows form tall/short patches); FloraOutlier adds ~5 % giants and ~8 % runts. Torches stay exempt. - Tint jitter: +/-8 % per-column wobble on the species tint (flora_* only). - Atlas: silhouette-aware variant tiles (sparser/darker via cutout-alpha edge erosion; lighter/warmer) for 8 signature flora species; flora slots fill after the ground ones so shipped variant positions are unchanged. Client-only, pure world-position hashes: deterministic across clients and remeshes, no protocol/save changes, applies to existing worlds. Closes #675 Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Summary
All flora of a species rendered identically — solid flora (cactus/crystal/mushroom/...) stamped the same full-cell shape for every individual, and cross-billboard plants sat dead-centre on the grid with one fixed rosette orientation, their per-cell triangular jitter averaging back to a uniform carpet at viewing distance.
Everything below is client-only (
ChunkMesher.cs,BlockTextureAtlas.cs), derived from pure world-position hashes: deterministic across clients and remeshes, zero protocol/save changes, applies to existing worlds. The block footprint stays exactly one cell.AddShapedBlockgained optionalsizeXZ/sizeYand scales face coords BEFORE emission, so normals/tangents derive from final geometry and the collider (same verts) matches the visual. Player-built shapes pass 1/1 and stay exact.AddCrossPlantre-clamps the rosette half-width by the offset magnitude so the floor line stays inside the cell) + rosette spin (+/-30 deg). Keyed per COLUMN (wy = 0) so stacked kelp/vine strands stay one straight, consistently-rotated strand.FloraScaleblends the fine per-cell bell 50/50 with a coarse 8x8-cell patch hash (meadows form patches of tall and short growth — the scale the eye actually registers);FloraOutlieradds ~5 % giants (x1.4-1.6) and ~8 % runts (x0.5-0.65), keyed per column so an outlier is outsized in every dimension. Torches stay fully exempt.flora_*keys (tree leaves/logs untouched) and kept small so species identity incl. toxic-colour recognition stays readable.Verification
dotnet build -c Release: 0 warnings.closes #675
🤖 Generated with Claude Code