Sunday, November 30, 2008

Random Transitions and Tiling issues

The latest implementation had seems at the edges of each repeating texture tile possibly due to bilinear filtering. I tried to fix this by offsetting the uv by 1.0 and scaling the actual image down by 2 pixels but this makes the tiles not repeat exactly. Still it is much better than the obvious seams before. I also added a noise texture that I use to randomize transitions between tiles.

Currently my look up table (LUT) only has 5 entries based on altitude only. Eventually I will make one that also incorporates slope.



This is a screenshot of the terrain with the more random transitions. I have 16 texture slots to play with so I will probably mess around with the look up table next before moving on to things like fixing my GLSL normal shading.

Also, something I forgot to mention in my last post was that the height maps are now randomly generated use FBM noise. I create 6 1024x1024 height maps on start up and save them to disk for the next time I run the program because my height map generation algorithm isn't optimized yet and takes a good 10-20 seconds to complete, which adds up when you're adjusting and recompiling frequently. The height maps are named in such a way that they are specific to the seed used for the noise, the size of the map, and the face on the 3D cube.

No comments: