What is a heightmap?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Guest

What is a heightmap?

Post by Guest »

Hi guys

Could someone please explain what exactly is a heightmap?

I would like to create some terrain with hills and valeys. Do I need a heightmap for doing this?

The hills should contain some rock texture and snow on the top. Does anyone know is there is a tutorial on that one somewhere?

Thx
jikbar
Posts: 62
Joined: Wed Aug 25, 2004 4:48 pm
Location: Canada
Contact:

Post by jikbar »

A heightmap is a greyscale texture that describes the height of your terrain.

basically, if you have a pixel on the heightmap thats black, then the height of the terrain vertex that the pixel is mapped to will be zero.

if you have a white pixel (0x FFFFFF) then the height of the vertex that pixel gets mapped to will be the amount specified in MaxHeight (the next argument in addTerrainMesh i think).

the verts of all the grey pixels in between will be avalue in between 0 and MaxHeight (for example the shade 0x A0A0A0 will be equal to about 63% of MaxHeight)

so, your hills should be a lighter shade of grey on the heightmap and the valleys should be a darker shade
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

heigt map don't have to be neceserily raster file (texture) can be any form of data (array for example) which store info of height (y dimension) at given coordinates (x,z coordinates)
biotech
Posts: 37
Joined: Sat Jan 31, 2004 1:46 pm

Post by biotech »

is it possible to use actual maps...i belive it would be possible to make a greyscale image of an actual terrain map.
ich bin ein berliner
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

absolutly biotech...

a height map is merly a greyscale image...

a height map generator such as the game Savage has in use as a map editor will take the black, grey, and white values and use them to create the "height" of the map.

pretty simple design used to generate easily predefined beginning map demensions this only works on the y scale "up and down" so it would not be effective for designing a map for use with a first person shooter for example.

not unless it's a game like Savage which is unique in design being an RTSS a real time strategy shooter it combines a first person shooter style game with real time strategy dynamics and map design.

anyone that is interested in game design I would suggest you look at the games themselfs and understand more about them...games like return to castle wolfenstien or quake 3 will give you great ideas and concepts for first person shooter design as well as savage can show you many many other forms of game design in a single game.
Post Reply