Skip to main content
GameDev.net gamedev.net
🔒 Locked

Texturing A Terrain

Started by Yhonatan Oct 11, 2008 at 8:25 PM 1 replies 850+ views
Original Post
Yhonatan
Yhonatan
I'm currently working on a 3d-fps game. Since I started working on my game, i'm using a terrain that was generated by a height map, and a 1024X1024 texture that is used by the whole terrain. I have no idea how to make my terrain looks better and the tutorials I've found in the internet dont look so good. So I got few questions - How should i generate my terrain for my game? and what about textures? should I use a tile-based texturing? it looks kinda bad. I've also tried using Colors + a texture that contains black points (the white t.v screen snow) and it looks a bit strange and also the far hills looks bad when moving around the world. Any help is welcomed, Thanks in advance
wodinoneeye
wodinoneeye


Do a Yahoo search with 'terrain splatting' which is a surface texture blending technique. Most cards these days can do it in the GPU.
--------------------------------------------[size="1"]Ratings are Opinion, not Fact
Lord_Evil
Lord_Evil
Maybe my approach is worthwile for you. It allows you to use up to 256 different "images" and up to 4 "images" per tile by combining 3 textures in a shader.

The first texture is the texture atlas, containing up to 256 different images for the tiles.
Second you need a "tilemap" containing the index of the corresponding tile image encoded in a channel, so up to 4 different tile images per "pixel".
The third texture contains the weights for each of the channels.

So what I do is read the tilemap and convert the colors to indices and offsets into the texture atlas. I then read the corresponding texels from the atlas and combine them using the heights from the 3rd texture.

That way you have 3 - 6 texture reads in the shader (without branching always 6) but it gives you the possibility to use use a huge variety of ground images with a constant overhead.

You could combine that approach with automatic texturing methods like texture splatting for creation of the tile and weight maps.
If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.