jit.gl.text2d On jit.gl.videoplane


    Jun 02 2006 | 11:01 am
    Im trying to overlay some text on a gl video plane, but what results is the text within small boxes.
    I think there must be a simple way to solve this, but suggestions from the past lists dont work or I might be missing something.
    using osx 10.4.6 and Max/Msp 4.5.7 Jitter 1.5.2
    Example Patch
    max v2;

    • Jun 02 2006 | 9:05 pm
      On Jun 2, 2006, at 4:01 AM, darcysays wrote:
      > Im trying to overlay some text on a gl video plane, but what
      > results is the text within small boxes.
      > I think there must be a simple way to solve this, but suggestions
      > from the past lists dont work or I might be missing something.
      Your problem is as follows: in automatic mode there is currently no
      way to enforce the sequence of object rendering. In your patch your
      text is rendered first, and then the videoplane. This obscures the
      text in the absence of depth testing (default off for jit.gl.text2d).
      If depth_enable is *on*, however, then the videoplane will not render
      anywhere the text is closer to the camera (for the entire
      quadrilateral which has been rendered for each glyph, as the depth
      buffer is written to based on the geometry, not the glyph's alpha
      channel).
      The correct way to do this in the current version of Jitter is to
      disable automatic mode and then explicitly render the text last,
      without depth testing. Example is below.
      In the next version of Jitter there are two new attributes which
      would be of use in these types of scenarios:
      - @layer : in automatic mode object rendering order is
      sorted from low to high based on layer number, default 0. (note:
      objects in the same layer are not guaranteed any specific rendering
      order)
      - @depth_clear : before rendering object, clear the depth
      buffer (useful for having 3D layers which need depth testing internal
      to rendering it's geometry--e.g. a sphere--but wish to override the
      depth buffer for all previously rendered objects)
      jit.gl.render drawclients message also has a new optional layer
      number argument for only drawing objects in a specifc layer.
      Coming soon to a theater near you (no please don't ask for dates).
      -Joshua
    • Jun 03 2006 | 3:15 am
      Thanks for that solution.
      However I am finding that this now causes some video break up/artifacts. It is noticable when there are moving objects within the footage. It happens on both jit.qt.movie and jit.qt.grab on that patch you sent.
      Unfortunaetly screen captures I have taken don't show the problem, but can you or anyone else reproduce it? Does the video in that patch play smoothly without artifacts?
      PowerBook G4/1.0GHz
      1GIG RAM
      ATI Mobility Radeon 9000 (AGP 4X) / 64 MB of DDR SDRAM
      OSX 10.4.6 and Max/Msp 4.5.7 Jitter 1.5.2
    • Jun 03 2006 | 9:54 pm
      I can't reproduce this problem on the development version I'm using
      at the moment. However, if you send jit.glvideoplane the message:
      "sendtexture mode static" does the problem disappear?
      Otherwise, could you be more specific about what artifacts you are
      seeing? Is it just from interlaced movies, or input devices?
      If you're unfamiliar with how to tell if it is simply from interlaced
      source, please read the following:
      FWIW, this page seems like a good resource for people interested in a
      variety of video issues. Just came across it for the first time
      today. Will add to our resource guide.
      -Joshua
    • Jun 04 2006 | 6:54 am
      another excellent explanation/solution for deinterlacing (and much more)
    • Jun 04 2006 | 11:05 am
      Yes that works! Thank you.
      Just incase your interested this was the distortion I was getting: http://darcy.co.nz/artifacts.mov
      Quite a bit different from the normal interlacing drama.
      Thanks again.