# Smooth 3d gradient pattern

**URL:** <https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227>\
**Category:** Grasshopper\
**Tags:** windows, rhino6, lunchbox\
**Created:** [August 25, 2021, 10:21am UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227 "2021-08-25T10:21:00Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashetye](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ashetye/32/352303_2.png) [@ashetye](https://discourse.mcneel.com/u/ashetye)\
**Post date:** [August 25, 2021, 10:21am UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/1 "2021-08-25T10:21:00Z")

</div>

Hi all,  
I have been struggling to create a pattern in a way that the diamond pattern begins sharp and as it goes forward it fades out smoothly into a plain surface. I managed to create a pattern but I managed to fade out only in the the corners.  
I have uploaded a screenshot describing my problem. The direction of the arrow is how the pattern should fade out. (FYI, this is in Alias but pattern is made on grasshopper in rhino)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/f/5/4/f54957db07cc76594e792c8c640ad17e77de08f5.jpeg)

---

<div class="post-metadata">

**Author:** ![ashetye](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ashetye/32/352303_2.png) [@ashetye](https://discourse.mcneel.com/u/ashetye)\
**Post date:** [August 25, 2021, 10:21am UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/2 "2021-08-25T10:21:47Z")

</div>

Can someone help me with it?

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [August 25, 2021, 10:30am UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/3 "2021-08-25T10:30:26Z")

</div>

post your grasshopper file with the pattern please with the relevant geometry internalized

---

<div class="post-metadata">

**Author:** ![ashetye](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ashetye/32/352303_2.png) [@ashetye](https://discourse.mcneel.com/u/ashetye)\
**Post date:** [August 25, 2021, 11:24am UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/4 "2021-08-25T11:24:55Z")

</div>

[3d pattern diamond.3dm](https://discourse.mcneel.com/uploads/short-url/4SMkiZB3ddgYi2LXQpeEmJGB2Yw.3dm) (304.4 KB)  
[diamond pattern.gh](https://discourse.mcneel.com/uploads/short-url/jpan5ORcTJatBI1LVMC52EWdwrW.gh) (20.6 KB)

the pattern is applied only on the front curved surface of the roof.

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [August 25, 2021, 11:33am UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/5 "2021-08-25T11:33:38Z")

</div>

I’m not working with Lunchbox, so I can’t help you unfortunately.

You might want to add a tag “lunchbox” in the topic description or post a definition without it

---

<div class="post-metadata">

**Author:** ![ashetye](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ashetye/32/352303_2.png) [@ashetye](https://discourse.mcneel.com/u/ashetye)\
**Post date:** [August 25, 2021, 11:47am UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/6 "2021-08-25T11:47:02Z")

</div>

Ok. But if I have you have to work without lunchbox and create a pattern which is fading out. Can you suggest an algorithm for that?

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [August 25, 2021, 12:47pm UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/7 "2021-08-25T12:47:07Z")

</div>

Instead of calculating the distance to the boundary, you can get the distance to a surface above your pattern.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/1/f/c1fb1fd825a66146f70be111acc19656a0f55993.jpeg)

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

---

<div class="post-metadata">

**Author:** ![ashetye](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ashetye/32/352303_2.png) [@ashetye](https://discourse.mcneel.com/u/ashetye)\
**Post date:** [August 25, 2021, 3:34pm UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/8 "2021-08-25T15:34:32Z")

</div>

Ok. Could you show the algorithm to get an understanding of its process, if you can.

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [August 25, 2021, 3:44pm UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/9 "2021-08-25T15:44:55Z")

</div>

Forgot to post the file above.

[diamond\_pattern\_attractor.gh](https://discourse.mcneel.com/uploads/short-url/5fYRdf2GZ9Ej90pzp5Mzy3xQwnd.gh) (39.5 KB)

---

<div class="post-metadata">

**Author:** ![amir\_kharrat](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/amir_kharrat/32/767764_2.png) [@amir\_kharrat](https://discourse.mcneel.com/u/amir_kharrat)\
**Post date:** [June 22, 2024, 2:32pm UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/10 "2024-06-22T14:32:52Z")

</div>

i tried applying it to a surface of mine , and it doesnt work? i even tried surface mroph and still dont work? can you please help me sir?

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/e/1/6e13ee6be6e6eff96b135d41cc08def2fc0ce4ea.jpeg)

[diamond\_pattern\_attractor.gh](https://discourse.mcneel.com/uploads/short-url/lb1sTvcAucCRuz0j9EalJ0zM6bj.gh) (117.4 KB)

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [June 22, 2024, 2:40pm UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/11 "2024-06-22T14:40:56Z")

</div>

Your surface is not symmetric and the curves you used to create it has way too many control points. The isocurves reveal that you could do a better job at aligning the curves before lofting or sweeping…

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/f/0/7f03e1d872977336b652c9a2af73d50f26866349.jpeg)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/0/b/50b57fc7ddf838a07ab2575b627e78fef1200580.png)

Try this file with a simple example of two lofted ellipses:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/6/1/66141bf6cba461602fbd82c4d61aa77375468dd0.jpeg)

[diamond\_pattern\_attractor.gh](https://discourse.mcneel.com/uploads/short-url/qi1cTRZmiMYB77RHHkqDM4ShQQ5.gh) (118.7 KB)

You can replace the two ellipses in my example with two degree 3 curves. I’d suggest to place the seam on the Y axis. Create the inner curve and for example use loose offset as a first step of manipulation to create the outer curve.

---

<div class="post-metadata">

**Author:** ![amir\_kharrat](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/amir_kharrat/32/767764_2.png) [@amir\_kharrat](https://discourse.mcneel.com/u/amir_kharrat)\
**Post date:** [June 22, 2024, 2:58pm UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/12 "2024-06-22T14:58:37Z")

</div>

thank you sir,is there anyway to make my surface eligible for applying to textures to it? to make symetrical like you said? or how could i align them ? thank you

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [June 22, 2024, 3:02pm UTC](https://discourse.mcneel.com/t/smooth-3d-gradient-pattern/129227/13 "2024-06-22T15:02:52Z")

</div>

You could try to rebuild the curves but to be honest, I think it’s easier to start from scratch and create a clean surface.
