[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] resources for edge tile algorithm



Sorry, I forgot to mention that I already have all the transition tiles and they are not simple gradients, but pretty nice pixel art that is different in all directions making it look pretty realistic. For each type of terrain it should smooth the edges using the existing transition tiles.

On Wed, Jun 24, 2009 at 10:18 PM, Ian Mallett <geometrian@xxxxxxxxx> wrote:
In Paint Shop Pro, I create two surfaces with black/white gradients running in opposite directions.  Turn these gradients into alpha channels.  Then put the first tile in one surface and the other tile on the other surface.  Merge the two surfaces (average), and you have effectively created a "transition" tile that goes from one tile type to another.  This wouldn't be too difficult to do in PyGame, and it's flexible enough (change the shape of the gradient) to accommodate a variety of situations.