VPBuffers



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

    On 31/07/2007 at 02:41, xxxxxxxx wrote:

    I am not sure but could you not get all the information from the Multipass structure found in the PixelPost structure?

    cheers,
    Matthias



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

    On 31/07/2007 at 07:35, xxxxxxxx wrote:

    Do you need the passes after or during rendering?

    cheers,
    Matthias



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

    On 31/07/2007 at 08:16, xxxxxxxx wrote:

    i need to find all the VPBuffer opened by multipass. So i can fire pixels from vray to them :)
    So i need them in Execute..

    Cheers
    Renato



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

    On 22/08/2007 at 19:11, xxxxxxxx wrote:

    Hi all,

    Here the scene that i've examined:

    i wrote this piece of code looking for the separate light pass:

      
    LONG *remapVpBuffers = (LONG* ) GeAlloc (sizeof(LONG)*33);  
              String *remapStrings = (String* ) GeAlloc (sizeof(String)*33);  
      
              remapVpBuffers[0]      = VPBUFFER_RGBA;  
              remapVpBuffers[1]      = VPBUFFER_AMBIENT;  
              remapVpBuffers[2]      = VPBUFFER_DIFFUSE;  
              remapVpBuffers[3]      = VPBUFFER_SPECULAR;  
              remapVpBuffers[4]      = VPBUFFER_SHADOW;  
              remapVpBuffers[5]      = VPBUFFER_REFLECTION;  
              remapVpBuffers[6]      = VPBUFFER_TRANSPARENCY;  
              remapVpBuffers[7]      = VPBUFFER_RADIOSITY;  
              remapVpBuffers[8]      = VPBUFFER_CAUSTICS;  
              remapVpBuffers[9]      = VPBUFFER_ATMOSPHERE;  
              remapVpBuffers[10]      = VPBUFFER_ATMOSPHERE_MUL;  
              remapVpBuffers[11]      = VPBUFFER_ALLPOSTEFFECTS;  
              remapVpBuffers[12]      = VPBUFFER_IMAGEBUILDING_PASS;  
              remapVpBuffers[13]      = VPBUFFER_DEPTH;  
              remapVpBuffers[14]      = VPBUFFER_MAT_COLOR;  
              remapVpBuffers[15]      = VPBUFFER_MAT_DIFFUSION;  
              remapVpBuffers[16]      = VPBUFFER_MAT_LUMINANCE;  
              remapVpBuffers[17]      = VPBUFFER_MAT_TRANSPARENCY;  
              remapVpBuffers[18]      = VPBUFFER_MAT_REFLECTION;  
              remapVpBuffers[19]      = VPBUFFER_MAT_ENVIRONMENT;  
              remapVpBuffers[20]      = VPBUFFER_MAT_SPECULAR;  
              remapVpBuffers[21]      = VPBUFFER_MAT_SPECULARCOLOR;  
              remapVpBuffers[22]      = VPBUFFER_ILLUMINATION;  
              remapVpBuffers[23]      = VPBUFFER_OBJECTBUFFER;  
              remapVpBuffers[24]      = VPBUFFER_POSTEFFECT;  
              remapVpBuffers[25]      = VPBUFFER_POSTEFFECT_MUL;  
              remapVpBuffers[26]      = VPBUFFER_AMBIENTOCCLUSION;  
              remapVpBuffers[27]      = VPBUFFER_MAT_NORMAL;  
              remapVpBuffers[28]      = VPBUFFER_MAT_UV;  
              remapVpBuffers[29]      = VPBUFFER_MOTIONVECTOR;  
              remapVpBuffers[30]      = VPBUFFER_BLEND;  
              remapVpBuffers[31]      = VPBUFFER_LIGHTBLEND;  
              remapVpBuffers[32]      = VPBUFFER_ALPHA;  
      
              remapStrings[0]      = "VPBUFFER_RGBA";  
              remapStrings[1]      = "VPBUFFER_AMBIENT";  
              remapStrings[2]      = "VPBUFFER_DIFFUSE";  
              remapStrings[3]      = "VPBUFFER_SPECULAR";  
              remapStrings[4]      = "VPBUFFER_SHADOW";  
              remapStrings[5]      = "VPBUFFER_REFLECTION";  
              remapStrings[6]      = "VPBUFFER_TRANSPARENCY";  
              remapStrings[7]      = "VPBUFFER_RADIOSITY";  
              remapStrings[8]      = "VPBUFFER_CAUSTICS";  
              remapStrings[9]      = "VPBUFFER_ATMOSPHERE";  
              remapStrings[10]      = "VPBUFFER_ATMOSPHERE_MUL";  
              remapStrings[11]      = "VPBUFFER_ALLPOSTEFFECTS";  
              remapStrings[12]      = "VPBUFFER_IMAGEBUILDING_PASS";  
              remapStrings[13]      = "VPBUFFER_DEPTH";  
              remapStrings[14]      = "VPBUFFER_MAT_COLOR";  
              remapStrings[15]      = "VPBUFFER_MAT_DIFFUSION";  
              remapStrings[16]      = "VPBUFFER_MAT_LUMINANCE";  
              remapStrings[17]      = "VPBUFFER_MAT_TRANSPARENCY";  
              remapStrings[18]      = "VPBUFFER_MAT_REFLECTION";  
              remapStrings[19]      = "VPBUFFER_MAT_ENVIRONMENT";  
              remapStrings[20]      = "VPBUFFER_MAT_SPECULAR";  
              remapStrings[21]      = "VPBUFFER_MAT_SPECULARCOLOR";  
              remapStrings[22]      = "VPBUFFER_ILLUMINATION";  
              remapStrings[23]      = "VPBUFFER_OBJECTBUFFER";  
              remapStrings[24]      = "VPBUFFER_POSTEFFECT";  
              remapStrings[25]      = "VPBUFFER_POSTEFFECT_MUL";  
              remapStrings[26]      = "VPBUFFER_AMBIENTOCCLUSION";  
              remapStrings[27]      = "VPBUFFER_MAT_NORMAL";  
              remapStrings[28]      = "VPBUFFER_MAT_UV";  
              remapStrings[29]      = "VPBUFFER_MOTIONVECTOR";  
              remapStrings[30]      = "VPBUFFER_BLEND";  
              remapStrings[31]      = "VPBUFFER_LIGHTBLEND";  
              remapStrings[32]      = "VPBUFFER_ALPHA";  
      
              GePrint ("************************************************");  
              VPBuffer *Buffer=NULL;  
              for (LONG lb=0; lb<33; lb++){  
                   for (LONG subId = 0; subId<50; subId++) {  
                        Buffer = render->GetBuffer(remapVpBuffers[lb],subId);  
                        if (Buffer) {  
                             GePrint("Buf: " + remapStrings[lb]+ "   SubId: " + LongToString(subId));  
                             if (lb == 0) break;  
                        }  
                   }  
              }  
      
    gefree etc.etc.etc..  
      
      
    

    Now..why all others lights layers are not in the list?

    Thanks all
    Renato



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

    On 24/08/2007 at 17:33, xxxxxxxx wrote:

    :(



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

    On 25/08/2007 at 11:34, xxxxxxxx wrote:

    Matthias won't be back until tomorrow so hold tight! :)



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

    On 25/08/2007 at 13:46, xxxxxxxx wrote:

    Thanks Robert :)

    Can't you help me on this?

    Cheers
    Renato



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

    On 25/08/2007 at 14:36, xxxxxxxx wrote:

    I don't know anything about VPBuffers.



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

    On 27/08/2007 at 03:17, xxxxxxxx wrote:

    Here's how to browse through a multipass bitmap. For lights there is an inner loop that retrieves the data.

    The main bitmap should be checked with bmp->IsMultipassBitmap() first and then casted into a (MultipassBitmap* )

      
         LONG j,i,id;  
         LONG cnt = b3d->GetLayerCount();  
      
         for (i=0; i<cnt; i++)  
         {  
              MultipassBitmap *sublayer,*layer = b3d->GetLayerNum(i);  
              if (!layer) continue;  
      
              LONG subcnt = layer->GetLayerCount();  
      
              for (j=0;j<subcnt || subcnt==-1;j++)  
              {  
                   if (subcnt>0)  
                        sublayer   = layer->GetLayerNum(j);  
                   else   
                        sublayer = layer;  
      
                   if (!sublayer) continue;  
      
                   id = sublayer->GetParameter(MPB_USERID).GetLong();  
              }  
         }  
    


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

    On 27/08/2007 at 10:47, xxxxxxxx wrote:

    Thanks Philip,

    but what do you mean about main bitmap?

    do i need to get it from Multipass::VPBitmap[0]?

    Cheers
    Renato



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

    On 28/08/2007 at 12:26, xxxxxxxx wrote:

    You can retrieve the main bitmap by calling

      
    MultipassBitmap *mpb = (MultipassBitmap* )renderinstance->GetBuffer(NOTOK,0);  
    


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

    On 29/08/2007 at 08:49, xxxxxxxx wrote:

    Hello Philip,

    where:
    LONG subcnt = layer->GetLayerCount();

    subcnt always is -1 so the internal cycle go in loop forewer.

    What's mean that GetLayerCount() return -1 ?

    cheers
    Renato



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

    On 29/08/2007 at 11:08, xxxxxxxx wrote:

    But Philip did this in his loop:

    for (j=0;j<subcnt || subcnt==-1;j++)
    

    Probably explicitly to avoid the infinite loop. No idea about what -1 represents here though.



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

    On 29/08/2007 at 11:35, xxxxxxxx wrote:

    Hello dear Robert,

    but when the subcnt == -1.. it loop

    :)
    renato



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

    On 29/08/2007 at 12:29, xxxxxxxx wrote:

    Are you sure of your types (LONG)? In actuality, all that is needed is:

    for (j = 0; j < subcnt; ++j)
    

    Since -1L is less than 0L, the loop should exit immediately. But if ULONG is used, -1L is of course 4 billion.

    All else failing, just check for -1 on subcnt and avoid the loop altogether:

    LONG subcnt = layer->GetLayerCount();  
    if (subcnt < 0)     continue;  
    for (j=0; j!=subcnt; ++j)  
    ...
    


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

    On 30/08/2007 at 01:54, xxxxxxxx wrote:

    My excuses... one line of source code was missing!

      
         LONG j,i,id;  
         LONG cnt = b3d->GetLayerCount();  
      
         for (i=0; i<cnt; i++)  
         {  
              MultipassBitmap *sublayer,*layer = b3d->GetLayerNum(i);  
              if (!layer) continue;  
      
              LONG subcnt = layer->GetLayerCount();  
      
              for (j=0;j<subcnt || subcnt==-1;j++)  
              {  
                   if (subcnt>0)  
                        sublayer   = layer->GetLayerNum(j);  
                   else  
                        sublayer = layer;  
      
                   if (!sublayer) continue;  
      
                   id = sublayer->GetParameter(MPB_USERID).GetLong();  
                   if (subcnt==-1) break;       
              }  
         }  
    


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

    On 30/08/2007 at 11:10, xxxxxxxx wrote:

    Hello Philip,

    ok now :) but the objectID are the only buffers not detected with this way :(

    any suggestions?

    Cheers
    Renato



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

    On 30/08/2007 at 14:25, xxxxxxxx wrote:

    To retrieve the alpha channels use:

      
    cnt = b3d->GetAlphaLayerCount();  
    for (i=0; i<cnt; i++)  
    {  
         B3dBitmap *layer = b3d->GetAlphaLayerNum(i);  
         if (!layer) continue;  
      
         id = sublayer->GetParameter(MPB_USERID).GetLong();  
         if (!id) continue;  
      
         ...  
    }  
    


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

    On 30/08/2007 at 14:26, xxxxxxxx wrote:

    Ah.. thanks.. i forgot that ObjectID are in fact alpha channels :)

    Thanks a lot
    Renato


Log in to reply