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

    ExecutePixel color fidelity

    SDK Help
    0
    4
    382
    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.
    • H
      Helper
      last edited by

      On 23/01/2016 at 13:25, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R13-R17 
      Platform:    Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      I'm struggling to understand why I paint colors with ExecutePixel() on my VideoPost and they do not come out as expected. I understand this method should give me full control on the final pixels, but it doesn't.
      I made a simple test. On a new project, only my plugin added to the scene, no other posts. I paint everything with 50% white, using the code below...

      void MyVP::ExecutePixel(BaseVideoPost* node, PixelPost* pp, Int32 x, Int32 subx, Int32 suby)
      {
      Float32 *col = pp->col;
      col[0] = col[1] = col[2] = 0.5f;
      }

      The result is around 73% white, not 50%.
      Even stranger, it varies between 73% and 74%!
      What's altering the result???

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 23/01/2016 at 17:38, xxxxxxxx wrote:

        Another example, a linear gradient based on Y, besides a linear gradient made in photoshop.

        void Blendy360CamVP::ExecutePixel(BaseVideoPost* node, PixelPost* pp, Int32 x, Int32 subx, Int32 suby)
        {
        Int32 y = pp->line;
        Float32 *col = pp->col;
        col[0] = col[1] = col[2] = (Float)y / _res.y;
        }

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 24/01/2016 at 00:42, xxxxxxxx wrote:

          Have you tried unchecking Linear Workflow?

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 24/01/2016 at 06:02, xxxxxxxx wrote:

            That's a well kept secret! 🙂
            I didn't know about this, thanks.

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