Animating multiple jit.qt.movies and retaining native resolution

    Jul 19 2012 | 5:41 pm
    Hi All,
    I've discovered a lot through these forums in terms of how to place several jit.qt.movies within the same videoplane and jit.window, so thanks to the community for that invaluable help. The current patch that I'm trying to develop is pretty simple conceptually, but I'm having resolution and scaling issues with the media being read by the various objects. The idea is that twitter profile pictures will be dynamically read into a collection of objects from the internet and those images will then be rendered in the same videoplane/jit.window and have simple position and scaling animation done to them. I'm using the "@adapt 1" argument on the various objects, but when they are rendered in the videoplane, the images/movies are not retaining there native resolutions or aspect ratios. Any idea how to accomplish this?
    A brief explanation of the patch: this was frankensteined from a collection of different patches from the forum. The "p random" subpatchers are used to generate random floats which handle the position animations. I've found that using -1 to 1 for the x/y positioning and -0.5 to 0.5 for the z positioning works OK. If anyone has any recommendations on how to clean this up or perhaps make the whole process less cpu intensive, I'd love suggestions. This is my first brush with jitter.

    • Jul 20 2012 | 6:37 pm
      Personally, I would take another approach. Either you manipulate the texture coordinates of each small texture inside the (which seems a quite messy job), or, I think it is simple, you could render small shapes (let's say, planes) using several [] and then texturing them separately. There is also the option of manipulating lots of shapes using [], but then the problem is that you must use a single texture for all the shapes.
      Managing positions and scaling of is pretty straightforward, you assign them a texture with @tex name and if you turn blend enable and depth_enable on you can mix them according to depth.
      Your patch as it is now did not work for me (I think it has to do with the coordinate position), and when I tried to load more movies the fps drop dramatically.
      Hope this makes any sense
    • Jul 20 2012 | 7:28 pm
      a is not an equivalent of an jit.window, but in fact it is just a textured plane. so in your patch you do not load different movies in "one" videoplane object, but you load each movie in an extra videoplane. that the videoplanes are all have foo written means that they are all rendered into the same render context (called foo - and the jit.window displays this render context), but they are seperate planes. So no need for in this case as well. Adapt1 means that you have the native resolution of the video (and not a size reduced), but still you have to tell each videoplane what is the aspect ratio of the plane: this you can do with the scale attribute (similar to the position): One way to automatize: Get the dimensions of your movies with a getdim-query (to the object), then translate it to scale the videoplane... (By the way: the third position value of is the z-axis, so the plane comes closer or more distant, what is represented as bigger or smaller)
    • Jul 23 2012 | 5:26 pm
      Thank you both. I will look into using multiple as an alternative to the videoplanes. The patch can seem to not work in it's current form because of the positioning (as you surmised). When it's initially loaded, all 4 planes are stacked. You can manually move the x/y/z positioning as opposed to using the automated motion via the "metro 1000" object to see all planes. In order to see the randomized motion, you have to set the min and max values for the p random objects to -1, 1. If anyone can tell me how to retain a float value in the patch that would also be awesome.
      Great recommendation on scaling the the videoplanes as well. I tried using the scale feature, but had not gone the extra step of querying the jit.qt.movies for dimensions.
      If anyone else wants to add to these great comments, I'm all ears!