Jump to content
  • Advertisement
Sign in to follow this  
silverRohan

Texturing Height maps

This topic is 5026 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Definitely look into using surface normals (if you havent already). Surface shadings of ground undulations adds a major improvement to mesh grid scenery.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!