I want to create a mesh the same shape / divisions of the image I attach below.
I’ve looked all over the place, and primarily found procedural generation of hexagon maps, but I want irregular hexagons like the image I’ve provided. I attempted to understand and use Catlike Coding’s tutorials on the various ways of generating and manipulating hexagons, including this one, which seems to be what I want: Hex Map 4 but I can’t understand it, or get their example projects to work.
Can anyone point me toward some way I can generate this mesh through C#, or maybe even a relatively inexpensive Asset on the Unity Asset Store?
I’ve already purchased the model meshes of what I’ve pictured, but I can’t modify them.
It’s worth noting that the map you provided isn’t irregular hexagons. It’s irregular polygons of mixed numbers of sides. I see 4-, 5-, and 6-sided, at least. That’s probably compromising your search results and might be clouding your logic trying to work out how to make it work.
So are you looking for irregular hexagons (which the link you’ve given does generate), or irregular polygons (as in the image)? Or does it not matter, as long as the map doesn’t look regular?
Oh, thanks for pointing that out! I’m looking for irregular polygons then. I’m using it as a path, and I want it to look like irregular garden stones, as pictured.
The word you’re looking for is Voronoi. You pick random points that have a pleasing spacing, and then you construct an iso-distance edge between each pair of points, which ends up being a tiling of polygons. You can search for that word and find a TON of mathematics behind it, and several approaches to implement it.
A problem I’ve noticed with procedural generation is that while it’s possible to create a fancy procedure that can create a billion variations of something, the human brain will only be able to distinguish the difference between a small number of them.
So in this case it may be better to manually create five versions and then just rotate them to add a little more variety.