I ran into a showstopper with mapgen4. It unpredictably "freezes" in the sense that inputs have no effect, even though both the map generation and rendering are running. I'm taking a break from that for ProcGen 2018 - 9 days to work on a procedural generation project.
I decided to play with procedural map generation on a sphere. I've long wanted to try generating entire planets instead of flat maps. See this project and this project to get an idea of what I'm wanting to learn how to do.
I don't want to spend a lot of time on it, but I think a week would be a good amount of time. The rough plan:
- Select some evenly spaced points on a sphere.
- Run Delaunay Triangulation on those points.
- Generate Voronoi regions on those points.
- Assign elevation with 3D Simplex noise, similar to mapgen4's elevation with 2D Simplex noise.
- Construct rivers the same way mapgen4 does it.
- Render all of this on a sphere.
The core map algorithms in mapgen4 run on a dual mesh, which means they are not restricted to run on a flat grid. I am optimistic that most of them will run on a sphere. The main exception is wind+rain, which I'll either drop or adapt. The rendering algorithms in mapgen4 won't run easily on a sphere. The oblique projection is designed to match hand drawn paper maps; the outlines work by rendering a flat map to a texture, and probably won't work on a sphere. That's ok. It's a one week miniproject to try something different, and I will be happy if I get half of it working.
I spent the first two days on steps 1–3, and wrote up my notes, including an interactive demo and some links to papers and other reading. The next seven days were part 2. After I finish this miniproject I'll get back to debugging mapgen4.
No comments:
Post a Comment