Help using Kinect data to draw filled shapes
-
Hi Guys,
I'm quite new and need some help.
I've been playing with various forms of input but most commonly using a Kinect 2. No problem getting the osc via NiMate, etc and able to draw lines that are linked to various tracked points in real time.
But, I cant seem to draw filled shapes that use the 2D or 3D vector of an input to draw filled shapes. For example, a triangle made by the top of the head, the right & left hands.
I have tried to use some glsl actor code for this but, I am new to opengl and some of the directives don't seem to work inside the glsl actor.
Ultimately, I would like to be able to draw multiple shapes (say several triangles made by linking the middle of the body to your head, hands and feet) that could be made to fold or overlap based upon the input of the moving points.
I'm not sure if my description is clear enough but I hope someone might have a bit of guidance for me.
Any help is appreciated.
Thanks.
-
@renegadeboy said:
But, I cant seem to draw filled shapes that use the 2D or 3D vector of an input to draw filled shapes.
Have you tried connecting the X and Y values for each point to an individual Shapes actor's "horz pos" (X) and "vert pos" (Y) to get shapes that followed the points? You'd use Limit-Scale Value actors to scale the values with some guess and check work to make the scaling work out. It's possible that I don't understand your question though...
Best wishes,
Woland
-
@renegadeboy
It sounds like you would like to draw a Polygon, with each vertex controlled in 2D (x and y).
There is no included way of doing this in Isadora.
I have found a GLSL shader that was a library for drawing many different shapes, but can't find it now.So, it may be that you need to roll your own. This online book may help: https://thebookofshaders.com/0...
-
Thanks to you both for your ideas and feedback. I think DusX managed to say what I was trying to get at, each vertex controlled in 2D but, no way to do this directly in Isadora.
I have since prototyped a simple solution sending data to Processing using OSC and returning the moving polygon output to Isadora via Spout. It's a bit glitchy (though right now it's settled down to 30 fps) and I haven't had the chance to link it with the actual Kinect at this time but it appears to be okay for the moment.
Once I get it cleaned up and working with the Kinect, I'd be happy to put it out there for anyone who might be able to offer further advice or optimisation.
Anyway, thanks again.
-
this would be a great feature in Isadora - kind of like a mashup of Shapes and 3D Lines.
-
Workaround method of drawing Polygons.
I just posted a method as a reply to a Question Fred had.
It might be useful to address this usecase as well.
https://community.troikatronix...