Generating topography from DEM-image

Dear everybody,

I am quite new to Grasshopper, and I have tried to follow the directions of this tutorial to generate a topographic model from an image.

For some reason, in my file, it won’t allow me to make the colours of the image “negative” - which, to be honest, I don’t know what that even means. Furthermore, it seems that my points from my surface divide branches out into a tree, but that doesn’t happen in the original tutorial.
I’ve tried to replicate the articles script exactly, even making a file with the same dimensions, but it doesn’t seem to make any difference. Any help will be appreciated!

Grasshopper-script:
dem_test.gh (884.2 KB)

Image file:

EDIT: Sorry, I uploaded the wrong grasshopper-file! Should be the correct one now.

Hi and welcome to grasshopper!
Your definition was overall good, just some “grammar” mistakes.

Use a panel to see the outputs of a component that is giving you an error, in your case you are having a lot of “null” items.

[Image sampler] gives Color as output, you can convert it to a 3D-vector to use it in other ways.
(For example white(255,255,255) became a vector(1,1,1) )
with a vector you can use [Negative] component successfully.

Also you should reparametrize your initial surface and set the [Image sampler] to use “0 To 1” domain.

Lastly, [Surface from points] need to work with the whole list of points, so you have to flatten the input.


dem_test.gh (883.3 KB)
(descriptions inside)

Thank you SO much.

I will play around with it a little more, but I have some questions already, just to understand what is happening within the “machine” that’s doing the work for me :slight_smile:

  1. What is it actually that “reparametrize” means?
  2. Since you have changed the range from 0-1 instead, does that mean that I would need to make the input-image as a square “always”?

Thanks!

The parameter is…
Well let the creator of GH tell you:
here: https://www.grasshopper3d.com/forum/topics/evaluate-curve-at-t
here: https://ieatbugsforbreakfast.wordpress.com/2013/09/27/curve-parameter-space/ (this is great)
and here: https://ieatbugsforbreakfast.wordpress.com/2013/09/28/curve-parameters-an-analogy/

What can I say is, parameter is NOT length. Don’t mix the 2 things.
I think this evaluate.gh explain it better than 1000 words (of mine).

Still, you should want to read David’s post.

Then, Image sampler can use specific ranges, but using 0To1 domains is useful because you don’t have to re-set them every time.
You “feed it” a [0,0] point and it means the bottom-left corner, [1,1] means the top right.
You can change the picture and it still works without having to set anything.

Maybe this is a personal opinion, tought.