15 ms·
Simulating worlds on the GPU: Four billion years in four minutes
- MH15 5y agoVery cool simulation! Also love the John Murphy soundtrack.
- setr 5y agoNeat. I’ve been looking for something like this for gamedev — being able to model pseudo-realistic simulation of planetary evolution (for my interest, just starting at plate tectonics and going up until wind patterns) to provide a “basis” for further simulation. It’s surprisingly hard to google though; almost all content is simple perlin noise generation that looks kind of correct but ultimately produces total nonsense (so any further derived rules have to also be total nonsense) — generally constrained with further nonsense rules to produce higher level concepts like “animals” and “biomes” that can’t be touched meaningfully. Other material I can find is far too involved, and far too slow — targeting actual simulation of the earth. The few that do it with the goal of “just realistic enough” still end up being 10+ minutes generation time for small worlds. Modeling erosion processes being the main culprit, afaict. Definitely stealing this one, for all my nefarious deeds.
- Datagenerator 5y agoSome very detailed algorithms here [1] 1) https://github.com/DokimiCU/mg_tectonic https://github.com/DokimiCU/mg_tectonic
- R0b0t1 5y agoIf you have seen the glacier sims with Elmer, maybe start there and walk back until the simulation is fast.
- david_ar 5y agoAuthor here. This was definitely something I struggled with when creating this simulation. Reasonably fast simulations of tectonics and erosion have already been done before: some parts were tricky to translate to the constraints of a shader, but the parallelism pays off in being able to run the simulation at interactive speeds. The difficult part was the global climate model. I spent a while researching existing methods, but as you say, many of these are computationally expensive scientific simulations. In the end I just downloaded some data for the Earth and went about seeing how well I could replicate climate maps with some simple curve fitting in a Jupyter notebook. After some trial and error, I was surprised to find that you could actually approximate things quite well with sine curves and some blurring, as described in the article. Overall I learnt a lot about Earth systems from this project, it was a fun hobby for a few months. I have some ideas for taking it further, but haven't gotten around to it yet. Feel free to reach out to me if you have any questions, or want to discuss any ideas you have about it.
- seventytwo 5y agoWhy did you decide to have the life/electricfication spread so slowly relatively to the geological time scale? Was it just to better visualize the changes?
- david_ar 5y agoYeah, I took a bit of artistic license with the timescales, in reality the systems evolve at such different rates that's it difficult to visualise them all simultaneously. Towards the end of the video some of the geological simulations switch off to signal a change in timescale as human populations spread, but it's still not entirely physically accurate.
- dhsysusbsjsi 5y agoYou also missed the bit where the planets billionaires create giant penis rockets
- Dracophoenix 5y ago
- sj4nz 5y agoDwarf Fortress was the first thing I thought of when I saw this. It does do a geology sim for map setup.
- XorNot 5y agoThere's a risk to this sort of thing though: you tend to discover how hard it is to generate a life-bearing planet, depending on your pre-conditions. One of the devs on Star Control 2 put in a bunch of work to automatically generate the map and star systems in it, and during dev ran into the wall that while he could generate too hot or too cold or too dense or too light planets easily, getting interesting and potentially habitable planets out was exceptionally hard - the goldilocks criteria were in full effect and didn't happen too often when randomizing.
- setr 5y agoThat’s part of why I’m only interested in starting at plate tectonics — solving the Goldilocks problem is not that interesting to me, and would require serious effort. But given the right base parameters, I don’t think post-tectonics have the same problem — it’s harder to generate an invalid earth, where earth’s placement in the solar system/universe is hard coded.
- bsenftner 5y agoThe author's github is a cornucopia of delights too: https://github.com/davidar?tab=repositories https://github.com/davidar?tab=repositories
- wrycoder 5y agoOf course, CAGW has to destroy life at the end.
- withinboredom 5y agoI see stuff like this and then ponder whether I'm living in someone's weekend project... it'd be pretty interesting to discover the universe is a simulation, but it'd also kinda suck.
- s5300 5y agoOur observable universe is just a zany snowglobe knick-knack picked up as a last minute gift for a spoiled little shit in a universe of higher order than ours that's simply imperceivable to us. All of what we know as mass in our universe was suspended in a tiny bowl centered in the globe, the kid gave it one shake, ala the big bang, then sat it on a shelf forever to collect dust as we near unmeasurably slowly eject towards the edges of the globe. Maybe one day he'll pick us back up...
- xvector 5y agoImplies that the theoretical ability to simulate a universe (or even just a planet) exists somewhere, which absolutely might not be the case
- new_guy 5y agoNo Mans Sky does it pretty well. Who knows? Maybe when we get up to PlayStation 10 or 20 it'll actually be simulating the cognitive/sentient elements of the universe too.
- hutzlibu 5y agoDoing something "pretty well" compared to the task and doing something complete, is not really the same, when we are talking about a possible infinite universe to simulate. Because in this case, even just correctly simulating the leave of an tree, would take infinite comouters.
- xvector 5y agoYou could simply alter the consciousness of simulated beings to believe that the tree is complex and exists fully. This sort of dynamic pruning/altering of conscious reality would dramatically cut down on what needs to be simulated. We could all be staring at placeholders (if even that) while believing we are interacting with a complex, fully defined world - in the meantime, the simulation modifies our consciousness(es) to smooth over any gaps in what could actually be a crudely defined generative world.
- MPSimmons 5y agoGreat work. Interesting that he didn't simulate the impact that formed the moon, though. I'm interested in how that impacted (ha) plate tectonics. I'm not aware of a scientific theory that posits a causality between the impact and plate tectonics, but we are the only rocky planet that has both plate tectonics and a natural satellite created by impact, so I have to wonder if they're related.
- jagged-chisel 5y agoI’m under the impression that there were no “plate tectonics” at the time of impact (surface was still nearly molten), and if there were (surface had actually crustified), plates were quickly melted by massive amounts of energy from the collision.
- smoe 5y agoNot an expert at all but from skimming Wikipedia “The appearance of plate tectonics on terrestrial planets is related to planetary mass, with more massive planets than Earth expected to exhibit plate tectonics. Earth may be a borderline case, owing its tectonic activity to abundant water” https://en.m.wikipedia.org/wiki/Plate_tectonics https://en.m.wikipedia.org/wiki/Plate_tectonics It is just that there no objects in the solar system big enough to have plate tectonics. And we currently have no way of detecting them on exoplanets.
- kevinkeller 5y ago> we are the only rocky planet that has both plate tectonics and a natural satellite We have the oceans to thank for plate tectonics. https://www.researchgate.net/publication/253303432_Are_Oceans_Required_for_Earth-Like_Plate_Tectonics https://www.researchgate.net/publication/253303432_Are_Ocean...
- mehwoot 5y agoShameless plug: I've been working on a Simulation along similar lines. Runs entirely on GPU and allows you to view it all in real time: https://store.steampowered.com/app/1482770/Terra_Firma/ https://store.steampowered.com/app/1482770/Terra_Firma/ Some really cool details in this blog post- I hadn't done anything complicated related to weather.
- reitzensteinm 5y agoThat's really cool. There's something magical about such a complicated simulation running at 60fps.
- subhro 5y agoNot sure how this was made. But this looked very impressive to me: https://www.youtube.com/watch?v=uD4izuDMUQA https://www.youtube.com/watch?v=uD4izuDMUQA
- Sophistifunk 5y agoIt's mostly cut from various disaster movies (a lot from 2012) as far as I can tell.
- Hydraulix989 5y agoI would like to see more work being done to simulate abiogenesis. Essentially, it's a search problem -- take some elements and probabilistically form increasingly complex molecular machines to the point where they become self-replicating and exhibit the basic properties of life. Once this bootstrapping has begun, it's a matter of subjecting the proto-lifeforms to evolutionary pressures, and over time, they will "evolve" to become increasingly complex organisms.
- DrNosferatu 5y agoAha - for my Masters Thesis, some 15 years ago, I did something very similar also using (strictly) GLSL shaders to simulate the Universe from Big Bang to present day. "GPGPU N-Body Particle-Particle Cosmological Simulations". [Abstract: https://bit.ly/3rzDNLy https://bit.ly/3rzDNLy] [Results and poster: https://bit.ly/3BE2cEp https://bit.ly/3BE2cEp] Well done - very nice presentation! PS: Do you have plots of your simulation results and Earth's natural mass density power spectrum along (simulation) time?