Forum

Connecting the dots / colortracker

Hi,

I got a patch that takes data from a camera and runs it through a colortracker. The output is then run through a shader which draws a filled circle at the given coords.

So somebody can stand infront of the camera with a lightpen and draw on the video with it.

It works pretty good but there’s one problem, my camera renders 25 fps but that’s to slow for rapid movements, since the circles don’t overlap anymore and the line breaks up.
Now I’ve tried using a damper on the movement and that sort of works but the damper is set so high it makes the drawing difficult.

I’m wondering if there’s a simpler way to achieve my goal. I’ve tried connecting coords to points and that works but is there an easy way to connect the dots so it forms a solid line or should I try something like queueing an extra x and y, calculating a line between the last and the new coords and drawing a line with that? Or is there another way to do this that I’ve overlooked?

Thanks in advance.

there is the Rope node for that, but you cant combine it with a shader.

what you can do is building a yourself a simple rope: use CAR and CDR to cut a pair of coordinates from the beginning and the end of your spread. then use PointToVec for each slice to create transforms which will create line segments connecting from one coordinate pair to the next pair. Now use Transform (2d) to put them into the shader.

Ok so I’m running the colortracker x coord and the y coord to a 2 queues of 2 frames, those connect to a CAR and a CDR which in turn connect to a Pointtovec which goes to a transform 2d (translate x and translate y), I’m guessing thats what you meant.
Now how do I interpred that transform in my shader?

sorry, i was not fully clear – see the attached patch.
I used a Mouse and a Quad for input and output, but it will work exactly the same way with the ColorTracker and a Shader…

rope.v4p (6.5 kB)

Wow, I’d kiss you if you were here right now Oschatz! (so it’s probably for the best that you’re not :)).
I think I can see what’s going on in the patch, I’m gonna try running it through a shader to see if I can get rid of the quad edges with some blurs and add some effects to it.
Probably gonna finish that next year, I’ll upload the results.

Again, thanks a million, just curious are you one of the developers of vvvv? The answers seem to come so naturally for you.

hello all

i have a very similar problem like CheechWizz … more or less i need the same thing like the rope patch from oschatz, but the whole thing in 3d. i have a bunch of 3d point and i wanna connect it like in the rope patch …

unfortunately there is no points2vector (3d) is there a way to patch it with other nodes? probably there is :) sorry for my poor vector skills.

merci + greetings
thomas

Agreed, there is no Points2vector (3d), but a node called Polar - which should do the necessary calculation

@oschatz

okay i tried it with polar … i’m very close to what i want, but polar always “flips” some of my vectors. -> see patch

some hints more for me?

thanks thomas

rope02.v4p (12.2 kB)

hey,

i dont read the whole thread but i took a look at your attached patch and fix the rotation of the quads… maybe that was your idea

rope02.v4p (12.7 kB)