Jump to content
  • Advertisement
Sign in to follow this  
Yhonatan

Texturing A Terrain

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

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
Advertisement
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
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!