Anonymous commenting enabled / on the bottom of the page is a vote for next tutorials

Tuesday, March 8, 2011

Pure Data Webcam basics

Pure Data webcam basics

1. open up a new pure data project.

2. start by placing a "gemwin" object, this is the rendering window manager, you can add many attributed to it. we will start with the basics.

3. Add the "create, 1" and "destroy" message boxes, these will create the rendering window and destroy it, you cannot close the rendering window, it has to be closed with the destroy button.

4. Optionally you can give the window a dimension, let's say you want the Webcam to be shows in 720p, add a "dimen 1280 720" messagebox. but you have also have to change the size of the rectangle (see later)
Beware that you have to click the Dimen messagebox BEFORE you create the window

5. Next we will make the Gemhead object, this is a rendering chain, you can have multiple gemheads. like if you want 2 squares you will use 2 rendering chains.
Now we only need one, for the webcam

6. Connect the "gemhead" with a "pix_video". the "pix_" objects are used to define an input.. there's also pix_movie, pix_image...
"pix_video" is for webcam.

7. now the pix_video is in place, but there is no device selected, Pure data won't know which device to caputre from, we can choose our device by adding a "dialog" messagebox. if no devices are found you will get an error in the print window. always keep an eye on it.

8. The device is selected, the webcam is capturing, but the captured image isn't shown anywhere, this is because the pix_video isn't mapped onto a surface, to do that we will add a pix_texture.

9. the pix_video is now on a texture, now we only need to choose a surface for it to project on, this could be any object from PureData, like a rectangle, square, even a cube if you want it in 3D. we will use a Rectangle with a size of 4 by 3.

This is it! now you can click the dimensions button (you can change the dimensions as you like) and then hit the create, 1.


  1. how i configure the dialog mesagebox, i am new on this and im realy lost :(

  2. sweet - thanks for this!

  3. Muchas gracias por pensar en los demas, tu aporte es muy valioso.
    Excelente tutorial.

  4. Awesome tutorial, thanks a lot !

  5. Thanks for sharing

  6. Thank you for this great article. Indeed it is a great start, I read carefully each and every line here . please help me for more study,