Height Map files

Started by
7 comments, last by d000hg 18 years, 10 months ago
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.
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.
Of course! Interpolation between vertex points! Why didn't I think of that. Thanx for the advice.
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
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.
Try FreeWorld3d


-=[ Megahertz ]=-
-=[Megahertz]=-
i personaly use bryce3d, you can get the old bryces for about 5 dollars.
-----------------www.stevemata.com
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/
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.

This topic is closed to new replies.

Advertisement