Announcement

Collapse
No announcement yet.

MAXSCRIPT: odd VRay Framebuffer behaviour

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MAXSCRIPT: odd VRay Framebuffer behaviour

    The issue i am currently unable to get around is trying to get the vray FB not to destroy itself before i grab the channel i need.
    Put simpy:
    Have the vray framebuffer enabled in the render options first (i assume this is the way to do it. i may well be wrong ^^)

    Code:
    render()
    theBitmap = vrayVFBGetChannelBitmap 1
    the vrayFB spawns properly during the render phase, however, it disappears immediately as the render ends, and the second line tries to grab the contents of the vrayframebuffer which appears when "show last VFB" is clicked, or when one renders manually through pressing the render button or shortcuts.

    It isn't the end of the world, as i can well use the max FB for what i need, but i liked a lot more the way the vrayFB is clean with render elements, not cluttering the screen with single channel FB spawns...

    Ideas on how to get around it, or is this an unintended behaviour?

    Thanks in advance for any and allt he help

    p.s.: the vfbn for the renderer of course only controls the max one.
    Is there a class instance for the FB which can be invoked as a bitmap container (ie. render to:vrayVFB)?
    Lele
    Trouble Stirrer in RnD @ Chaos
    ----------------------
    emanuele.lecchi@chaos.com

    Disclaimer:
    The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

  • #2
    The render () command creates a new renderer and a new VFB. Instead, you should use the "render last" or "render" commands from the max commands system.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      ah!
      Thanks for that!
      Lele
      Trouble Stirrer in RnD @ Chaos
      ----------------------
      emanuele.lecchi@chaos.com

      Disclaimer:
      The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

      Comment


      • #4
        Vlado, i have a slightly different issue now.
        I'm trying to read data from a world point position render element (created through the samplerinfo one, rendered in the vray fb through the "max quick render" method you schooled me in) via maxScript, and the vrayVFBGetChannelBitmap function seems to return unsigned values, instead of the ones i can pick in the vrayFB, which seems rather odd, as if it looks like it's snapshotting the visible part of the colors only, and reassigning it values between 0 and 1.
        Am i missing the right way to go about it?
        Lele
        Trouble Stirrer in RnD @ Chaos
        ----------------------
        emanuele.lecchi@chaos.com

        Disclaimer:
        The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

        Comment


        • #5
          Ah, it sorted itself (like, reopen the code, and rerun it, two days later to get the right results.)
          Even though by now i figured out a method to use Z instead of pPos passes.
          More RTFM coming my way daily. i must be doing something wrong :P
          Lele
          Trouble Stirrer in RnD @ Chaos
          ----------------------
          emanuele.lecchi@chaos.com

          Disclaimer:
          The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

          Comment

          Working...
          X