Terrain detail textures

Published May 15, 2010
Advertisement
I added detail texturing to the terrain. What I did was add another texcoord set to the terrain (which in 3.1 is just another attrib in the vbo), and mix that with the base terrain texture.

In L3DT I have exported a 4k x 4k texture map, normal map and attribute map, while the heightmap is only 128 x 128. I then downscale the attribute map into a 128 x 128 version for use when randomly placing clutter (trees, stones, etc) on the C++ side, while I use the 4k x 4k attribute map to decide which detail map to extract texels from per fragment in glsl.

Each detail map has a texture and normal map, and with attributes to discern rock, sand, cliff and grass, the texture count for the terrain raised quickly.

It works pretty alright though, and though there's definately too much detail now compared to how far away from the terrain the camera is, I think I'll just live with it. The project deadline isn't too far away, and I have still got to integrate quite a few things. I really have to start the cuda integration of water now, since that's a requirement. Then I'll have to get picking back in, and fix some issues I have with depth (got to do with the RTT somehow, and post-processing). I have yet to generalize a post-process API, hopefully this will make it easier to track down what's wrong.

Previous Entry Cleaning up a bit
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement