My project will be a 2d hex turn-based strategy game and I’m looking ways to implement the hex-grid map.
After I made some research in unity answers/forum, I found that one way is to make a hexagonal planar (cylinder with 6 vertices) in a 3d modeler program, import it in unity and fill the grid with these tiles to make the map.
Do you think there is a more simple or efficient way to make the hex grid?
In my proposal, shall I use the various textures for each tile (grass, water, rough etc) in the modeler program or apply them in unity?
Is there a way to have a smooth transition from one hex tile to an other (grass to water, for example)?.
Thanks for your time and suggestions and I would appreciate as much detailed answers as possible, since I’m new to all this.
Having done a hex map framework (that is on sale at the Asset Store), I am a fan of the single-mesh-per-tile approach, for several reasons.
You place the pivot point of your actors at the base, in the center, you can instantly place them at the center of any tile.
The same way, you can make them face any neighbor.
And tweening between any two tiles becomes a matter of going between two points.
You don’t have to worry about all the math, the way you would if you were just moving over a single mesh, using math to plot your moves.
The drawback is what you mentioned, hex transitions. To make one set of transitions to cover all the possibilities of say, dirt/grass, you have 2^6 (64) combinations. If you throw in a third possibility for terrain mixing (say, stone), it rises to 2^12 (4096).
You can either not worry about it, and make your hex all one texture for each terrain type, or do what I am trying to do, and make the features in the hex more prevalent.
Is it Rough? Well, yeah, look at all the rocks scattered around there.
Forests are obvious because they have trees all over them.
In the swamp, the terrain is randomly dipped down into a water layer that lies under each hex. Grassy areas have grass all over them, and some small bushes.
I’m also experimenting with textures that have a background that is shared between all the hexes (dirt), and adding splotches and dots of a color (ie. dark green and brown noise for a Forest tile) in the hex that don’t quite reach the hex border. This way, I can tint the color of the hex without having to worry that I’ll have a blotch cut off on the edge.
I really do think that the most effective way is with the external 3d modeler program like blender(free one).
You can choose exactly what part of the Hex to be colored with what using textures an uv mapping that is done in blender so that you can set the uv coordinates that unity can read later.
Like 1/3 sand 2/3 grass etc.
I haven’t watched it till the end… you can easily unwrap in blender by pressing U then “Project from view” (in Edit Mode, with the faces you want to unwwrap selected) so you get exactly what you see in the view port.