Rhino heightfield in Grasshopper (image sampler, mesh, uv)

I’m trying to script ‘some sort of rhino heightfield,’ but it’s not working, what am I doing wrong?
Thanks in advance for your response.

I do not know how to get the UV of the mesh nor do I know why white is read by the image sampler as a low value of as the highest value.

20181012 00 rhino heightfield in grasshopper.gh (122.2 KB)

I’d like to point out a few things for you.

  1. You should change to set the graphmapper’s color channel setting to Colour Brightness.

  2. Change your target domain’s start and end values of Remapto get the heigher points for white part of the image.

  3. Use Surface From Points or Construct Mesh to get the final shape at the end.

    20181012 00 rhino heightfield in grasshopper_re.gh (120.4 KB)


Great! Thank you Kim!

Do you also know how to color the mesh? I tried it with that component ‘mesh colours,’ but I was not able to get it work.
Coloring it with the image.

The surface becomes black or grey when I try to apply the image to the surface.

For coloring just copy your Image Sampler set Color as output, not Brightness this time. Feed the output to C of Mesh Construct

1 Like

Thank you great!
I see that it creates the colors based on the uv-resolution. Hmm… I see my own approach does not create what I wanted.

I cannot find something that applies the image with the original resolution. Do you know a component which applies the image with the resolution of the image?

For that I use Import Image, don’t know if it is a plugin or not ?

1 Like

Yes, I found that one. Unfortunately, in my case, it creates a mesh from over 1.000.000 vertices. Applying the same method let Grasshopper calculate the things for a long time.

Hm… I cannot find something that just applies the image to a mesh. Maybe my way of trying to apply it is not correct.

With knowing how all the previous mentioned components work, I am looking to something that will project the image to the image of some sort.
I do not know what else I can think of.

Maybe something like apply image to surface.

Ah-ha! Custom Preview Materials of the plugin Human,

But, it only works for surfaces.
I cannot find how to do it for meshes.

20181012 00 rhino heightfield in grasshopper_reV2.gh (164.8 KB)

Thank you. Yes, I am now familiar with that.
However, I cannot find a component that applies an image on a surface (on the left) like for on a mesh (for the right).
There is a difference in resolution.

Isn’t it natural because the resolution of your two meshes is different? And you can use texture mapping on surfaces(for example, using Human plugin), but that’s a completely different concept.

Okay. So, I understand that there is not such an component that works on meshes like human on surfaces does.

It think I just have to accept that.
And thank you for responses, you helped me out. :slight_smile: