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

    VP Pixel storage...

    SDK Help
    0
    6
    600
    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 09/08/2003 at 09:04, xxxxxxxx wrote:

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

      ---------
      I am trying to save all pixels in Execute Line to a basebitmap. But when I try to do so the resulting image does not look like the rendered image 😕 somehow the AA is not correct in my basebitmap. Obviously I am doing something wrong when storing the pixelvalues.
      This is the bit that does so in Execute Line:

          
          
          for (x=pp->left; x<=pp->right; x++)  
          {  
              for (i=0; i<mul; i++, col+=pp->comp)  
              {  
                  bm->SetPixel(x,pp->line,col[0]*255,col[1]*255,col[2]*255);  
              }  
          }
      

      Any help is appreciated
      Thank you
      Samir

      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 13/08/2003 at 13:14, xxxxxxxx wrote:

        Hmm, nobody? Well, the state is:
        In the case of antialiasing each pixel contains at minimum 4*3 float values because of 4 subpixels in RGB mode.
        And the question is: How to determine the final RGB pixel values from these 4 subpixels? Anybody any ideas?

        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 13/08/2003 at 14:06, xxxxxxxx wrote:

          ok seem to have it. Averaging the sum values of the subpixels does give the best results so far. But comparing the bitmap with the rendering, it´s still not the same.
          So I would like to know how to 100% getting the same result. :
          Thanks
          Samir

          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 13/08/2003 at 14:18, xxxxxxxx wrote:

            It might be the filtering C4D does? just a guess, have a look in the docs under RayFilter, never used it and know nothing about it 🙂 have you tried turning off the AA filter to see if it then matches?

            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 13/08/2003 at 14:34, xxxxxxxx wrote:

              Hi Dave,
              yes turning off AA filter will work and my bitmap is the same as the rendering. RayFilter...ok will have a look. thx 🙂
              But shouldn´t it work without the RayFilter anyway? I mean ExecuteLine does have several subpixels when antialiasing is used, so why is it there when it cannot be used for anitaliased pixels? Just curious for it then seems useless to provide subpixel information.. sometimes I can´t get smarter from the SDK 🙂
              Best
              Samir

              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 13/08/2003 at 14:39, xxxxxxxx wrote:

                Ok, got the RayFilter working but my bitmap is black now 🙂
                Here is the code:

                    
                    
                    RayFilter *filter =   
                      RayFilter::Alloc(render->xres, render->yres, 3, 0, render->xres-1,   
                                         render->aa_filter, render->aa_softness, render->dithering);  
                        
                        LONG line=pp->line, ll;  
                        LONG flt = (filter->GetYRadius() + 1)/2;    
                    
                    
                    
                    
                        Bool ff;  
                        
                          ll = line-flt;  
                          ff = !render->field || (ll&1) == (render->field==FIELD_EVEN);  
                        
                          if (line<=render->bottom)  
                          {  
                            Real *reconstructed_line=(Real* )GeAlloc(3*render->xres*(sizeof(Real)));  
                            filter->AddLine(reconstructed_line,line);  
                      GeFree(reconstructed_line);  
                          }  
                        
                          filter->EvaluateLine(ff && ll>=render->top,ll,render->right-render->left+1,renderimage,0);  
                        
                       RayFilter::Free(filter);
                

                Please help anybody who knows whats going on :
                Thanks

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