As basic information, remember that the top representation of an hex cell is composed of 6 triangles, and each side contains 2 more triangles.
First try...
In my first test, I used a simple material that was defined only by the vertex colour. When creating the meshes, I created one mesh for each terrain type, with specific vertex colour for each terrain, and shared this mesh for all hexes of this type. As every meshes was using the same material, the optimisation discussed in this previous post worked very well.
The side meshes are using the same colour as the the top, but darkened (0.75).
Second try
This first solution worked, but allowed only the simplest material. By using a variation of the first experience where iIadded a texture to the material, I managed to get a nicer look. My texture was a slightly noisy one, and was used in the same way as the first material. vertex colours allowed to tint the texture.
By a small evolution of the texture, we then added even more detail :
This solution is just an evolution of the first, and still does not allows for extensive modifications of the map.
Third try
if we want to keep the number of material low, and still have multiple texture, we can use a texture atlas : several textures regrouped as one. Then during creation of the meshes we will use different position in the global texture for each terrain type .In the following example all meshes use white vertex, and only the part of the used texture change between cell type :
This is the current state of my cell mesh texture and is beginning to look interesting, and allows for some variations. However there are a lot of evolution that would allows for some nicest map.
- Several possibilities for each terrain type, to have some variations. Ideally, some possibilities should be more probable than others. However, how to keep this consistent with the layered theme (if a theme define a texture for a given terrain type, is this a new representation, replacing all existing, or does it add to the list of representation ?)
- Animation. The pictures shown have the water removed. The material is just plain blue, or a water texture. Having animated texture would be a nice touch.
- also, some assertion are being done about the textures and their use. The side meshes the same texture as the top, and the texture is the same for all cell of the same type. Even if the first evolution (several possibilities for each terrain type) is made, this would be a random choice. For some kind of representation this is not adapted as shown here (trying to get a "Tron" feeling):
We would like to have the interior border less visible than exterior one, as here it is the contrary (since the interior border are present for 2 cells, thus bolder). This would mean having separate vertex for each direction (each vertex other than the center one would be doubled, since it belongs to 2 direction), or having one hex with the border representation, and one with the texture.
Still working on this one...
No comments:
Post a Comment