31.01.2015, 08:41
in my understanding you want to create a map like this
but in a completely new custom map.
I don't know how it was done in mapandreas but one way I can see this is that you get 2 z values, one being the highest point on the map, and the other being the lowest.
then from casting a ray every x units in both directions so you make a grid (you can figure out the highest and lowest z values from this data)
then you could write a program that gets the grid data and draws the map, the pixel colour would be dependent on how high on the z axis the x and y points are
like
pixel_colour = ((z_values[x][y] - min_z) / (max_z - min_z)) * 255;
but in a completely new custom map.
I don't know how it was done in mapandreas but one way I can see this is that you get 2 z values, one being the highest point on the map, and the other being the lowest.
then from casting a ray every x units in both directions so you make a grid (you can figure out the highest and lowest z values from this data)
then you could write a program that gets the grid data and draws the map, the pixel colour would be dependent on how high on the z axis the x and y points are
like
pixel_colour = ((z_values[x][y] - min_z) / (max_z - min_z)) * 255;