<< Do you have a Grasshopper plugin you would like us to support on ShapeDiver? Let us know via our Forum and our development team will let you know if it's possible! While you're at it, check out our other supported third party plugins.>>
Rooster is a plugin useful for extracting curves from images; a process commonly known as Vectorization of an image.
Developed by Foresto Shen as an open source (GPL 3.0) Grasshopper library (available on GitHub here), Rooster is an implementation of ‘Potrace’ in the Rhino environment. Potrace was originally written by Peter Selinger and was ported to C# as ‘Vectorization’ by Wolfgang Nagl.
To bring Rooster to the ShapeDiver platform, it has been modified with Foresto’s support and made compatible with ShapeDiver’s Bitmap Parameter. This not only allows users to internalize images in their Grasshopper scripts, but also makes this version of Rooster compatible with ShapeDiver’s reworked version of Squid.
DOWNLOAD ROOSTER PLUGIN HERE
Want to check yet another great example of how Rooster can be applied to an online configurator? Check out this other example here.
With Rooster and ShapeDiver, you can create web interfaces that generate 3D printable objects with customized, user-uploaded logos / patterns, among many other uses. Everything is simplified down to a single component named ‘Rooster’ in the ‘Util’ Subcategory of the ‘Params’ tab.
How Does It Work?
Simply use an image from a public URL or an internalized bitmap parameter in the ‘Image Bitmap’ input parameter and the component will output a list of all the extracted curves in the ‘Curves’ output parameter.
For better control over the output, you may try adjusting the following parameters:
Threshold: Controls the minimum contrast/difference between adjacent blobs or turds of color.
Corner Threshold: Controls the number of corners in the output curves, or their smoothness. A value of 0.0 will output a polyline, while 1.0 will output a smooth curve.
Max Turd Area: Defines the maximum relative size of the largest single blob or turd of color.
Optimize: Toggle whether or not to optimize the final output curves.
Tolerance: Controls the optimization tolerance.
Invert: If the component is set to ‘Get Colors’ (from the right-click menu), setting Invert to true will invert the colors of the output. If ‘Get Colors’ is off, the turd detection will be inverted, i.e. outside to inside, hence changing the way the output curves are generated. Try using the Boundary Surfaces component to better understand this behavior.
Color Count: Sets the number of colors to be detected from the image. Behaves similar to the ‘Posterize’ effect found in most image editors. Be cautious when playing with this parameter; higher color counts can exponentially increase the computation time.
The Right-click menu also allows you to set the Turn Policy for the Potrace algorithm. This will have a very subtle effect on most images, but might be useful to try out various turn policies based on the type of image inputs you’re expecting (logos / patterns / text / photographs).
Compatibility with the ShapeDiver version of Squid (included with the ShapeDiver Installation) enables modifications to images before using Rooster to vectorize them.
To learn more about the ShapeDiver version of Squid, check out this blog post.
Pro Tip: The Dynamic Duo
ShapeDiver also supports free nesting plugin OpenNest, which means you can extract closed curves from an image using Rooster and use OpenNest to layout sheets for laser cutting that can be emailed to you at the click of a button on your website. This will enable great ease of manufacture directly from a single ShapeDiver interface.
<< Do you have a Grasshopper plugin you would like us to support on ShapeDiver? Let us know via our Forum and our development team will let you know if it's possible! While you're at it, check out our other supported third party plugins.>>