Just a quick thing I wanted to post, because I’ve been banging my head against it for a few days, and finally got it working just now.
In the game, I draw a lot of the ground details into a texture, and then use that texture while drawing the ground, as an overlay. (In fact, we have a couple different overlay textures, for different purposes). This works great in general, for the game camera that’s mostly looking downward. The problem is that when you’re near the ground and looking forward, suddenly you can see a lot of terrain all at once, and that overlay texture has to stretch to cover all that extra terrain… which makes the texture suddenly go quite blocky.
(That shot is slightly exaggerated to show the effect. It wasn’t that bad before). This is a classic problem when you’re dealing with shadows; when your camera is close to the ground, you typically need a lot more shadow detail near the camera, than in areas far away from the camera. So… I decided to try using one of the classic shadow solutions; cascades.
With cascades, you draw essentially the same data at several different sizes. We draw the overlay data which is close to the camera really big, and the data which is further away much smaller. And then when rendering, we check how close a bit of the terrain is, and read from either the close bit of data, or the far bit of data. This lets us do this:
Now we have really sharp terrain texture detail up close where it’s important, and much lower-resolution detail further away. With this change, it means that I now have enough terrain overlay resolution up close that we can consider using real textures for road surfaces, instead of using solid-color paths, as we’ve been doing so far.
I know a couple artists who will be very excited to get their hands on this.
(Of course, I still need to adjust number of cascades, distances, and so on; the path in the second image is still much too low-resolution in the middle-distance. But now I have the ability to fix that!)