Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    VideoPost final render buffer

    Cinema 4D SDK
    c++ r23
    3
    6
    911
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rsodreR
      rsodre
      last edited by

      Hello,

      Running this inside VideoPostData::Execute(BaseVideoPost *node, VideoPostStruct *vps) used to return the final rendered image. With R23, it does only on preview renders. On Picture View renders the buffer is clearly not finished.

      if (vps->vp==VIDEOPOSTCALL::FRAME && ! vps->open)
      {
      	// TODO: R23 is delivering not the final image
      	VPBuffer * buf = vps->render->GetBuffer(VPBUFFER_RGBA,0);
      }
      

      Only if I disable MultiPass in the Render Settings, it returns the final image.
      Is there any other VPBUFFER I could try?
      Maybe my VideoPost need to be run later, after all the other effects, but I can't find how to set a VP priority.

      1 Reply Last reply Reply Quote 0
      • r_giganteR
        r_gigante
        last edited by r_gigante

        Hi @rsodre, thanks for reaching out to us.

        With regard to your request, I suggest to properly set the proper priority level in RegisterVideoPostPlugin by looking at how it's used in our documentation:

        Param Description
        [in] priority The priority of the video post plugin. Higher priority values are called before lower values. The priorities of the internal video post processing are: VPPRIORITY. For example, to filter between glow and depth of field then priority has to be set between VPPRIORITY_OBJECTGLOW and VPPRIORITY_DEPTHOFFIELD.

        The MBL introduction in R23 might have introduced an unexpected behaviour due to the execution priority you're currently using.

        Note from our DevTeam:
        Could you somehow confirm that the issue:

        • does not occur when MBL video post is enabled but the raw multipass is not enabled or not created?
          OR
        • also happens with MBL video post enabled and no MBL raw multipass?

        Cheers, R

        rsodreR 1 Reply Last reply Reply Quote 0
        • rsodreR
          rsodre @r_gigante
          last edited by rsodre

          @r_gigante Even setting the priority below VPPRIORITY_MAGICBULLETLOOKS and VPPRIORITY_WATERMARK the problem persists. It's lways a little darker.

          No MBL, no Multi-Pass: OK
          MBL, no Multi-Pass: OK
          No MBL with Multi-Pass: NOK
          MBL with Multi-Pass: NOK (example below)

          The project is here, if you want to try. The VP source is here.
          I'm grabbing the frame to send to other applications via Syphon (mac only).
          You can check the resulting frame with the sample Syphon Client app.

          Screen Shot 2020-09-29 at 00.09.28.png

          1 Reply Last reply Reply Quote 0
          • M
            m_adam
            last edited by m_adam

            Hi @rsodre, I' afraid I'm not able to reproduce in Cinema 4D with the next code

            // Executed after each frame
            if (vps->vp == VIDEOPOSTCALL::FRAME && !vps->open)
            {
                VPBuffer* buf = vps->render->GetBuffer(VPBUFFER_RGBA, 0);
                ShowBitmap((MultipassBitmap*)buf);
            }
            

            Each time I have the expected result similar to the output.
            Looking at your issue it seems more a colorspace issue than an "unfinished" buffer. so maybe there is some translation coming from Syphon?

            Cheers,
            Maxime.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

            rsodreR 1 Reply Last reply Reply Quote 0
            • rsodreR
              rsodre @m_adam
              last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • r_giganteR
                r_gigante
                last edited by

                @rsodre please refrain from discussing NDA-protected topics.

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post