Polygon node

Hey,
it would be really useful for me to have a polygon Node.

Design:
As a vuo.mesh.make.lineStrips Node.

Input:
Point List
Color/Image

Output:
Object/Image

I’ve opened this feature request for community voting.

I’m thinking this node would be similar to the existing Make Line Mesh nodes, in that it would take a list of points as input, and output a Mesh, which you’d then feed to Make 3D Object to assign a shader and transform. (Then if you want an image, just pass that object to Render Scene to Image.)

Since OpenGL doesn’t natively support arbitrary polygons, I’m thinking we’d use the stencil buffer rendering technique described in OpenGL Programming Guide Chapter 14.

@monkey0815 I know the Paradox Nodes has a “Make Mesh With Values” node.

May not be at all what you mean, but perhaps it could be useful for you until a node like this would be implemented. Not sure.

Cheers

How about just the equivalent of triangle loops?

Do you mean like Kineme Triangle Family patch @pbourke? Both triangles from list and polygon fill from list (2D only) would be good in Vuo. What is the simplest way mathematically to fill a polygon region with triangles using the polygons coordinates?

Using two consecutive corner coordinates and then making a triangle using a third point from another coordinate that is “opposite” them in the polygon coords list is the simplest I can come up with. Haven’t tried to program it in VUo yet, will wait for a pressing need for it as I’m still learning the peculiarities of looping in Vuo! Also there’s the case of coordinates that lie inside the region formed by all the other coordinates which might mess up my simple method.

There must be a C library out there that can do primitive geometry wrangling like this which Vuo could use to make a Polygon Fill node? Even Cario and Qt (already used in Vuo, perhaps limited to canvas drawing) may have polygon functions, though to generate a Layer datatype in Vuo they may need something else like OpenMesh.

Be interesting to know what library/framework Vuo devs used for the new 3D Boolean Ops node… maybe that can do it.

OpenMesh is underneath something called OpenFlipper, which has scripting for runtime interaction and even a visual editing suite. I wonder if any of it it could be of any use to Vuo?

 

On further research, I think any initial Polygon from Point List needs to be confined to a 2D plane, so only 2D Point admitted in the input posts for coords and maybe an optional input for the plane, which defaults to the {X, Y, 0} plane.  

Noting here that my FR for Polygon mesh with fill has been added to this one. Features of interest to me:

  1. Chamfered or radiuses corner treatment option(s) for the Polyline path, currently Make Points along Spline node renders ‘gaps’ at points where incoming line segment is not parallel with the outgoing line segment. Chamfered/radiuses corners been discussed on another thread but I can’t find it.

  2. Polyline stroke width and dot/dash options like you get in Illustrator/Sketch/CAD software (not the randomly generated ones in Kineme GL Line patch though which were fairly un-useable in my line of work) .

  3. Fill polygon with colour, image, gradient blends. Input for images. Size to fit/fill image and actual size. Fill with alpha black would be a good option to have also for layering on top of other artwork to make sections of them transparent, as defined by the polygon shape outline.  

Point colour lists, like KinemeGL Triangle family patch could be cool too. 20 points (X,Y) 20 colors (R,G,B). Gradient mesh using point list and colour list data mapping.

Hey I think I asked about this previously somewhere on Vuo. I’m a bit surprised to see it was requested five years ago. It seems like a no brainer really, just a simple node that can make a filled polygon from a list of points. I’m guessing it would be a real simple task for the code bosses. The same node could also do a polyhedron.