Advertisement Jump to content
  • Advertisement
Fixing heightmap seams
© CAVEMAN (C) 2000-2013 Rockland Software Productions
Image Tools

Fixing heightmap seams

Norman Barrows
Sign in to follow this  

blending heightmaps.


each type of elevation (ocean, flat, hill, mountains, and impassable mountains) possible in 5x5 mile map square has its own procedural heightmap, when map squares of different elevations meet, the heightmaps don't necessary (read: never) line up. when i first started working on drawing the ground, i spent about a week trying various algo's to make things seamless. when it got to the point where the next thing to try was the algo that eventually did the trick, i stopped, and forced all borders to slope to y=25. a few months later i decided to have another go at it. the trick is to "sew up" (slope to an average of the two heightmap values at a point on the edge) all the north-south running seams, then feed those results into the code that "sews up" the east-west running seams. the result is 4 different heightmaps that meet at a corner as smooth as a baby's bottom. this heighmap blending algo will work for any types of heightmaps from any source (procedural, bitmap image, etc). if you can get a y value given an x,y location from your heightmap, you can use this algo. i've seen threads on the site here where folks are having problems with perlin based heighmaps and chunks, and their perlin funtions are out of phase from one chunk to the next. this is one possible solution for that and any case where two different heighmaps meet.


© CAVEMAN (C) 2000-2013 Rockland Software Productions
Sign in to follow this  
From the album:


  • 68 images
  • 2 image comments

Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!