Mouse polygon

I am trying to create make my first video mapping and I am having some problems. I want to use the mouse to create a polygon that I will further use as a mask for a video, and also to create a line / dot that follows the edge of the polygon. Can someone give me some tips / tutorials, because I’ve been searching with no luck.

Thank you,

you have this utility in contribution:

should work to enable you draw your polygons or arbitrarypoint surfaces ( quad but movable on angles).

here is also antivj beta patch for mapping: (101.3 kB)

and this is @catweasel s dynamic line tool


Thank you very much karistouf. pointeditor2d works ok, but it wold have been nice if it could save the polygon or the points coordinates.

I think you can use PointEditor (3D Persistent) and keep all z at 0

hi vlady4ip ! if you want to save, you need to write it into a text file your data

see my basic launchpad ( ugly but working) contribution to see how to save your points and load them on start: launchpad-configuration-patch

Thanks for the patch, but not saving the data is the problem, but getting the data to be saved.
I’ve made a patch based on pointeditor2d to have just 4 points, but I don’t get it from where to get the coordinates for them.


hi valdy4ip

use S+H node to get the actual value changing on mouse click, then use getslice node

getslice bin pin enbales you to specify the array size you want to extract from the main array.

or i misunderstand you?

ok that is a very very old patch done for a show, a looooong time ago, so please do not throw me tomatoes ;-)

hope this may help you.

if not, consider that you need to developp more your question and what you want to achieve. ;-)

/EDIT/ maybe your question is more basic: once you have drawn a satisfying polygon, create an io box, link it to your array. this will feed your iobox with the poligon matrix. Then disconnect the io box from it. you have your data there, saved.

arbitrary point (38.8 kB)

I was interested in getting an array with the coordinates after I finish dragging arround the grid points.

I’ll try be explain again. I’m using pointeditor2d that you provided, and it works uber fine for what I need; but I was interested in saving the dots coordinates in a text file, but I don’t know where from and how to extract them from the pointeditor2d patch.

Thank you,

nevermind ;-)
open the help pach and just connect a vector(3dsplit) to the output of the point editor.
its is in 3dimension so you have 40 vector3d ( the provided example is showing in output a spread of 120 data ). See ?

Yep, thank you. That did the job :)
If you don’t mind, can you also help with the second question that started this post? How can I create a line / a dot that follows the shape a just generated with the pointeditor2d?

my pleasure !
this io reply about catweasel’s module: draw-lines

but better is to post here your patch to understand where you have trouble wth. Its a good manner to learn vvvv by exchanging with patches.

Hello karistouf,
I’ve attached my working directory to get a better picture of what I am working on.
As you can see in patch 2_bm1 - main1 is the main output of the project: a video with a mask, so I can project only on the areas that I want. The mask is made with photoshop, but I want to generate it by using lines.
For the drawing the lines a use 1_Draw.v4p. Is there a way to paint the inside of the shapes created by those points or add a texture, so I can actually use them as a mask?

V (144.0 kB)

… no text …

polygonal (55.2 kB)

Thank you for the patch, sven.

You’re welcome. I hope it helps a bit.

It did help. Here is my current work progress - project folder an demo vid. It’s my firs project, so any tip is welcomed and useful :)


project folder (13.8 MB)
video (21.1 MB)

Looks fine :)
Don’t hesitate to ask if you face any specific problems.