How to control render sequences with

    Jun 07 2013 | 4:42 pm
    I have been banging my head at this problem now for a while, and didnt find a solution:
    I need to control the sequence in which the contexts are rendered.
    the provided example shows what I wanna do. ironically in this patch the sequence is correct (at least it makes sence in this kind of setup). you can see it in the max output window, first capture2, than capture1.
    but how can I change that order? I tried "layer", I tried "automatic 0" with bangs (not shown here in this patch) but none seems to work.

    • Jun 08 2013 | 12:52 pm
      @layer on gl.node and is the right approach.
      If you provide a patch that doesn't work, I can better provide feedback.
    • Jun 08 2013 | 1:12 pm
      Fair enough. Thanks for taking your time looking into this:
      On first sight, this patch seems to work just fine, but the sequence of rendering is wrong: inside the max window you will see that after the "erase" command, it renders first the texture of the camera of subctx2, and then the texture of of the camera of subctx1.
      this means that the picture of the ball inside the videoplane of subctx2 is always one frame behind. but I need to have subctx1 rendered first, and then subctx2 rendered...
    • Jun 08 2013 | 1:15 pm
      UPs, I just added layer 0 and layer 1 and now it works...
      sorry, I must have made a mistake in my original patch since I though I excessively explored this path..
    • Jun 08 2013 | 1:31 pm
      No mistakes in my original patch (it is far to elaborate to publish it here). I am actually using 5 objects and @layer does not the trick, even adding it to the attached cameras as well.
      But I found a way to circumvent: sending the message "drawto noWhere, drawto mycontext" to the node objects I can control the sequence of rendering:
      Send it first to the node that needs to render first, then to the one second, than to the one third etc...
    • Jun 08 2013 | 5:03 pm
      If you have a patch that doesn't work, I recommend you post it here so we can troubleshoot it. Or to submit it to Max Support so they can see if there is a bug.