Adding GI post effect to RenderData

  • On 05/09/2013 at 03:48, xxxxxxxx wrote:

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

    I am a bit overwhelmed by how I might add a Global Illumination (GI) post effect to the RenderSettings (RenderData).  I see how to get it from posts here but adding one is a bit vague.  Do I just do this:

    BaseVideoPost*  pBVP = BaseVideoPost::Alloc(VPglobalillumination);  
    //... Allocation error check  

    Is that it?

  • On 05/09/2013 at 11:05, xxxxxxxx wrote:

    Away from my dev machine ATM but I think that's all I did when I added a GI VP in my sIBL Loader plugin.


  • On 05/09/2013 at 12:13, xxxxxxxx wrote:

    I've been adding post effects that same way too Robert.

    A similar type example from my notes.

    //This code enables the multi-pass option and adds the RGBA pass to it  
      RenderData *rd = doc->GetActiveRenderData();  
      rd->SetParameter(RDATA_MULTIPASS_ENABLE, 1, DESCFLAGS_SET_0); // Enable the multi pass option  
      MultipassObject *mpo = NULL;  
      mpo = (MultipassObject* )MultipassObject::Alloc(Zmultipass);  
      if (!mpo) return FALSE;  
      BaseContainer *data = mpo->GetDataInstance();  
      rd->InsertMultipass(mpo, NULL);  
      doc->AddUndo(UNDOTYPE_NEW, mpo);  
      GeData d;                                                      //Store the on/off state value in this variable  
      rd->GetParameter(RDATA_MULTIPASS_ENABLE, d, DESCFLAGS_GET_0);  //Get the multipass's on/off state  
      LONG mpState = d.GetLong();  


Log in to reply