Repository navigation
Reduce Gaussian blur to preserve mountain terrain detail - #896
Merged
Merged
Conversation
The terrain sigma floor (×12) was designed to suppress SRTM rooftop artifacts in dense urban areas (Manhattan), but it flattened mountains into gentle walkable slopes everywhere. Reduce to ×3 (still covers Voronoi-block suppression from NaN-fill) and halve BASE_SIGMA_REF from 5.0 to 2.5 so the grid-proportional component also preserves more detail. Result: mountains now have 2-3 block steps on steep faces (realistic cliff terrain) while cities remain smooth (~0.4 max step). The slope-based material system (grass → gravel → stone) will activate more often on steep terrain, adding visual realism. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
⏱️ Benchmark run finished in 0m 47s 📈 Compared against baseline: 30s 🚨 This PR drastically worsens generation time. 📅 Last benchmark: 2026-04-06 19:34:55 UTC You can retrigger the benchmark by commenting |
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts elevation smoothing parameters in fetch_elevation_data to reduce over-blurring so mountainous terrain retains sharper features while still smoothing NaN-fill/Voronoi artifacts and minor SRTM noise.
Changes:
- Reduce the terrain-floor blur multiplier from ×12 to ×3.
- Halve the grid-reference blur constant (
BASE_SIGMA_REF) from 5.0 to 2.5. - Update inline documentation and unit tests to reflect the new sigma behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rename test_output_sigma_large_bbox_no_regression to test_output_sigma_large_bbox_grid_dominates and update its comment to accurately reflect what it tests: that sigma_from_grid wins for large areas, without implying value parity with the old constants. Co-Authored-By: Claude Opus 4.6 <[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.
The terrain sigma floor (×12) was designed to suppress SRTM rooftop artifacts in dense urban areas (Manhattan), but it flattened mountains into gentle walkable slopes everywhere. Reduce to ×3 (still covers Voronoi-block suppression from NaN-fill) and halve BASE_SIGMA_REF from 5.0 to 2.5 so the grid-proportional component also preserves more detail.
Result: mountains now have 2-3 block steps on steep faces (realistic cliff terrain) while cities remain smooth (~0.4 max step). The slope-based material system (grass → gravel → stone) will activate more often on steep terrain, adding visual realism.