# Creating a Topographic Mesh out of a .jpg

**URL:** <https://discourse.mcneel.com/t/creating-a-topographic-mesh-out-of-a-jpg/211733>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [October 30, 2025, 7:03pm UTC](https://discourse.mcneel.com/t/creating-a-topographic-mesh-out-of-a-jpg/211733 "2025-10-30T19:03:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Viya](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/viya/32/707068_2.png) [@Viya](https://discourse.mcneel.com/u/Viya)\
**Post date:** [October 30, 2025, 7:03pm UTC](https://discourse.mcneel.com/t/creating-a-topographic-mesh-out-of-a-jpg/211733/1 "2025-10-30T19:03:54Z")

</div>

I have a black-and-white JPG image (attached) that I want to turn into a topographic mesh, with the white areas raised higher and the black areas remaining flat. I’ve been trying to create this in Grasshopper, but since I’m still new to it, I’m struggling to get it right. I’ve attached my attempt here, does anyone know what I’m doing wrong? Or even better, is there an easier way to achieve this? I’m currently using brightness in the Image Sampler.

 ![Flat salt spray experiment](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/6/1/761da6ca28101b6aa6875e9ca2d4adfc5068a071.jpeg)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/0/c/e0cab91c953fcb310f8071d3fa93905a258e3516.png)

---

<div class="post-metadata">

**Author:** ![René\_Corella](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ren%C3%A9_corella/32/769427_2.png) [@René\_Corella](https://discourse.mcneel.com/u/Ren%C3%A9_Corella)\
**Post date:** [October 30, 2025, 9:17pm UTC](https://discourse.mcneel.com/t/creating-a-topographic-mesh-out-of-a-jpg/211733/2 "2025-10-30T21:17:09Z")

</div>

Assuming this is literal:

> [@Viya](#):
>
> white areas raised higher and the black areas remaining flat

I like the `Import Image (IMG)` component—nothing wrong with image sampler, just a preference, plus it gives you a colored mesh from the image, which you can adjust resolution for (or leave 1:1 if you remove XY sliders). Using ‘half’ the resolution here:  
[mesh\_brightness\_bump.gh](https://discourse.mcneel.com/uploads/short-url/lA2YFurzsqK2PaGzNWVxw98SYMc.gh) (28.1 KB)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/c/4/6c4176574a87338082076437f2f508690d9b8e97.png)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/0/4/a/04a3301aeda5f40955fcc04ed2e6dfec8bb48209.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/c/0/6c084419cd4ce4af354abd2d42dd232339a0e2fa.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/0/4/7/04786626db4a8b711d0af24f3be71c53ab243c14.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/3/a/53abda2a5f60ddeecef4af038c8493f58cc38a26.jpeg)

---

<div class="post-metadata">

**Author:** ![Volker\_Rakow](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/volker_rakow/32/770451_2.png) [@Volker\_Rakow](https://discourse.mcneel.com/u/Volker_Rakow)\
**Post date:** [October 30, 2025, 9:33pm UTC](https://discourse.mcneel.com/t/creating-a-topographic-mesh-out-of-a-jpg/211733/3 "2025-10-30T21:33:02Z")

</div>

Where was that thread where we made the rectangles from the black and white picture?

---

<div class="post-metadata">

**Author:** ![Viya](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/viya/32/707068_2.png) [@Viya](https://discourse.mcneel.com/u/Viya)\
**Post date:** [October 30, 2025, 10:07pm UTC](https://discourse.mcneel.com/t/creating-a-topographic-mesh-out-of-a-jpg/211733/4 "2025-10-30T22:07:58Z")

</div>

Wow! Thank you so much, René! This is incredibly helpful and exactly what I meant. It looks great! These are essentially salt particles, and I’m using height to represent their intensity.

---

<div class="post-metadata">

**Author:** ![René\_Corella](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ren%C3%A9_corella/32/769427_2.png) [@René\_Corella](https://discourse.mcneel.com/u/Ren%C3%A9_Corella)\
**Post date:** [October 30, 2025, 10:41pm UTC](https://discourse.mcneel.com/t/creating-a-topographic-mesh-out-of-a-jpg/211733/5 "2025-10-30T22:41:01Z")

</div>

> [@Facade panelization](https://discourse.mcneel.com/t/facade-panelization/207625):
>
> Greetings to everyone here. I am trying to recrate this pattern in grasshopper, but don’t know how. The result im trying to achieve, that i’ve did manually Black parts should be windows. I tried to use lunchbox staggered quad panels for that, but don’t know how to achieve random distance between pillars and windows. Does anyone know what i should do?

---

<div class="post-metadata">

**Author:** ![Viya](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/viya/32/707068_2.png) [@Viya](https://discourse.mcneel.com/u/Viya)\
**Post date:** [October 30, 2025, 11:07pm UTC](https://discourse.mcneel.com/t/creating-a-topographic-mesh-out-of-a-jpg/211733/6 "2025-10-30T23:07:21Z")

</div>

Hi again everyone, one other thing what would be the quickest way for me to give this a colour gradient so the tallest (most white parts) would be a darker shade of lets say blue for example?

---

<div class="post-metadata">

**Author:** ![René\_Corella](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ren%C3%A9_corella/32/769427_2.png) [@René\_Corella](https://discourse.mcneel.com/u/Ren%C3%A9_Corella)\
**Post date:** [October 30, 2025, 11:37pm UTC](https://discourse.mcneel.com/t/creating-a-topographic-mesh-out-of-a-jpg/211733/7 "2025-10-30T23:37:58Z")

</div>

Like this?  
[mesh\_brightness\_bump-color-swap.gh](https://discourse.mcneel.com/uploads/short-url/cW1MwHqNut2BLugEMnbpsTf0hV1.gh) (17.2 KB)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/b/2/5/b252d783c1b202fecbbcb54ffda593f95aa3faaa.png)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/e/7/ee7e1ab9f60cad49034b56f12db3242ada655305.png)

---

<div class="post-metadata">

**Author:** ![Viya](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/viya/32/707068_2.png) [@Viya](https://discourse.mcneel.com/u/Viya)\
**Post date:** [October 31, 2025, 11:33am UTC](https://discourse.mcneel.com/t/creating-a-topographic-mesh-out-of-a-jpg/211733/8 "2025-10-31T11:33:57Z")

</div>

Perfect! Thank you so much for all your help! I’m feeling more confident about replicating this now!
