Hills that look like hills

Progress report: Hills now look quite a bit more like hills.

As mentioned previously, the hills were looking pretty awful – even a 2048×2048 texture, when stretched over miles of landscape, has pixels larger than a house. Instead of using such a texture directly, it makes more sense to tile a smaller texture repeatedly over the landscape. To add variation, one can use a landscape-wide single-channel image to blend between two different textures.  As it happens, the author of the height field I’m using for the hills (virtual-lands-3d.com) provided the hill model with a map named “flows” and a map named “rough” which seemed to correspond to fertile areas and rocky areas. After a little tweaking of their levels, I merged them into a two channel texture.

Two channel blending map

Which I'm also considering just hanging somewhere because it looks cool

This technique pretty much solved the problems with variation in the distance, but then so could the “one big texture” approach if I didn’t care about problems up-close. The problem being that “half dirt, half grass” under this scheme means you get a semitransparent layer of grass everywhere.

Grey-brown hills with green streaksDirt overlaid with a transparent layer of grass

Continue reading

Non-pretty Beginnings

For the last several years, I’ve been working on a game engine. For a while it was a university project, for a while it was going to be for a different game, but for most of its life, its only purpose has been to be a kind of testbed so I could get a grip on how a game engine hangs together and hopefully stay abreast of new technology. On one hand, I’ve learned a lot. On the other hand, me being my only audience has led to problems. The engine is now seven or eight years old and the best screenshots I have from it look like this:

Ugly render of a house

Elven building downloaded from 3d-source.com, and not yet done justice

Essentially I’ve done a lot of plumbing work and have very little to show for it.  The plan from here on out is to start fixing this scene (and maybe some others) while posting every new development to the blog so that I have an (at least theoretical) audience that I don’t want to disappoint.  Besides just screenshots I’m planning to actually explain what I’m doing and why, though since I’m uncertain whether I’m writing for the benefit of people I know outside the industry so they understand what I do with my life, people I know in the industry so they understand what I do with my spare time, random passing programmers brought here by a keyword, or just to straighten my own thoughts out on a subject (see “explain it to the bear“), the writing style may be a little varied.

The first stage of this epic task is probably going to be dealing with the shockingly ugly hills. They’re currently just a very large object with a not nearly large enough texture stretched over it. While it’s not a particularly exciting technical task, I’ll feel a lot happier once it’s blending between a few different tiled textures.