How to approach procedural planets

Ah very nice, looks like good research. If it’s ok with you it would be nice to summarise more. Maybe a bullet point section at the top or just less info.

-9.8c/km altitude sounds fine.

Re latitude I think probably a cosine function like this will fit relatively well. The x axis is degrees north and the y axis is average temp. Do you have some average temperatures for different latitudes?

Overall great work :+1:

1 Like

Thank you! And I will try to keep it brief next time, providing some sources to whomever would like to know the reasoning behind the exact numbers.
Also

I have to go to school now, but I’ve already found some links, so once I’m back, I will just extract all the info from them. You can expect an update to this post today.
Edit:
First we will divide the planet into some geographical climate zones using the planet’s tilt.
For torrid (tropical), the boundaries are equal to the axial tilt (on Earth that’s approx. 23.5°) on each side from the equator.
The polar circles are located at the latitude 90° minus the axial tilt, or in case of the Earth approx. 66.5°.
Anything in between is the temperate zone.
The next update I will do is the actual temperatures for these zones. I will try to keep them as brief as possible.
I wanted to keep this first update very brief, but I was not able to write in in bullet points so that I would convey the info well and I think it’s important to know how to calculate the boundaries of the zones.

1 Like

No rush, I think the stuff you are doing is cool.

I think probably we could work on a planet with no axial tilt in a first approximation, Thrive has a complicated relationship with seasons ha ha. Very interesting point about the location of the polar circles though, didn’t know that.

Re decline in temperature vs altitude I think maybe -9.8c might be a bit high. For example Everest is 8,800m so with that value it would be be 86.24c less than the temperature at sea level which is a bit much. I think it’s actually -17c compared to 20-30c at sea level or something like that. However -9.8c is probably relatively close.

2 Likes

I sadly still don’t have a definite answer for the latitude question, as there’s quite a lot of variables and I’m not sure to what extend do they influence each other. I will try to come up with something.

That will change a lot of things. The torrid zone will be a single line identical to the equator and the polar circles will be single points on each pole. Which means that the entire planet will be a huge temperate zone. But I guess that for the very first approximation it’s alright.

That’s an interesting point and I will try to find out why that’s the case. This is exactly why I said this:

I will try to look into it and see where’s the issue. However I’m not sure when that will be, as my uni started already and I have to look after my girlfriend’s cats for a few days. However, right now I’m at work and it’s sort of a slower day, therefore I have plenty time for reading and trying to figure out some solution.

1 Like

I am not sure it would be so simple. I think the temperature difference between the poles and the equator is largely due to the angle of the ground relative to the sun. So at the equator the ground is flat and totally aligned with the sun, so it gets a lot of heat, at the poles the land is angled away from the sun and so gets a lot less heat.

I think this means on a planet without tilt you would still have a temperature difference and the poles would still be colder. Though I am no expert for sure.

Re uni and stuff no problem, go at any speed you like :slight_smile:

Okay, so I struggled quite a bit with the latitude question and I decided to take it a few steps back and have some concrete answers for the previous steps in order to have something to build upon. So here it is, the atmosphere vol. 2 and ocean currents. I will try my best to keep it brief. The reason why these two topics are important is

Atmosphere

First, let’s take a look at the Earth and I will try my best to explain why it looks how it looks and how would it look under different conditions. Here is a pic for reference so you can check anytime I mention something. Also, the wind I will be talking about is the “lower layer” of it. We don’t really care about the wind above that one.
Air-circulation-pattern

What do we see?
  1. There are three cells per hemisphere.
  • Cause - the speed of the rotation around the axis.
  1. The direction of the wind (0°-30° east to west equatorward, 30°-60° poleward, 60°-90° east to west equatorward)
  • Cause - The direction of the Earth’s rotation around it’s axis (counterclockwise)
Non-Earth-like conditions

The number of cells
Here is a rough table for different speeds of rotation

  • Rotation speed 1/2, 1/4, 1/8 or 1/16 that of Earth
    1 cell/hemisphere
    Borders of the cells = 0°, 90°
  • Rotation speed 1-2x that of the Earth
    3 cells/hemisphere
    Borders of the cells = 0°, 30°, 60°, 90°
  • Rotation speed 4x that of the Earth
    7 cells/hemisphere
    Borders of the cells = 0°, 24°, 27°, 31°, 41°, 58°, 71°, 90°
  • Rotation speed 8x that of the Earth
    5 cells/hemisphere
    Borders of the cells = 0°, 23°, 30°, 47°, 56°, 90°

The direction of the winds

  1. Equatorward/Poleward
    This does not change and will apply for every (?) planet - The cell closest to the equator is equatorward (the wind travels towards the equator), the second closest is poleward, the third one is equatorward. You get it, an alternating pattern, always starting equatorward on the equator, altering towards the poles.
  2. East/West direction
    The east-west/west-east flow of air also has an alternating pattern. If the planet is rotating counterclockwise (Earth), the cell closest to the equator will blow from east to west, the second one west to east and so on. If the planet rotates clockwise, however, the directions will be flipped, with the cell closest to the equator blowing from west to east.
Why do we need to know this

Humidity

  1. Where hot air raises (where the arrows “meet”), there’s lower pressure = higher precipitation and where cold air sinks (where the arrows diverge), there’s higher pressure = lower precipitation
  2. Where wind blows from ocean to land, it carries water vapor = higher precipitation
  3. Where there’s a mountain range “blocking” the general direction of the wind, the leeward side of the mountain will get close to no precipitation, the windward will get much more precipitation

Ocean currents

Some questions to ponder:
Why exactly are the borders or the cells where they are? Sure, it’s because angular momentum and such, but how can we calculate for them (even though this template is more or less enough).
How exactly does the rotation affect the number of the cells and why is there the irregularity with the 4x rotation of the Earth?

Ocean currents

I wasn’t really able to explain it better, I’m sorry. If anything was unclear, don’t be afraid to ask or check out my sources. Here is another pic for reference.

How to create an ocean current
  1. Create two currents (neutral) on each side of the equator flowing a) east to west with counterclockwise rotating planets b) west to east with clockwise rotating planets
  2. Once they hit a continental shelf (land, basically), split them into two - a poleward one (warm) and a equatorward one (neutral)
  3. The equatorward ones create equatorial counter-current, which, once it hits another continental shelf splits into two poleward ones looping back into the first two initial currents.
  4. The warm poleward current advances in the poleward direction until it crosses the border of the atmospheric circulation cell (mentioned in the chapter above), where circa in the quarter of the cell it becomes neutral again and starts moving east (for counterclockwise planets), until it hits another landmass. There it splits into a equatorward current (cold) and a poleward current (warm) (or neutral in case of closing the loop).
  5. Repeat until all the currents are closed.
Why do we need to know this

The warm/cold currents often run along the shore and affect it dramatically. This is how:

  • Cold currents = cold water = colder air = less evaporation = less humidity
  • Warm currents = the exact opposite
Sources

Atmospheric circulation - Wikipedia
Ocean current - Wikipedia
https://www.youtube.com/watch?v=LifRswfCxFU
https://www.youtube.com/watch?v=n_E9UShtyY8
A lot more sites, videos and blogs that are probably forever lost to my searching
A world atlas
And much more

Also, @tjwhale, I think you might be interested in these links. I myself might not have a use for them right now, but judging by the code you have written on planet generation, I bet they might come in handy!

Links for TJ

Planetary Science
http://www.am.ub.edu/~jmiralda/fsgw/lect1.html
Factors that Control Earth's Temperature | Earth Science | Visionlearning

In my opinion best to worst top to bottom, but all are great!

Thank you all for sitting though another episode of “Zahyyy rambles unstoppably about geography at almost 4 AM”, I appreciate it. :slightly_smiling_face: If anyone had any questions, don’t be afraid to ask!
Edit: Also, trust me. I tried my best to keep it brief.

5 Likes

I think, that is the biggest theoretical contribution, i’ve ever seen. How old are you? If not secret, of course)

2 Likes

Thank you! :slightly_smiling_face: And it is not a secret; I am 20 years old and I just think that procedural planet generation deserves a lot of love because, well, 90 % of the game will take place on your planet and I think that the planet should be as realistic and as beautiful as possible. I think that the place where the hefty majority of the game takes place should have a great atmosphere (pun not intended) and give you a reason to explore. But before making fancy texturing and such, you need the planet itself to be beautiful. And that is what I’m trying to accomplish here. Thank you one more time.

5 Likes

Yeah nice stuff. I think at first it’s ok to leave out air and ocean currents however they would be a nice thing to add in eventually, especially for things like rain shadows creating deserts behind mountains.

So it’s enough to just have the temperature decrease with latitude. However with these currents there is a nicer approximation :slight_smile:

Good stuff.

2 Likes

I predict that @Zahyyy will become a developer! :wink:

2 Likes

Well, they affect the climate quite a lot. They are the reason why there are things like rainforests instead of deserts, deserts within temperate zones and basically the entire biome layout is dependent on them.
This brings out an important question as to what is our primary goal right now. What is going to be our first use for this system? What is going to be the second one? And so on. Because even for the procedural patch map they are quite important - they determine what parts of the ocean will be warm and which are going to be cold. Which then affects how the organisms develop in those parts. We can ditch land for now, but I think that the atmospheric circulation, ocean currents AND THAT GODbelgium LATITUDE are quite crucial for us, whatever our current goal (pun not intended) is. The question still stands - what is our current goal?

I think that (‑25)+​50​cos(​x​π/​180) as you proposed might be enough as a basic placeholder, until we figure out a better way to do it (which might take a long time). Perhaps the “-25” and “50” might be variables based on the top temperature and the speed of it’s decline if that’s something that might change (which sounds like we might have to use calculus in the future, oh no). As for the second part “However with these currents there is a nicer approximation” I don’t quite understand what you mean. Is there a better way to approximate the currents? Or is the model with currents better for approximating the temperature? One more time thank you for the feedback! :slightly_smiling_face:

Haha, if I will, it will take a few more years. However, I’ve started studying on a uni focused on software engineering, so perhaps a few years of practice and I might be actually able to contribute. Either way, thank you, it’s flattering! :slightly_smiling_face:

2 Likes

What’s the problem with calculus? I’m currently learning calculus. and I haven’t had any problem so far…

I think the main problem will be figuring out what formula to use, which is pretty hard even now without the calculus. However, I’m not sure that we’ll actually have to use it. I’ve been thinking about the formula for the latitude for quite a while, but the tj’s proposal is the best we have so far.

1 Like

You don’t need to code to contribute, you seem capable enough to join the theory team. (Though I am not the expert on this ofc)

Also, could it be possible to just calculate currents/cloud movements/etc. with a couple (relatively simple) flow simulations? This seems a tad easier than creating an algorithm that complex for the sole purpose of calculating the average temperatures.

2 Likes
In fact, in the theory team, you need to code a bit, but with scripts (e.g. python). But with the prototype, it seems more like a C++ program.

P.S.: This prototype.

1 Like

I do not think I am knowledgeable enough for that, I just love to learn new stuff and I love problem solving. Plus my time management is w h a c k and I would feel guilty if I had not contributed in a long time, being just an eager fan is much less commitment and responsibility.

And I am not 100 % certain, but I think that fluid simulations (which use a lot of ugly, ugly math) require much more computing power, as opposed to some sort of an equation and a few “if” statements. But maybe I am wrong and it would be much better approach, but I’m not sure.

I love that prototype. And yes, you should be able to code a bit in order to be able to prototype your theories and such.

1 Like

But again, what’s the matter with calculus?

It’s a bit less intuitive. Not so much differential as integral. I don’t like integral calculus. Don’t get me wrong, it’s a beautiful piece of math that is incredibly useful, it’s just that I struggle with coming up with the formula even without it.

1 Like

Good question. The current goal is if I have an average temperature for the planet, say 14c or whatever and I have a list of patches with lat, long and depth then what temperature should those patches be?

And what I’m thinking of doing with that so far is if a patch is on the surface and it’s below 0c then it becomes an ice shelf. So I guess for now depth doesn’t matter so much, if it’s more than 100m or something then for now the temperature won’t matter.

Ok so one point about how to model stuff in general. It’s a good idea to start with the simplest possible thing, get that working, understand it and then increase the complexity over time.

For example we could just say every patch is equal to the average planet temperature. So either all surface patches are frozen or none of them are. And that’s pretty wrong, but not totally insane. For a very hot planet or an iceball planet all the right patches will be frozen or not frozen, however for ones inbetween it will be kind of wrong.

And then we could say maybe the temperature just decreases linearly towards the poles or something. Which again makes the approximation better, it’s less wrong, however we’re having to work harder with more complexity to get it better.

So the question you have as the modeler is how far do you want to go? You could build a model of an entire planet and run a fluid dynamics simulation across it equal in complexity and detail to that of a national weather forecasting agency. That is even less wrong, however it’s hard to do.

Do you see what I mean? How much detail to put in is ultimately up to you and how much you care about being wrong.

1 Like

In that case I think we can use the cos function for the latitude. However I think that we still should consider the currents (atmospheric and oceanic) at least a bit. That, however, does not mean we should do fluid simulations. My entire idea behind this is not using fluid simulations. I think that the atmosphere model is as easy as I could make it - you throw in the speed and direction of rotation of the planet and you get the preset borders of the cells and the direction of the wind there (just as a variable, not actually simulating them).
As for the simplification of the currents, the only thing I can think of is placing “squares made of vectors” from the equator to the 1/4 or 1/2 of the next atmospheric cell (again, than would be still stored just as a variable). Then just as a rule of thumb, vectors pointing towards the equator are cold, vectors pointing towards the poles are warm.
If that is still too much, I guess the cosine function will be enough for now, but in the future we will need much more. As for the decline of temperature with depth, here on wiki there are two really neat graphs depicting the temperature change with increasing depth.

1 Like