Friday, September 14, 2012

Dynamic terrain blending

Up until now, I have been using realistic textures for ground terrain. In my opinion, that looked terrible and was almost impossible to blend correctly. Fortunately, I found open-license terrain sheets at opengameart.com and I am making an algorithm to blend the tiles correctly. The less realistic terrain makes the game look much softer and better, in my opinion. T

his is one of my favorite tilesets, and you can find more tilesets with this format quite easily: http://opengameart.org/content/lpc-farming-tilesets-magic-animations-and-ui-elements With these tilesets, my blending algorithm is actually quite simple right now. In OpenGL, one of the fastest ways to load and draw images is to use large power-of-2 sprite sheets and map subimages off of that sheet into areas on the display screen.

I decided to use two terrain layers to help with blending.  My lower terrain layer will always blend using grass behind.   My secondary terrain layer is on top, and each blending tile will blend with whatever terrain tile is below it, in the lower terrain layer.  Here is an example of how this new tile set looks!

 

No comments:

Post a Comment