I'm trying to figure out the best way to go about the problem in the title and am running a little in circles. I'd love advice from anyone who has done this (in any engine or environment)!
The goal: Have an NxM map of regular squares which are textured akin to a regular 2D game, ie with discrete tiles (like this is a grass tile, this is a sand tile, this is a dirt tile, this is a grass tile which borders a dirt tile) not blended like in Unity's terrain system. This map will be regularly changing, so I need a solution which accommodates that.
The options, as I see them:
1) Each tile is a separate quad with its own texture. This is yuck and produces way more gameobjects than necessary.
2) Generate a mesh of quads, chunked into smaller meshes where necessary. Let's pretend it's just one mesh for simplicity. This is what I'm currently doing. Texturing the individual squares of this mesh is where I'm spinning my wheels. Options:
2.1) Use a texture atlas and uv-map the vertices to the quads. I can do this, but am concerned about the fact that this project is 3D; unless I carefully constrain zooming out, mipmapping with a texture atlas is not nice business. But I can do this, and just compensate for mipmapping by giving each texture a buffer.
2.2) Use a Texture2DArray, which is sorta like using an atlas except mipmapping is no longer a problem because textures are not 'next' to each other and so you don't get the bleeding. The main downside to this is that the documentation is nearly nothing, and shader code is apparently my programming nemesis. I'm able to get it working, sorta, but there are weird issues that I didn't foresee (like the fact that it seems to start sampling from the middle of the texture...?? No idea how to effectively control the sampling of each texture) and because I suck at shader code, I'm struggling to properly figure out what's wrong and then fix it.
2.3) Use a Texture2DArray but then blend the tiles together
as in this excellent Catlike Coding tutorial. I could do that, I'm confident I can follow along well enough to convert from a hexgrid to a square one, but a pure blending between tiles isn't the look that I or my team are keen on. Might mock it up though.
Any advice? What have other similar projects done? Am I just insanely overthinking this?