Skip to content

Commit 42bc7f6

Browse files
committed
Draft the Hydrology Phase
1 parent dd746f4 commit 42bc7f6

File tree

2 files changed

+226
-55
lines changed

2 files changed

+226
-55
lines changed

README.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ _Godot 4.4 is currently used Version_
66

77
## Overview
88

9-
We introduce a comprehensive, user-driven pipeline for generating rich, organic terrains. We employ FastNoiseLite to produce a base height map, which is then refined by a cascade of cellular automata filters that expand flat regions, patch & eliminate outliers, and selectively shrink water bodies. Optional directional bias simulates tectonic tilt, while blocky posterization adapts terrains to isometric grids. Graph-based flow accumulation yields road networks, and a two-tier Poisson disk sampler places large structures and smaller objects. We demonstrate the ability to influence random noise into terrain morphology.
9+
We introduce a comprehensive, user-driven pipeline for generating rich, organic terrains. We employ FastNoiseLite to produce a base height map, which is then refined by a cascade of cellular automata filters that expand flat regions, patch & eliminate outliers, and selectively shrink water bodies. Blocky posterization adapts terrains to isometric grids & flow accumulation yields road networks. And a Poisson disk sampler places small objects, such as plant life. We demonstrate the ability to influence random noise into terrain morphology.
1010

1111
## Setup
1212

@@ -26,6 +26,7 @@ gdb --version
2626
## Implementation
2727

2828
1. User Control Inputs
29+
2930
1. Seeding : `int32_t seed`
3031
2. Frequency : `float noiseFrequency`
3132
1. Allow user to define frequency: Lower-frequency noise gives broad zones; higher-frequency adds detail.
@@ -36,19 +37,26 @@ gdb --version
3637
5. Water Reduction Value : `waterRemoval`
3738
1. Water reduction percentage of 0 to 100
3839
2. Ignore values of 10 or lower
40+
3941
2. Produce Random Noise
42+
4043
1. Using FastNoiseLite
4144
2. Allow user to define frequency: Lower-frequency noise gives broad zones; higher-frequency adds detail.
45+
4246
3. Generate Height Map
47+
4348
1. Take the Filtered Noise, Normalize and Scale to (0, `elevationMax`)
4449
2. Assume 0 values are base elevation of Water
50+
4551
4. Noise Processing
52+
4653
1. Noise Conversion (into square patterns)
4754
1. Send through filters to create blocky patterns useable for isometric 3d grids
4855
1. Use Elevation Threshold to determine values between 0 to Elevation Threshold
4956
1. Reduce Resolution by sampling one pixel per block
5057
1. Posterize
5158
1. Upscale back to Original Size
59+
5260
5. Cellular Automata (CA) Filter on Noise
5361

5462
1. CA Filter A : Expanding Zones
@@ -68,6 +76,7 @@ gdb --version
6876
5. Bias reduction on edges to simulate evaporation
6977

7078
6. Hydrology Path Generation
79+
7180
1. Each grid cell in the elevation map is a node in a graph
7281
2. Downhill Flow
7382
1. Assign movement cost to each path, using the raw noise for the height map to determine costs by slope descent
@@ -76,21 +85,27 @@ gdb --version
7685
3. Flow Accumulation : Count the neighbors that flow into our tile as a flow value
7786
1. Use the high flow values to create major roads && the small values to create minor roads
7887
1. Done by marking walkable cells that can’t be placed with objects
79-
7. Open Area Finder / Large Structure Locations
88+
89+
7. Tile Placement
90+
91+
1. Using a Dual-Grid System
92+
1. Determine the correct tile type for each cell in the grid
93+
2. Set the Grid map cells using Godot's Grid map system
94+
95+
8. Open Area Finder / Large Structure Locations
96+
8097
1. Find areas that have flat ground tiles of 3x3 cells
8198
2. Elevation buffer, ensure structures aren’t placed against cliffs and ramps
8299
3. Store the center cell into a list of available locations
83-
8. Poisson Object Placement
100+
101+
9. Poisson Object Placement
102+
84103
1. Create a copy of the finalized grid and increase its size by splitting cells into 4 pieces
85104
2. Finalized grid contains data about each cell's place-ability
86105
1. Use the data from the previous steps to know cells that can’t have objects placed on them
87106
2. River Pathing determines non-placeable cells
88107
3. Elevation changes are non-placeable cell's
89108
3. Use poisson disk sampling to place non-large objects using the higher density grid
90-
9. Tile Placement
91-
1. Using a Dual-Grid System
92-
1. Determine the correct tile type for each cell in the grid
93-
2. Set the Grid map cells using Godot's Grid map system
94109

95110
## Contributing
96111

0 commit comments

Comments
 (0)