matttraynar / Terrain

0 stars 0 forks source link

English field generation #1

Closed matttraynar closed 7 years ago

matttraynar commented 7 years ago

After doing a lot of research into this topic over the past few weeks I'm ready to start producing fields procedurally. I'll initially be creating the standard open field model with the distinctive ridge/furrow characteristics and three field rotation that can be found regularly in medieval settlements. This is something I'll be able to adapt further down the road to include enclosed fields and pasture grounds.

matttraynar commented 7 years ago

Class is set up and ready to go. Planning on starting with simple line drawings on top of the height map. This can be changed later to use actual foliage e.g. bushes etc.

matttraynar commented 7 years ago

Tried creating an algorithm which will 'explore' the land. Currently creates a vector of lines (points) which I still need to test the drawing of

matttraynar commented 7 years ago

Had a think this morning about the algorithm, could possibly result in circular cases so going to try a new approach. First need to get line drawing working properly because it wasn't working yesterday

matttraynar commented 7 years ago

Spent today looking at voronoi diagrams. Seems to be a good approximation for English countryside but isn't necessarily accurate. Going to have a go at implementation though as will probably include transferable skills

matttraynar commented 7 years ago

Begun implementation of voronoi diagram using Fortune's algorithm. Pretty gnarly at the moment so have done some pseudo code which I'm currently converting to C++

matttraynar commented 7 years ago

Fortune's algorithm is written, need to iron out some errors. See #2

matttraynar commented 7 years ago

Voronoi diagram has been created and drawn. Also adjusting heights of Voronoi points to match terrain height map. Next step is setting initial Voronoi sites to use data from the height field itself

matttraynar commented 7 years ago

Worth noting I'm currently working on getting CGAL working so I can use their Voronoi implementation (which seems more stable than the current version). As a result little progress is being made on the actual English Field System algorithm

matttraynar commented 7 years ago

Got CGAL working! Voronoi output is much nicer, also allows for edge culling (so can stop edges going beyond the terrain edges). Because this algorithm library seems much more stable than the old stuff I was using I'm hoping getting the normals of the terrain to set the initial voronoi sites should work a little smoother.

matttraynar commented 7 years ago

See #4

matttraynar commented 7 years ago

Forgot to close this