Question

I am making a world generator that will generate terrain using perlin noise and a weighted gradient favoring pangea shaped islands to form. I have gotten to the point where I can create a temperature map of the world where lower altitudes closer to the equator are favored, and water is always colder. But I am having trouble approaching the best way to deal with wind and rain. I figure that I can maybe create a humidity map then somehow play it into wind. This video is where most of my inspiration is coming from. Elsewhere he briefly talked about how whenever wind would hit a mountain, the area behind it would be left with no rain. One big question I have about his wind is how does he decide what direction it comes from.

So basically what I am asking is how can I extend off my world generator to simulate wind, rain and weather? Since rain and weather are arguably the same thing, another question that comes up is how can I generate a humidity map based on a world? Once a simulation starts, how does one deal with weather?

Here is a picture of my tempurature map. I am thinking of making it less continuous.

Was it helpful?

Solution

I'm the author of the video you link to in your question.

I'm sorry that I didn't reply to this when you asked three months ago but I've only just seen your message on Reddit. Your account seems to have been deleted so I'm copying my reply here.

In terms of wind direction, this was only a simple model so I cheated and picked an angle randomly. A simulation that "evolves" with changing wind and weather is something I'm working on but the biggest problem is making it fast enough to use.

For wind and rain, what I did was simulate a square of particles, all one pixel apart and implemented as an array of floats for wind elevation and an array of floats for wind moisture. The wind moisture at the start is set quite high to represent the fact that it is moist air carried over the sea.

I then move the cloud along the wind direction over the map. When the elevation (height) of the map is greater than the wind height, then the wind height is moved up to this elevation. Otherwise, the height of the wind decreases slowly. This simple model can be used as a very simple approximation of air pressure when the elevation of the world is much less than the elevation of the wind. My video colours the raw wind elevation blue but you could colour the difference between wine elevation and land elevation instead for a more interesting effect.

Each point in the cloud loses some moisture at each step depending on temperature (cold areas losing more rain i.e. particularly over mountains). Once it has lost all of its moisture it is out of rain, so a "rain shadow" develops, represented by a desert if the temperature is hot. You could improve this model by having wind gain more moisture over lakes or sea.

Finding the best constants for how quickly wind particles lose moisture, or how much moisture they have initially, was just trial and error until I found a combination that looked good and gave me a full range of terrain types on a typical map.

Hope that helps -- good luck with your project! Let me know how you get on.

OTHER TIPS

Wind is caused by differences in air pressure. I.e. some air will move from a high pressure areas into a neighboring low pressure area to even it out.

The air pressure at a location is influenced by several factors like air temperature, ground temperature, cloudiness, amount of sunshine, air humidity, etc.

Also multiple layers of atmosphere need to be taken into account.

It is quite complex but at the very least, you will need to simulate air pressure.

EDIT: As an introduction into this matter I suggest: https://en.wikipedia.org/wiki/Numerical_weather_prediction

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top