VP Pixel storage...



  • 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



  • 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?



  • 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



  • 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?



  • 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



  • 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


Log in to reply