Hello Unity fans. Remember when we started out with Catlike Coding’s tutorial and his hex textures looked like this? And when we went all out by actually blending their edges like this? Luckily, he soon moved on to something more decent, having 5 textures for 5 different terrain types, and this is what we’ve been working with since then. The time has now come to implement some more versatile terrain textures, allowing us to manually, and procedurally, add subtle yet visually impactful variations to our maps.
Join my subreddit: / world_turtles
CC3.0 licensed textures by "davis123":
https://opengameart.org/content/backg...
Part0 (Introduction): • [Unity3D Hex Map Game Dev] 0: Introduction...
Part1 (Hexes to Water): • [Unity3D Hex Map Game Dev] 1: Hexes to Water
Part2 (Features and Textures): • [Unity3D Hex Map Game Dev] 2: Features, Te...
Part3 (Units, Visibility): • [Unity3D Hex Map Game Dev] 3: Units, Pathf...
Part4 (Random Maps): • [Unity3D Hex Map Game Dev] 4: Creating Ran...
Part5 (Post Processing): • [Unity3D Hex Map Game Dev] 5: Post Process...
Part6 (Resource Gathering): • [Unity3D Hex Map Game Dev] 6: Automated Re...
Part7 (Spinning Selector): • [Unity3D Hex Map Game Dev] 7: Spinning Obj...
Part8 (Preparing for Resources): • [Unity3D Hex Map Game Dev] 8: Preparing fo...
Part9(How Much Wood?): • [Unity3D Hex Map Game Dev] 9: How Much Woo...
Part10(Dynamic Trees): • [Unity3D Hex Map Game Dev] 10: Dynamic Trees
Part11(Meet The Meeples): • [Unity3D Hex Map Game Dev] 11: Meet The Me...
Part12(Harvesting Wood): • [Unity3D Hex Map Game Dev] 12: Harvesting ...
Part13(Harvesting Stone): • [Unity3D Hex Map Game Dev] 13: Harvesting ...
Part14(Walking Around Wallls): • [Unity3D Hex Map Game Dev] 14: Stop Walkin...
Part15(Multiple Unit Types): • [Unity3D Hex Map Game Dev] 15: Preparing f...
Part16(Manipulate Terrain): • [Unity3D Hex Map Game Dev] 16: Manipulate ...
Part17(ResourceBuilding Upgrades): • [Unity3D Hex Map Game Dev] 17: Resource Bu...
Part18(Camera Fly-through): • [Unity3D Hex Map Game Dev] 18: Camera Fly ...
Part19(Animated UI): • [Unity3D Hex Map Game Dev] 19: Animated Us...
Part20(Automated Farming): • [Unity3D Hex Map Game Dev] 20: Automated R...
Part21(UI Anchors, Buttons, ToolTip): • [Unity3D Hex Map Game Dev] 21: UI Anchors,...
Part22(Linking Graphics, Mechanics, UI): • [Unity3D Hex Map Game Dev] 22: Linking Gra...
Part23(Segmenting Hexes): • [Unity3D Hex Map Game Dev] 23: Segmenting ...
Part24(Smooth Irregular Movement): • [Unity3D Hex Map Game Dev] 24: Smooth Irre...
Part25(Pathfinding on Segments): • [Unity3D Hex Map Game Dev] 25: A* (A-Star)...
Part26(Avoiding Unit Collisions): • [Unity3D Hex Map Game Dev] 26: Avoiding Un...
Part27(Inverse Movement): • [Unity3D Hex Map Game Dev] 27: Inverse Mov...
The original terrain textures were specifically created as subtle pseudo-random patterns to suggest recognizable terrain types without clashing with the abstract low-polygon terrain. Note that while they add subtle variety, they lack distinct features, since this would make the fact that they are repeatedly tiled onto the terrain immediately obvious. Also, they are seamless textures, which means they can be repeated in all four directions without showing a seam where they meet. These are properties we’d like retain in our new textures.
I found this set of seamless ground textures by Davis123 on opengameart.org when I first started out learning Unity last year. I quite liked the colours and subtle detail, so I pulled them closer to see how they’d fare. My first attempt was just using the textures as is, replacing each of the 5 textures with a new version. Note that the set didn’t include a snow texture, so I created one by getting rid of the colour in the grass texture and tweaking the contrast and brightness.
The new textures looked a bit weird to me, and I asked for some feedback on my subreddit, which I’ll link to in the description if you’d like to visit. You will notice that these textures are too detailed. They almost obscure the action that’s happening on them, which is more important. Still, I liked the colours and variety they afforded me. So, I toned down the detail by blurring the textures using Gaussian blur in Photoshop. There are many different options, but blurring basically works by averaging out the colours in the vicinity of each pixel and replacing that pixel with the average colour. But there’s a catch. Remember how the textures are seamless? This means you can add them next to each other and they will appear to be one large texture, without seams where they connect. So, the left and right edges have been designed to fit together, and the same for the top and bottom edges. However, if you blur the original texture, the left and right edges would be blurred differently, since the left edge doesn’t have access to the right edge’s pixels, and vice versa. So, we actually tile the textures first, then blur the tiled texture, and then cut out the original sized texture from this blurred texture. This gives us a blurred texture that is still seamless.