Fixing heightmap seams

Other images in Caveman

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.

Copyright

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

Caveman

  • 68 images
  • 0 comments
  • 2 image comments


0 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