Sign in to follow this  

Hieght map?

This topic is 2855 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

Read through each pixel of the height map and get the values that you are using to represent height, then apply the height at that position for whatever height you extracted.

For example:

For each x in heightmap.width
. For each y in heightmap .height
. . Set the height of realmap at (x,y) to heightmap.at(x,y).red

By the way, this sort of thing belongs more in the Game Programming forum.

Share this post


Link to post
Share on other sites
Quote:
Original post by thegamemaker777
OK so I made a height map but how do I make my height map into a real terrain that I can use on my game?



There are sample programs with libaries like the Windows DirectX SDK which do heightmaps (and will also have all the stuff you will need to learn to do 3D programming)

Also try Googling 'heightap code" and see if there are simpler example programs
(including OPENGL) and add your language to the query (ie C++)


The height map the height data for a regular grid of points used to make a
regular pattern of 'right' triangles forming a surface of squares (a mesh).
Usually a 3D 'mesh' is done for the entire map and you have a 'camera point' that moves around on that map giving the viewer a 3D view of the position and facing of that camera.


Share this post


Link to post
Share on other sites
Quote:
Read through each pixel of the height map and get the values that you are using to represent height, then apply the height at that position for whatever height you extracted.

For example:

For each x in heightmap.width
. For each y in heightmap .height
. . Set the height of realmap at (x,y) to heightmap.at(x,y).red

By the way, this sort of thing belongs more in the Game Programming forum.

Oh ok.

and sorry about posting in the wrong section.

Share this post


Link to post
Share on other sites

This topic is 2855 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.

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

Sign in to follow this