Sign in to follow this  
Yhonatan

Texturing A Terrain

Recommended Posts

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

Share this post


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this