masking video with

    May 20 2012 | 4:59 pm
    Hi everyone,
    This seems like a simple question, but I cannot figure out how to create a circular mask using that will not change the dimensions of the incoming video.
    What I would like to do is take a live video signal and simply "open up" a circle that will allow a specific portion of the video to be viewed. My current patch (which is mostly from the help file) changes the dimensions of the video to conform to the circular shape. I have posted the patch below. There are many loadbangs, so please save it and then re-open it.
    I would like to be able to change the values to [pak scale] (which is highlighted in green in the patch) and be able to see more or less of the incoming video, without distorting the dimensions.
    Any tips would be appreciated.

    • May 22 2012 | 6:25 pm
      hello. you want to make use of the tex_plane_s/t attributes in order to zoom the texture.
      i've added to your patch a helpful abstraction for doing this.
    • May 23 2012 | 6:34 am
      Thanks a lot!
      On a related note: is there a way to poll the source/destination data for all of the "copies" of the image that are made using a zoom value less than 1.0 in tex_map mode 1? I'm interested in changing the timings of the different copies when the zoom value is 0.258, for example. I'm not sure how this would work using the GL objects.
    • May 23 2012 | 5:24 pm
      no, these copies are simply a gl texture with wrap-mode repeat.
      of course you could build this yourself using multiple gl.videoplanes or gridshapes.
    • Jun 19 2012 | 9:38 pm
      i'm using some of this as the basis for a patch I'm working on. Is there a way to map the video texture in its native dimension? My video is being warped to a 1x1 shape, and the video was shot in 16x9.
    • Jun 19 2012 | 10:25 pm
      if you are displaying a texture using, set @transform_reset 2, and make sure the aspect ratio of your jit.window matches the aspect ratio of your source image.
      alternatively, you can try @preserve_aspect 1
      if the aspect ratios do not match, you can set @adapt 0 and explicitly set the @dim attribute on your
      if this doesn't help, post your patch.
    • Jun 20 2012 | 9:25 pm
      great! I will try that. The other thing that I'm wondering about is this: For the effect I'm trying to build, I'd like all the circles to come from the same video source (done), and I'd like the outer circles to have a slight delay from the inner ones so that the further out you go, the more it wiggles. (basically this:
      I'm pretty sure I can control the delay by pulling frames from the and just subtracting for each layer, but what if I wanted to do this live? Is there a way to save 3 seconds of incoming video into a buffer from jit.grab, or is there a better way to do it?
    • Jun 20 2012 | 10:07 pm
    • Jun 20 2012 | 11:14 pm
      SWEET. This is gonna look so cool when I'm done! I'll post the patch when I'm through.
    • Jul 03 2012 | 3:25 pm
      very interesting thread!
      I was just wondering: Can I use a still-image as a shape for gridshape? If I understand everything right, my goal is something simular as above. I would like to play a movie as texture and masking it, but in a way that I can move, scale and rotate the movie, without doing the same for the mask. Just as in the example you have posted. Only difference: I don't want to use the gl-shapes (circle etc..) but still images (tiffs with alphachanel). And I have to do this on three or four different movies+masks. Possible?
    • Jul 03 2012 | 10:48 pm
      mr. l, you can just have 2 or more videoplanes (with @blend_enable) in one render context... the mask in front
    • Jul 16 2012 | 5:00 pm
      So, still not quite working. Transform reset in the gridshape object fixes the aspect ratio, but makes the circle an oval. Also, I can't seem to get the delayed signal to propagate into the second gridshape, it just uses the original signal, which I haven't been able to wrap my head around.
    • Jul 16 2012 | 5:01 pm
      ps. I don't have a good loadbang/loadmess setup yet. You'll have to play with the videozoom and circle size a little.