rendering multiple jit.gl.mesh @capture


    Apr 06 2008 | 1:16 am
    Hey list,
    Ive captured three different meshes using the capture atr. to a texture. Ive then drawn video planes using the textures and rendered them using AB's sketch @layer method but I am only getting one videoplane. Ive tried changing all of the videoplane' s color attributes to 0. 0. 0.
    Heres the patch.
    Thanx

    • Apr 06 2008 | 1:23 am
      cont. sorry obviously I want to see all the geometries/video planes.
    • Apr 06 2008 | 7:15 pm
      a few minor problems with that patch, but i think fundamentally you had the concept correct.
      first, all your pak scale's and pak positions were initialized with 0 instead of 0. (that's a decimal point not a period). that decimal makes a huge difference. secondly dim is not an attribute of jit.window, but you can set the dim with the second and third arguments to window. third draw_mode tri_grid is the proper mode for drawing the output of gl.gridshape (assuming you want it to look just like the gridshape, which may not be the case).
      as far as the overall concept, the blend_mode's on the gl.mesh's aren't really doing anything since each mesh is being drawn to a separate gl.texture and not composited with anything else in that texture. if you had drawn three mesh's to the same texture, then perhaps the blending would have come into play.
      what i did to fix your patch was to take the jit.gl.slab-op3sources patch from the slab examples patch, and use that to composite the three accum slabs, draw that to one videoplane, which gets drawn by the gl.sketch. now the patch works as it should.
      keep in mind, the final step (the capturing of the sketch to tex_scene) is unnecessary with the current structure of your patch. you will only need that if you plan to do some final scene processing to the overall scene, or set up the context sharing for a preview window.
      -rob
    • Apr 06 2008 | 7:23 pm
      should note however, the patch i posted doesn't care about z-depth of the three mesh objects. if you need that information then its much tricker.
    • Apr 08 2008 | 12:58 am
      Ive come to realization that it is important for me to keep the blend modes. Ive tried to capture to a single texture but only one geometry can be seen at a time.
      I basically want to be able to do scene processing after it has been rendered.
      how can I do this?
      thanx