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

    ExecuteLine Color?

    SDK Help
    0
    3
    252
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 30/10/2004 at 11:49, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.503 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi,

      I want to extract the correct colors of a rendered line. The color buffer in ExecuteLine though is NOT the same as the actually rendered line.

      I tried using the RayFilter on the line but the Filter doesn´t seem to work (or at least I cannot get it to work).

      So is there ANY way to retrieve the correct colors in ExecuteLine?

      Here is how I get the color:
      ------------------------------

      LONG mul   = pp->aa ? 4:1;  
      Real *col = pp->col+pp->left*mul*pp->comp;  
      [...]  
      for (x=pp->left; x<=pp->right; x++)  
      {  
           LONG r=0,g=0,b=0;  
           for (i=0; i<mul; i++, col+=pp->comp)  
           {  
           r+=col[0]*256;  
           g+=col[1]*256;  
           b+=col[2]*256;  
           }  
      }
      

      --------------------
      The color is then Vector(r/mul,g/mul,b/mul). But when I compare the line with the line of the rendered image, they differ.

      😞

      Anybody any idea how to solve that?
      Thx i.a.
      Katachi

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 03/11/2004 at 11:03, xxxxxxxx wrote:

        As far as I know there's no way to exactly replicate the output of the render from the ExecuteLine() data, since it's filtered within C4D afterwards.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 04/11/2004 at 13:29, xxxxxxxx wrote:

          Hmm, That´s a pity. How is one supposed to work with colors in ExecuteLine if they are not "correct"?!

          Well, let´s hope for a future release to return the final colors.

          Thanks anyway!
          Katachi

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