Blending textures for a random 2D(ish) map?

Is there any better way to do this or any input on which way is more likely to work, or some entirely new approach suggested for that matter?

I’m looking at designing a simple procedurally generated random 2D like outdoor map using hexes, a bit stylized like a board game map.

Ideally, I would like to be able to define the hexes with ‘overlays’ of textures, overlay 1 might be ground, overlay 2 might be some trees in the NW corner, overlay 3 might be a road from N to S, overlay 4 might be a river from the SE to the W, etc. I want to use a texture atlas for each layer and modify the UV values to pick a different part of that atlas for the specific graphic.

In DOS/Windows, the way to do this is to take over the entire screen and paint the first layer, then the second layer, then the third layer, etc. Pixel by Pixel. Works great on a PC, but I’d really like to take advantage of the GPU for smooth panning and zooming. (Plus some 3D decals, etc.)

One way to do this would be to do this the DOS way and paint into a shared texture atlas (or several atlases) and use that on the hexes and let the GPU do it’s magic.

A different way would be to give them slightly different depths (which would limit how closely the camera could zoom, but it might be OK if I limit the camera) I haven’t seen any way to do this without many meshes/objects (one per layer per hex)

Thanks in advance

Ralph, it is absolutely trivial to do this in Unity. It would be as if asking, in Illustrator, can I add type?" - heh

Imagine square images say 10m x 10m. (A “sprite” if you will.) So you would simply have a trivial plane (in unity click “add plane”, resize it to the size you want) and drop that texture on it. So you might have say a dozen different such images, perhaps.

You’d simply sit them next to each other. You mentioned you might want the adges to blend, if so no problem, just have them somewhat overlapped, and the edges would blend. Nothing to it.

What you said about different layers on top, road etc - again nothing to it.

This sort of “2.5D” thing is absolutely commonplace:

10712-2.5d.png

notice the three flat planes there, each with different images … actually it’s nothing more than a “drop shadow” - heh. the yellow image is a drawing of a cat, and the red/black are just a frame around the image. they are a meter apart or whatever (the camera would be on your right in this example)

doing 2.5D in unity is great, it’s fantastic. Once you do it you’ll likely never ho back to another metaphor/pipeline. Apart from anything else you can completely use 3D physics normally, and so on. Everything is a breeze. Note you may choose to use an orthographic camera in (just look at “camera” in the inspector and click to orthographic, if you want).

You are right that it is somewhat confusing “how the hell do I do 2D in a 3D engine” until you have a quick play, then it all makes sense.

(JUst TBC you would not have to touch shaders, etc, in the slightest to do a whole project like this. It’s totally taken care of.)

you should definitely grab 2DToolkit (and the other such competing products) from the asset store, and decide which one you like.

2DTK offers an unbelievable amount of development already done. You just drop PNGs in a folder and it does everything, optimises sprite sheets, even makes them for different resolutions, etc etc. It completely and utterly handles 2D animations, sprites, colliders, blah blah, it sets up proper two-triangle planes and so on and so forth.

(Regarding what you say about shaders, again for 2.5D, 2DToolkit completely takes care of it, offering a selection of the typical shaders you would use in a side-scroller, overhead game as you describe, etc.)

PS when you get to wanting to add type, here is exactly the pipeline we now use having suffered greatly trying to find the best approach: http://answers.unity3d.com/questions/384623/setting-font-size-according-to-screen-dpi.html?sort=oldest

hope something helps ! Enjoy Unity !