Terrain out of hexagonal Basis

Hey all,

I´m programming a game at the moment and wanted to know if and how you can generate Terrain out of images ordered in an hexagonal grid.
Currently I´ve managed to display a basic Texture on multiple Hexagons. But what I want is to have one HeightMap out of the HeightMaps of these Hexagons.
Or if its possible to have a hexagonal “TerrainQuad” that can be arranged in my grid.


Technically it’s certainly possible, but I’m not aware of any existing solution that would give you this.

It would be reasonably straightforward to create a custom mesh to do it, possibly based on the existing heightmap code.

Ah OK thank you.
I didn´t know how to tackle this problem so I´ll have a look at the HeightMap-Code an reply back tomorow. :slight_smile:

Well after looking at the HeightMaps, TerrainQuads classes/docs I found that doing sort of a TerrainHex would be loads of work because you have to worry about sizes, the right Mapping of the HeightArray and much more.
So I thought to myselfe if it wouldn´t be easier to create a new HeightMap out of multiple HeightMaps sewing them together according to the Location of HexagonMeshes with one HeightMap each. So to simply bake those HeighMaps into one and fill the empty spaces at the edges with some stuff(red) which is dependent on the style of my game.

So I´m able to create randomized HexGrids ( one Hex is one Type of Terrain) and have nicely created Borders for this Grid.
But how can I make this “Baking”, getting the coords of my Hexes isnt tha´t hard, but to realy bake my HeightMaps I need some sort of UV-Mapping of those Hexes on a new Texture.
So my question is how can I get it baked? Can someone point me to a propper Location where to look at first? (I´ll start searching in the Texture class but I have doubts about finding anything worthy there)

Do you mean the functionality like BatchNode offers?

Built into core is ImageRaster. Available as a plugin is ImagePainter. These provide functions for modifying images at run time if that is what you mean.

Well for setting multiple materials on one mesh Phoenix´ idea would be great, but I think zarchs one is better I just have to know which pixels to copy (which is simple Mathmatics) and where to apply them on my later used HeightMap (also simple Mathmatics).

Thank you