Here you will find documentation on all the descriptions that Cinema 4D currently has. You can list them Alphabetically, by Type or Plugin . The sample Python and C++ code is automatically generated and in some cases may not be 100% correct. If something doesn't work then please refer to the official Cinema 4D SDK documentation for more information.

IDs and information for VPcaustics

VPcaustics

Attributes

  • ENGLISH NAME : Caustics
  • NAME : VPcaustics
  • INCLUDE : VPbase
  • PATH : advanced_render/description/vpcaustics.res
  • PLUGIN : advanced_render
  • MAXON online help (may not exist): VPCAUSTICS

Elements

ID UI Name Type Parameters Cycle
VPCAUSTICS_ENABLEDIFFUSE SurfaceCaustics BOOL ANIM
VPCAUSTICS_ENABLEVOLUME VolumeCaustics BOOL ANIM
VPCAUSTICS_STRENGTH Strength REAL
ANIM OFF
UNIT PERCENT
MIN 0.0
MAX 100000
VPCAUSTICS_STEPSIZE StepSize REAL
ANIM OFF
UNIT METER
MIN 0.001
STEP 0.01
VPCAUSTICS_SAMPLERADIUS SampleRadius REAL
ANIM OFF
UNIT METER
MIN 0.001
STEP 0.01
VPCAUSTICS_SAMPLES Samples LONG
ANIM OFF
MIN 1
MAX 10000
VPCAUSTICS_RECOMPUTE Recompute LONG ANIM
VPCAUSTICS_RECOMPUTE_FIRSTTIME FirstTime
VPCAUSTICS_RECOMPUTE_ALWAYS Always
VPCAUSTICS_RECOMPUTE_NEVER Never
VPCAUSTICS_SAVESOLUTION SaveSolution BOOL ANIM
VPCAUSTICS_CAMERASOLUTION SingleAnimationSolution BOOL ANIM

Example Code

The following code does not use the correct values when setting the data. You should check directly in C4D for the correct values that you should use in place of the ones that are shown. This code is just to show you how to access the values for getting and setting the parameters.

Python

import c4d
from c4d import gui
def main():
    videoPost = c4d.BaseVideoPost(c4d.VPcaustics)
    
    #You can set parameters two different ways. 
    #First way              
    videoPost[c4d.VPCAUSTICS_ENABLEDIFFUSE] = True
    videoPost[c4d.VPCAUSTICS_ENABLEVOLUME] = True
    videoPost[c4d.VPCAUSTICS_STRENGTH] = 0.1
    videoPost[c4d.VPCAUSTICS_STEPSIZE] = 0.1
    videoPost[c4d.VPCAUSTICS_SAMPLERADIUS] = 0.1
    videoPost[c4d.VPCAUSTICS_SAMPLES] = 1
    videoPost[c4d.VPCAUSTICS_RECOMPUTE] = c4d.VPCAUSTICS_RECOMPUTE_FIRSTTIME
    videoPost[c4d.VPCAUSTICS_SAVESOLUTION] = True
    videoPost[c4d.VPCAUSTICS_CAMERASOLUTION] = True
    
    #Second way, using the base container.
    bc = videoPost.GetDataInstance()
    bc.SetBool(c4d.VPCAUSTICS_ENABLEDIFFUSE,True)
    bc.SetBool(c4d.VPCAUSTICS_ENABLEVOLUME,True)
    bc.SetFloat(c4d.VPCAUSTICS_STRENGTH,0.1)
    bc.SetFloat(c4d.VPCAUSTICS_STEPSIZE,0.1)
    bc.SetFloat(c4d.VPCAUSTICS_SAMPLERADIUS,0.1)
    bc.SetInt32(c4d.VPCAUSTICS_SAMPLES,1)
    bc.SetInt32(c4d.VPCAUSTICS_RECOMPUTE,c4d.VPCAUSTICS_RECOMPUTE_FIRSTTIME)
    bc.SetBool(c4d.VPCAUSTICS_SAVESOLUTION,True)
    bc.SetBool(c4d.VPCAUSTICS_CAMERASOLUTION,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../advanced_render/description/vpcaustics.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseVideoPost *pVideoPost = BaseVideoPost::Alloc(VPcaustics);  
    
    //You can set parameters two different ways. 

    //First way              
    //Some objects do not store all their data in the container. You need to use GetParameter()/SetParameter() instead. 

    DESCFLAGS_SET flags = DESCFLAGS_SET_PARAM_SET;
    pVideoPost->SetParameter(DescID(VPCAUSTICS_ENABLEDIFFUSE),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPCAUSTICS_ENABLEVOLUME),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPCAUSTICS_STRENGTH),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VPCAUSTICS_STEPSIZE),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VPCAUSTICS_SAMPLERADIUS),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VPCAUSTICS_SAMPLES),GeData(1),flags);
    pVideoPost->SetParameter(DescID(VPCAUSTICS_RECOMPUTE),GeData(VPCAUSTICS_RECOMPUTE_FIRSTTIME),flags);
    pVideoPost->SetParameter(DescID(VPCAUSTICS_SAVESOLUTION),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPCAUSTICS_CAMERASOLUTION),GeData(true),flags);
    pVideoPost->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pVideoPost->GetDataInstance();
    bc->SetBool(VPCAUSTICS_ENABLEDIFFUSE,true);
    bc->SetBool(VPCAUSTICS_ENABLEVOLUME,true);
    bc->SetFloat(VPCAUSTICS_STRENGTH,0.1);
    bc->SetFloat(VPCAUSTICS_STEPSIZE,0.1);
    bc->SetFloat(VPCAUSTICS_SAMPLERADIUS,0.1);
    bc->SetInt32(VPCAUSTICS_SAMPLES,1);
    bc->SetInt32(VPCAUSTICS_RECOMPUTE,VPCAUSTICS_RECOMPUTE_FIRSTTIME);
    bc->SetBool(VPCAUSTICS_SAVESOLUTION,true);
    bc->SetBool(VPCAUSTICS_CAMERASOLUTION,true);
    pVideoPost->Message(MSG_UPDATE);                                                      
}