Convert black&white gradient image to different heights on z axis

hello everyone, i have a heatmap exported from running application that shows more and less popular routes for jogging in the city. the heatmap that exported from the app in image format. i would like to convert this black and white gradient image (white for the most popular and black for the most not poplar routes) into different heights on z axis - for ex. white will be 10m and black will be 0m (and all the colors between will be 1-9 for ex.). eventually i would like to have a topography model on rhino that the topography is made from the popular and non popular routes. i tried to make it but i ended up with weird heights and too sharp edges (eventually i would like to print this model) how do i do it? thanks a lot, I added the heatmap photo and the file with the code

3D (23.6 KB) (495.6 KB)
Does this help?
I used milimeters and weaverbird

1 Like

yes! thank a lot!!
i tried to make smaller (eventually i would like to print it as a model - that will be max 50cm on 50cm…), but when i change a little the values it ended up with errors…:\ i am new to grasshopper, may you explain me please how do i make it in order that it will look normal and not disproportional? and again - thank you

if your printed model is 50x50cm
What is the value of z?

i would like it to be max 50*50cm or other size that will be similar to this, but not something that will deform the original photo size, i think that the z value should be max 7cm

what do you think?
thanks again (484.4 KB)
please see attached

1 Like

What you are after is called Mesh HeightMap (Google that).

Speed is a paramount factor for that type of stuff … but it’s more or less easy to do a high perf (say ~300ms max for a very high res output) solution via C# . If by accident you are on that walk I could provide some indicative help. Shown a grey-scale output option.

1 Like