Jump to content
  • Advertisement
Sign in to follow this  
kobe bryant

Height Map files

This topic is 4808 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I know how to USE monochrome height map files to create bumpy terrains, but how do I go about CREATING the actual height map files themselves, I,m guessing you use photoshop, if you do- how do you actual create your own custom terrain height map files.I dont mind the file type because you can always save it as a 24 bit bitmap. Secondly, can someone explain or give an outline to the algorithm that games use to keep a character grounded on a bumpy terrain at varying heights. Thanx in advance for any help.

Share this post


Link to post
Share on other sites
Advertisement
You can use any image program you like, photoshop, paint shop pro, gimp or anything else. Though it can be hard to see what you are actually doing with the heightmap when working in a 2D-only program. You will often have to check the result in your renderer frequently to make sure you get what you want.

I'm not sure if there are any dedicated heightmap editing programs around. I only know the mission editor for Dawn of War has builtin heightmap editing tools and allows you to export the map to a TGA file.

You make a lookup in the heightmap to find the terrain height at the characters location. You need some kind of interpolation function to find the height in between the mesh vertexes.
When you have the height, you simply translate your character up/down to the correct location.

Share this post


Link to post
Share on other sites
It's also worth mentioning that while you can manually author heightmaps in programs such as photoshop, there are a variety of algorithms that will generate heightmaps programmatically. Just search for 'terrain generation' or similar, it is a fairly large topic. VTerrain has some good references.

-Mezz

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Terragen is a good terrain editing program, I'm not too sure if it can export heightmaps though. Give it a Google, I can't recall the link.

And you may want to look into Fault Formation and Midpoint Displacement algorithms to randomly generate terrain.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Terragen is a good terrain editing program, I'm not too sure if it can export heightmaps though. Give it a Google, I can't recall the link.

And you may want to look into Fault Formation and Midpoint Displacement algorithms to randomly generate terrain.



You can take a look at the midpoint displacement algorithm I used for a project in school awhile back. http://members.shaw.ca/siliconmunky/terraingen/

Share this post


Link to post
Share on other sites
I use a version of This algorithm. Easy to implement. I'd shy away from using a paint program, and use either full automatic generation of terrain, or a heightmap editor which allows you to edit the terrrain after a map has been auto-generated.
That's what I wrote for my project - the main terrain has been created using an algorithm and then some roads have been added.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!