Texturing Height maps

Started by
4 comments, last by OrenGL 19 years, 6 months ago
Greetings all, I've been working on rendering terrains for a bit (actually, it just has been drawing multi-colored triangles), and have recently gotten it to the point where I'm ready to texture the landscape. The only thing is, I'm not sure how to texture the map so as to appear at least marginally realistic. Friends of mine have suggested that using some of their algorithms I could pregenerate one huge texture using my heightmap and a few smaller textures (grass, rocks, snow, mud, water, etc. etc.). At runtime, they claim I could just drape the texture over the whole thing. "Nice, simple and efficent", they say. Still, I thought I would just throw this question out onto the boards and see what other people have to say. Is this truly the way to go or is there a better method? Cheers!
Advertisement
Personally, I just slap the same texture onto each of my quads, but several times per quad by using texture coordinates > 1. It doesn't look all that pretty, but I did some okay-looking grass with line primitves, so the texture was just for looks.

Another thing I did was to slightly offset the coordinates randomly by a little, didn't do all that much though.

For "added" little things, I prefer using 3D meshes or objects or SOMETHING besides decals. Decals, done correctly, can be nice, clean and efficient, but I prefer to have it done in 3D (except for little things like gravel and stuff).

Granted that doesn't leave much room to do anything else! [lol]

Experiment and see what works best for you!
You can use the T2 texture generation tool to create a blended texture for a height map. I used it to create my terrain texture:

Terrain

Also the DirectX course over at Game Institute does terrain texturing in a nice way. I just haven't got around to reading about it...
Yep, that was what my friends were talking about. Blended textures. Nice screenshot chadmv. It illustrates exactly what I wanted more or less.

As for other parts of my terrain, I've got a mesh loader set up which has thus far allowed me to load small buildings, trees, etc. and drop them onto the terrain.

Anyway, thanks for your thoughts guys.
Definitely look into using surface normals (if you havent already). Surface shadings of ground undulations adds a major improvement to mesh grid scenery.
The problem with that algorithm is that it's a trade off between detail and size: if the texture is too small it gets smeared, otherwise you need a very large texture.

What you can do is have an attribute at each vertex that determines what texture to use. There is a post about this here.
Don't shoot! I'm with the science team.....

This topic is closed to new replies.

Advertisement