Wind Speed & Temperature
Today I finished the code for generating wind speed and temperatures.
The wind speed defines bands above and below the equator where the wind speed is high while it is lower at the equator. These bands are combined with the land mask to make the wind higher over the ocean and weaker over land. Steps:
- Start with a base noise map. (FBM octaves = 5.0 and size = 4.0)
- Define bands where with varying wind values. (Strong-Weak-Strong for this example)
- For each cell the value from the band is added to the noise map multiplied by the base noise weight.
- To complete the base map the whole map is normalized between 0.0 and a base weight.
- A second noise map is created called the continent noise map. (FBM octaves = 5.0 and size = 8.0)
- Using the Voronoi operation create a map where every cell has a value equal to its distance to the nearest coast.
- For each cell I create a weight based on the distance to the coast. If the point is further than the distance threshold the weight is 1.0 if over ocean and 0.0 if over land.
- This weight is combines the the continent weight and then multiplied by the continent noise and added to the base map.
- The final map is then normalized.
The temperature map is a simple linear gradient biased by the elevation and a bit of noise to make it more interesting. Steps:
- Each row base value is equal to lerp between 0.0 and 1.0 where the poles are 0.0 and the equator is 1.0.
- For each cell in the row distort the row value by the matching cell from a noise map multiplied by the distortion factor. (In this example FBM was used octaves = 5.0 and size = 4.0)
- If the elevation for the cell is greater than a set threshold I decrease the temperature based on where the elevation lies between the threshold and the max elevation.
Next Steps: Rainfall & Rain Shadow
Wind Speed Legend:
- Black = Low Wind Speed
- White = High Wind Speed
Temperature Legend:
- Red = Hot
- Green = Moderate
- Blue = Cold