• Advertisement
Sign in to follow this  

Basemap generation for Terrain.

This topic is 3476 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

Hi, as the thread-title already says, I am interested in creating a basemap for my terrain with different textures and a heightmap. So far I thought about using the degree of the angle between vertices and the height of the vertice itself as criteria for the texture to use. Are there any other things to take into consideration ? Any advice (and maybe a link or screenshot :-) would be greatly appreciated... ^_^

Share this post


Link to post
Share on other sites
Advertisement
Here are a couple of links (though they are old):

One
Two

Also, although it's not really a texture generation method, you might want to look at texture splatting.

[Edited by - Gage64 on August 15, 2008 1:28:09 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Zaph-0
as the thread-title already says, I am interested in creating a basemap for my terrain with different textures and a heightmap. So far I thought about using the degree of the angle between vertices and the height of the vertice itself as criteria for the texture to use.
I have used this scheme, and it works pretty well, although I used a few enhancements. You can in fact do this per-pixel, entirely in the shader - take a look at Ysaneya's Journal for details.

It is easiest to calculate the angle instead as the dot product between the terrain normal and the vertical, i.e. dot(n, (0,1,0)).

Then you probably want to add some noise to both the height and the angle, because otherwise the transitions are very sharp. If you are doing this in a shader, you can use a small texture filled with several octaves of perlin noise.

Lastly, use the height and angle values (after adding noise) to lookup a value in a 2D-lookup table (as another texture/image), which contains the id of the texture to use. This lets you tweak the look of the terrain just by changing an image, rather than having to work on a complex algorithm.

Share this post


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

  • Advertisement