issues
search
Besjan
/
Terrain-Generator
Generate Unity Terrain from DEM / DGM data.
MIT License
10
stars
4
forks
source link
Smooth outer boundary terrain
#20
Closed
Besjan
closed
4 years ago
Besjan
commented
4 years ago
[x] Make it smoother
[x] Fix direction
[x] Foreach smooth interations:
Foreach terrain point with 0 height:
If at least one neighbour point has non 0 height:
Get average non 0 height neighbours height
Convert average height to meters
Smoothed height = height meters - smooth amount
Smoothed height percent = smoothed height / terrain size.y
Apply smoothed height percent to point
[x] Foreach terrain 0 height, smooth those closer to boundary using: distance to closest boundary point and a factor (points are not uniform)