I implemented a two-layer approach. The upper layer is the "jet stream" layer, using a simple sin function to simulate the way the jet stream moves across N. America. Currently, that only has a wind direction and velocity. The lower, weather layer has wind, temperature and moisture, which are used to calculate clouds and precipitation, if any.
I'll have to think about the upper level having some constraints on the lower, as that would remove some of the chaotic touchiness of the simulation which can lead to frigid cold or intense heat.
You can play with it at the ca_weather page. There is also a link to download a zip containing the source and graphics files.
There is a LOT of room for improvement, and any suggestions would be welcome!
Terrain Generation with Cellular Automata
Quote: Original post by Timkin
Just post a link to it, so that people can download it if they like.
<snip>Cheers,
Timkin
You'll have to look at it upside down, I suppose, for it to resemble Oz weather.
Seriously, the system I have mostly generates average weather. If anyone has an idea to make it (rarely) spawn huge winter storms and hurricanes, I'm open for suggestions.
As to adding constraints from the higher level...
A CA is just a state machine, where the current state depends on the neighbouring states. In a tree-like CA structure, the current state also depends on the state of the parent node in the heirarchy. A simplified version of this is where the constraints of a parent are only permitted to propogate to a localised set of nodes (so those nodes are in effect children of that parent). Think of a quad-decomposition. Each quad in an upper level has only four children and each of these children exists in only one parent quad.
The parent-child relationship can either be direct (each sub-grid node is a directly constrained child of the parent) or indirect (only one node in the sub-grid is a direct child of the parent and its neighbours are indirect children). An example of this latter case: Decompose a parent grid sector into 9 sub-grid sectors, with the central one being directly constrained by the parent. Each of the eight neighbours of this grid is then constrained by the state of the child node and its remainined neighbours (none of which would be the direct child of any other parent in the higher grid). Make sense? You could easily adapt this to any degree of decomposition, or any depth of heirarchy.
A CA is just a state machine, where the current state depends on the neighbouring states. In a tree-like CA structure, the current state also depends on the state of the parent node in the heirarchy. A simplified version of this is where the constraints of a parent are only permitted to propogate to a localised set of nodes (so those nodes are in effect children of that parent). Think of a quad-decomposition. Each quad in an upper level has only four children and each of these children exists in only one parent quad.
The parent-child relationship can either be direct (each sub-grid node is a directly constrained child of the parent) or indirect (only one node in the sub-grid is a direct child of the parent and its neighbours are indirect children). An example of this latter case: Decompose a parent grid sector into 9 sub-grid sectors, with the central one being directly constrained by the parent. Each of the eight neighbours of this grid is then constrained by the state of the child node and its remainined neighbours (none of which would be the direct child of any other parent in the higher grid). Make sense? You could easily adapt this to any degree of decomposition, or any depth of heirarchy.
I understand. I don't think I need finer detail than I have, but it wouldn't surprise me to find out otherwise from the play-testers. (Hey, why is there heavy snow here, and light rain right next to it, in the saame region?)
Good luck with it. Please keep us informed of your end result. I'd be interested to know what you found to be the good points of the final system and what were its shortcomings.
Cheers,
Timkin
Cheers,
Timkin
Quote: Original post by Timkin
As to adding constraints from the higher level...
A CA is just a state machine, where the current state depends on the neighbouring states. In a tree-like CA structure, the current state also depends on the state of the parent node in the heirarchy. A simplified version of this is where the constraints of a parent are only permitted to propogate to a localised set of nodes (so those nodes are in effect children of that parent). Think of a quad-decomposition. Each quad in an upper level has only four children and each of these children exists in only one parent quad.
The parent-child relationship can either be direct (each sub-grid node is a directly constrained child of the parent) or indirect (only one node in the sub-grid is a direct child of the parent and its neighbours are indirect children). An example of this latter case: Decompose a parent grid sector into 9 sub-grid sectors, with the central one being directly constrained by the parent. Each of the eight neighbours of this grid is then constrained by the state of the child node and its remainined neighbours (none of which would be the direct child of any other parent in the higher grid). Make sense? You could easily adapt this to any degree of decomposition, or any depth of heirarchy.
The problem with that kind of diffusion is that some of the neighbors of that child (which will be used to compute the childs new value) initially dont have values (or maybe initially their parents). A series of diffusion passes are required to evenly average the influence of the parent super nodes.
I did something like this on my partially on-the-fly terrain generation system
to diffuse flora/fauna detail patterns from the prebuilt seed values (the
1k x 1k seed map is used to generate data for 4x4 zones inside of each area represented by each point on the map).
--------------------------------------------[size="1"]Ratings are Opinion, not Fact
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement