I am an artist based in Munich and in the last year i started to use grasshopper to help my art process. I am working on a Portrait research project and i am looking to create WPAP ART style in grasshopper. Like the image attached below. ( Image 1, Image 2 ).
It is basically triangulation or Polygonalization based on Brightness( greyscale values) in the image and then colouring the triangulated or polyganalized geometry with a defined colour set( max 10 colours ) corresponding to the Brightness ( Greyscale values). In Addition i would prefer more details in certain areas( i.e Eyes, nose and so on ). I am not able to define these things.
I gave it a try using Squid and shape driver plugins in GH, but it is not like what I expected. I am not able to go further. ( find - Image 3 ) and also find the grasshopper definition attached.
any leads or guidance on this would be highly appreciated. WPAP voronoi try 1.gh
First tests, using K-Mean Clustering + Delaunay Alpha Shape
10000 points, Height =4, 200 clusters, alpha = 0.1
10000 points, Height =4, 200 clusters, alpha = 0.15
Some others tests, playing with simplify curves angle and tolerance …
To start with Thanks for helping me with this. Works sweet. I having fun am experimenting with different variables ;).
Meanwhile, yesterday I started to solve the style using a different logic, will post it here in a bit and would love to get your thoughts on it.
Many logics can be used but it is not a simple problem. So it will be interesting to see other ways of doing.
you are totally right.
Here you go i tried something out. ( find image 1 )
Step 1.I created a pop 2d and passed it through an image sampler.
Step 2. i created polygons with the Points created by the points 2D component.
Step 3. with the polygons created i isolated them into 9 different groups based on the Brightness values optained from the image sample.
Step 4. Then i gave them seperated RGB values.
Please find the attached image ( image 1)
and also the GH defenition. might be a bit too heavy to load sorry about that.
to Start with i am happy with the output, but it has too many jaggged edges. Is there a way we could create a smooth geometry( simple polygons with out too many jagged edges) is there a way around it. ? (( image 2))
May be i was thinking.
In step 2 instead of creating polygons. i can directly isolate the points ( from pop 2D) into 9 different groups based on the Brightness values optained from the image sampler
in step 3 : I could create defined polygonal meshes / surfaces ( using a set of isolated points)
I am not much experienced with Mesh opereations. Your inputs is highly appreciated.
Shankar200105_WPAP _SHR.gh (6.6 MB)
I tried to simplify your definition. In order to group color, I transform Color Brightness (a double) to a point (0,0,brigthness) then I used closest point to search to have the index of closest color (respect with Luminance or Brightness)
Then I use an Elefront component to put your shapes in a data tree, on each branch a color.
The Region Union
Then Smooth polyline but you can skip it and go directly to Simplify.
Nota : I had to install Shape Diver plugin because of the bitmap component, but it could be replaced by legacy Import Image and then bounding box to have the size in pixel of the image, then it could be possible to have the color without image sampler …
200105_WPAP _SHR_LD.gh (6.6 MB)
Another version with more Legacy components
And a version using Mesh iso splitting
Thanks for the reply.
I took V2 Gh file and this is what i acheived and its really promising.
Find a few try outs i did.
I was wondering if we can add 2 new features to the script. Let me know what you think about it.
there are a few cubes / dots which are small as they dobnt belong to the cluster Is it possible to cull them out ( so the pictures would look really clean) How do it do it ?
Is it possible to add more point popullation ins specific areas ( say eyes or nose) which require more detail and correspondingly adjust the polygon radius size and less in areas which dont require much detail ( and later step we could pool it into one stream). This i beleive would help us create rally abstract WPAP image. If so how do i do it .?
What do you think.
Thanks again for your efforts. This is getting really interesting.