Gradient Hatch technical testing

The latest V7 WIP (March 26, 2019) includes support for gradient hatches. Please see this document for details on how to use this, what is complete, and what is on the roadmap.

I have also listed this as a feature on our V7 feature post.


great news

@giovanni.betti ↑

1 Like

extremely useful functionality to produce quickly presentation drawings, thanks!
Will this support transparency as well? or this is too much asking? :wink:


The green surface is a regular solid hatch, the other is a gradient hatch with transparency.


amazing, thanks!
can’t wait to use it!


Just tested, it’s awesome, congratulations guys! Even better and more intuitive than Illustrator.

1 Like

Don’t know if it could be useful for someone, but I made a little C# that uses Gradient Hatch

It takes hatch which are in Voronoi cells, then put colors depending on an image.
Tell me if GH script is useful.


Congratulations, this is a great new feature with many uses : ) Thank you!

Very cool! Are you creating hatches fer every cell?

Here’s another fun one that uses the new DrawGradient… functions on the display pipeline (524.0 KB)


In order to use this script, you have to :
Load an image, then bake the Voronoi polygon, hatch all Voronoi Polygon, put their ID in the ID component … Not super simple but it was a way for me to go in the code of Gradient Hatch, the advantage is that the Rhino Hatches keeps their gradient.
gradient (19.0 KB)

Here is my implementation

   Rhino.DocObjects.HatchObject obj = (Rhino.DocObjects.HatchObject) RhinoDocument.Objects.FindId(x);
    if (obj != null && colors.Count >= 2 )
      Rhino.Display.ColorGradient g = new Rhino.Display.ColorGradient();
      List<Rhino.Display.ColorStop> colorStop = new List<Rhino.Display.ColorStop>();

      for (int i = 0; i < colors.Count; i++)
        colorStop.Add(new Rhino.Display.ColorStop(colors[i], (double) i / (colors.Count - 1.0)));
      g.StartPoint = y;
      g.EndPoint = z;
      g.GradientType = Rhino.Display.GradientType.Linear;
      Hatch jh = (Hatch) obj.Geometry;

That’s so cool. It’s awesome to see this used in different ways

Thanks for the tool. There are surely endless new possibilities.
I don’t know if I make something wrong, but it seems that there is a limitation in ColorStops, with more than 8 points I have “flat” colors

The OpenGL shader only has to be hard coded with a limit of stops (currently 8). I wasn’t sure if people needed more, so I left the cap as a relatively small number. I can crank this up if you need more.

At me moment it is OK for me, I haven’t crazy Gradient to do, I wanted to test the possibilities. I have no idea if things could be merged but GH2 seems ready to have more Gradients, is there a possible harmonization between the functionalities of Rhinoceros and Grasshopper ?


I’ll probably just bump the cap up to 16 since you already noticed.

As far as GH2 “harmonization”, I don’t think there is going to be any issues with supporting whatever gradients are defined there. David and I usually work together to figure these things out.


This is pretty much what I thought would be possible for @Holo to do his terrain material.


Yeah, that will be interesting for the future, when V7 is out :slight_smile:

1 Like

Wow!! Fantastic news, thanks a lot for implementing something like this. Any chance that we, Mac users, could get it in V6 WIP?

Also, now that transparency is supported, have you think about implementing blend modes, as multiply, screen and so on. This would be very very handy.

Thanks again,


No, this is V7 specific and will probably still require a lot of feature enhancements and bug fixes before it is even considered something done for V7. We do have an internal V7 Mac build that we test this with and the gradient hatches are working on Mac.

You should have access to the Mac V7 WIP on the same day that Mac V6 ships.

I haven’t thought of this. Do you have samples of effects you would like to try to achieve?