r/proceduralgeneration • u/Isokron1 • Apr 06 '22
Procedurally generated world with simulated weather
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.
11
u/Isokron1 Apr 06 '22
Jetstreams (well something like those at least) falls out of the general weather simulation automatically which is nice.
Ocean currents is something I have been thinking about simulating, currently it just does some general heat diffusion in the oceans.
52
Apr 06 '22
Wow this is amazing ! Do you have a website or something where we could learn more about this work ?
20
u/hemaris_thysbe Apr 06 '22
Not OP but this is probably relevant if you haven’t seen it yet: https://youtu.be/sLqXFF8mlEU
3
1
Jun 18 '22
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.
13
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
8
u/Volta01 Apr 06 '22
How is the weather simulated?
1
u/terrarray Apr 06 '22
Using navier stokes equations? Do you use a cube sphere? Or do you use a triangular mesh?
7
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
1
Apr 06 '22
Ditto, Sebastian lague has an okay series on YouTube if you pair with a supplemental couple readings and docs
3
2
2
2
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
1
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
1
1
1
1
1
u/Traveledfarwestward Apr 08 '22
r/livingbackgrounds would I am sure enjoy this so greatly as climate changes
1
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.