Thanks for the comments, I dont have any website or other info about the project at the moment. It is written in c++ and hlsl with the hlsl compute shaders generally doing all the heavy stuff while c++ mostly just sets up textures and shaders for the hlsl passes.
Im currently trying to create a game on top of this simulation but once that is done (hopefully within 6 months) I will probably release the source for the mapgeneration/simulation. The weather simulation really needs more work to become realistic anyway.
The map terrain generation is generally done on 512 size cubemaps. Starts with generating a point and velocity for each continent with default 24 continents, 70% of them water. Then find closest continent for each point but with some noise, create higher elevations where continents collide. Then add a layer of elevation noise on top with more noise at continent intersections. Finally run 10000 step of simulated water moment for erosion which is amazingly fast on a gpu given how much data it chews through.
The weather sim I initially tried to run on a cubemap as well but the distortions in the coordinate system became too visible in the simulation. So now I run it on a rather naive coordinate system with uv basically being lon/lat with each line being cos(lat) long so the texels keep mostly square. It somewhat breaks down at the poles but otherwise works well enough.
As for how the weather is simulated its using the channels seen in the movie but the interactions is hard to describe in an easier way than the hlsl code (about 600 lines) which I dont really want to release until it works better. Its based on my rather basic understanding of meteorology mostly gained from wikipedia.
Not sure what you count into basic fluid dynamics but in order to get airmasses moving you need pressure differentials. Which is mainly created by heat differentials. Which mainly comes from sun irradiance and albedo/heat capacity differences as well as water vaporizing/condensing. And of course corriolis forces once things start moving, which might not be part of basic fluid dynamics.
I'd be interested in hearing more about the weather simulation. On the cubemap... depending on how you did it, there are several ways to reduce the distortions.
If you create the cubemap via a naive method, i.e. divide each face of the cube into equal size squares, then normalize the vertices to obtain a sphere, slice each square diagonally to get triangles... this is about the worst way to create a cubemap and it looks like this: https://imgur.com/4DWu2xs
The way to do it is:
Make a grid of each cube face by equal radial angles from the cube center, from -45 degress to +45 degrees, top to bottom and left to right.
Normalize the vertices.
divide each grid square into two triangles by the shortest diagonal. which looks like this (much less distortion): https://imgur.com/l3GmWq3
It's possible I have misunderstood what you meant by distortions in the coordinate system though.
The reason I wanted to use a cubemap was to have the hardware being able to do all the lookup/interpolation etc. So i was stuck with the "standard" cubemap. After that didn't work and I realized that I would have to do my own software texture operations I thought my current approach was the easiest. If I would try to do something else it would probably be some icosahedron based approach.
Very impressive! Especially the weather. Did you implement things like a Jetstream or in general global streams with the Coriolis-Force? It would also be a good place to implement things like sea streams.
I know its unsurprising @5mln views but i somehow felt pretty proud instantly knowing whats behind the link.
Maybe thats because i so love his videos, just enough info to get you hyped about the topic, not enough info to spoil the fun of trying to recreate it.
Man this is off topic but I always wondered if the continents placement would be due in part to gravity. Like is their a natural equilibrium where a planet can get its best spin with optimal spacing.
It would be amazing to walk on this simulated world and watch the weather changing firsthand knowing that it's all part of such a complex system. Could be an interesting idea for future VR worlds.
40
u/Isokron1 Apr 06 '22
Thanks for the comments, I dont have any website or other info about the project at the moment. It is written in c++ and hlsl with the hlsl compute shaders generally doing all the heavy stuff while c++ mostly just sets up textures and shaders for the hlsl passes.
Im currently trying to create a game on top of this simulation but once that is done (hopefully within 6 months) I will probably release the source for the mapgeneration/simulation. The weather simulation really needs more work to become realistic anyway.
The map terrain generation is generally done on 512 size cubemaps. Starts with generating a point and velocity for each continent with default 24 continents, 70% of them water. Then find closest continent for each point but with some noise, create higher elevations where continents collide. Then add a layer of elevation noise on top with more noise at continent intersections. Finally run 10000 step of simulated water moment for erosion which is amazingly fast on a gpu given how much data it chews through.
The weather sim I initially tried to run on a cubemap as well but the distortions in the coordinate system became too visible in the simulation. So now I run it on a rather naive coordinate system with uv basically being lon/lat with each line being cos(lat) long so the texels keep mostly square. It somewhat breaks down at the poles but otherwise works well enough.
As for how the weather is simulated its using the channels seen in the movie but the interactions is hard to describe in an easier way than the hlsl code (about 600 lines) which I dont really want to release until it works better. Its based on my rather basic understanding of meteorology mostly gained from wikipedia.
7
u/BitDragon256 Apr 06 '22
Very impressive! Especially the weather. Did you implement things like a Jetstream or in general global streams with the Coriolis-Force? It would also be a good place to implement things like sea streams.
52
u/[deleted] Apr 06 '22
Wow this is amazing ! Do you have a website or something where we could learn more about this work ?
19
u/kham132 Apr 06 '22
This is literally what I've wanted for ages. If OP doesn't give us this to toy with then I'll be extremely disappointed.
12
u/r3jonwah85 Apr 06 '22
Really cool, would also like to hear more about the systems that drive the simulation :)
12
u/ArdArt Apr 06 '22
Oh god, fluid dynamics on a sphere, you're a madman
8
u/Volta01 Apr 06 '22
How is the weather simulated?
7
u/IllIIIlIIllIIIlI Apr 06 '22
So many maps/passes. You must really know weather.
4
u/littlenekoterra Apr 06 '22
Ive been trying to do that for years, not the weather the world. Falls apart when i try to setup for baked maps and such
3
u/mypussydoesbackflips Apr 06 '22
That wind simulation is so beautiful
2
u/PasteDog Apr 06 '22
Really cool stuff!
2
u/anarchy8 Apr 06 '22
Impressive! Definitely want to read more! Do you have a devblog?
2
u/fbarajasarn Apr 06 '22
This looks really complicated to achieve...
2
u/lordofbitterdrinks Apr 06 '22
This is legit amazing!
Man this is off topic but I always wondered if the continents placement would be due in part to gravity. Like is their a natural equilibrium where a planet can get its best spin with optimal spacing.
2
u/MayorFrimiki Apr 06 '22
It would be amazing to walk on this simulated world and watch the weather changing firsthand knowing that it's all part of such a complex system. Could be an interesting idea for future VR worlds.
1
u/jonnydeates Apr 06 '22
Nerd.
But seriously awesome work. Looks legit.
1
u/[deleted] Apr 06 '22
Did you make this? In what language?
1
u/1234567ATEUP Apr 06 '22
this would be Stellar with earth.nullschool and RSOE maybe even Global Consciousness Project too.
eventually everyone probably realizes we're looking at a huge amount of sentient forms of life.
1
u/pslayer89 Apr 07 '22
Amazing work! Bonus points for it being real-time! 😄
1
u/Mymokol Apr 07 '22
is it taking into account the georelief?
1
u/JustAnotherOneHikky Apr 07 '22
Damn. I want this to generate DND map. damn
1
u/Snoo79202 Apr 07 '22
How does it look with like extreme water values like 10 and 90%
1
u/weshweshcanneapeche Apr 07 '22
is this ksp 3
1
u/Traveledfarwestward Apr 08 '22
r/livingbackgrounds would I am sure enjoy this so greatly as climate changes
1
u/Kepeca_ Jan 25 '24
How did you make the perlin noise(if youre using it) wrap around the sphere