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

    Adding GI post effect to RenderData

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

      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  
      pRenderData->InsertVideoPostLast(pBVP);
      

      Is that it?

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

        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.

        Steve

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

          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();  
            data->SetLong(MULTIPASSOBJECT_TYPE, VPBUFFER_RGBA);  
            
            doc->StartUndo();  
            
            rd->InsertMultipass(mpo, NULL);  
            
            doc->AddUndo(UNDOTYPE_NEW, mpo);  
            doc->EndUndo();  
            
            rd->Message(MSG_UPDATE);  
            EventAdd();  
            
            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();  
            GePrint(LongToString(mpState));
          

          -ScottA

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