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 VPambientocclusion

VPambientocclusion

Attributes

  • ENGLISH NAME : AmbientOcclusion
  • NAME : VPambientocclusion
  • INCLUDE : VPbase
  • PATH : advanced_render/description/vpambientocclusion.res
  • PLUGIN : advanced_render
  • MAXON online help (may not exist): VPAMBIENTOCCLUSION

Elements

ID UI Name Type Parameters Cycle
VPAMBIENTOCCLUSION_APPLYTOSCENE ApplytoProject BOOL  
VPAMBIENTOCCLUSION_GRADIENT Color GRADIENT ICC_BASEDOCUMENT
VPAMBIENTOCCLUSION_MINLENGTH MinimumRayLength REAL
UNIT METER
MIN 0.0
STEP 0.1
VPAMBIENTOCCLUSION_MAXLENGTH MaximumRayLength REAL
UNIT METER
MIN 0.0
STEP 0.1
VPAMBIENTOCCLUSION_DISPERSION Dispersion REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
VPAMBIENTOCCLUSION_ACCURACY Accuracy REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
VPAMBIENTOCCLUSION_MINSAMPLES MinimumSamples LONG
MIN 1
MAX 10000
VPAMBIENTOCCLUSION_MAXSAMPLES MaximumSamples LONG
MIN 1
MAX 10000
VPAMBIENTOCCLUSION_CONTRAST Contrast REAL
UNIT PERCENT
MIN -100.0
MAX 100.0
VPAMBIENTOCCLUSION_ENVIRONMENT UseSkyEnvironment BOOL  
VPAMBIENTOCCLUSION_TRANSPARENCY EvaluateTransparency BOOL  
VPAMBIENTOCCLUSION_SELFTEST SelfShadowingOnly BOOL  
VPAMBIENTOCCLUSION_REVERSE InvertDirection BOOL  
VPAMBIENTOCCLUSION_CACHE_ENABLE EnableCache BOOL ANIM
VPAMBIENTOCCLUSION_CACHE_SAMPLES Samples LONG
ANIM OFF
MIN 16
MAX 16384
VPAMBIENTOCCLUSION_CACHE_QUALITY RecordDensity LONG
PARENTCOLLAPSE
ANIM OFF
VPAMBIENTOCCLUSION_CACHE_QUALITY_CUSTOM Custom
VPAMBIENTOCCLUSION_CACHE_QUALITY_PREVIEW Preview
VPAMBIENTOCCLUSION_CACHE_QUALITY_LOW Low
VPAMBIENTOCCLUSION_CACHE_QUALITY_MEDIUM Medium
VPAMBIENTOCCLUSION_CACHE_QUALITY_HIGH High
VPAMBIENTOCCLUSION_CACHE_RATE_MIN MinRate LONG
PARENTCOLLAPSE VPAMBIENTOCCLUSION_CACHE_QUALITY
ANIM OFF
MIN -8
MAX 4
VPAMBIENTOCCLUSION_CACHE_RATE_MAX MaxRate LONG
PARENTCOLLAPSE VPAMBIENTOCCLUSION_CACHE_QUALITY
ANIM OFF
MIN -8
MAX 4
VPAMBIENTOCCLUSION_CACHE_DENSITY Density REAL
PARENTCOLLAPSE VPAMBIENTOCCLUSION_CACHE_QUALITY
ANIM OFF
MIN 10.0
MAX 1000.0
UNIT PERCENT
VPAMBIENTOCCLUSION_CACHE_DETAILS MinimumSpacing REAL
PARENTCOLLAPSE VPAMBIENTOCCLUSION_CACHE_QUALITY
ANIM OFF
MIN 0.0
MAX 1000.0
UNIT PERCENT
VPAMBIENTOCCLUSION_CACHE_MAX_LIMIT MaximumSpacing REAL
PARENTCOLLAPSE VPAMBIENTOCCLUSION_CACHE_QUALITY
ANIM OFF
MIN 0.0
MAX 1000.0
UNIT PERCENT
VPAMBIENTOCCLUSION_CACHE_SMOOTHING Smoothing REAL
ANIM OFF
MIN 0.0
MAX 1000.0
UNIT PERCENT
VPAMBIENTOCCLUSION_CACHE_SCALE ScreenScale BOOL ANIM
VPAMBIENTOCCLUSION_CACHE_FILE_FLUSH FlushCache(s) BUTTON FIT_H
VPAMBIENTOCCLUSION_CACHE_FILE_LOCK SkipPrepass(IfPresent) BOOL ANIM
VPAMBIENTOCCLUSION_CACHE_FILE_AUTOLOAD AutoLoad BOOL ANIM
VPAMBIENTOCCLUSION_CACHE_FILE_AUTOSAVE AutoSave BOOL ANIM
VPAMBIENTOCCLUSION_CACHE_FILE_ANIMATION FullAnimationMode BOOL ANIM
VPAMBIENTOCCLUSION_CACHE_FILE_PATH_ENABLED CustomLocation BOOL ANIM
VPAMBIENTOCCLUSION_CACHE_FILE_PATH Location FILENAME
ANIM OFF
SAVE

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.VPambientocclusion)
    
    #You can set parameters two different ways. 
    #First way              
    videoPost[c4d.VPAMBIENTOCCLUSION_APPLYTOSCENE] = True
    videoPost[c4d.VPAMBIENTOCCLUSION_MINLENGTH] = 0.1
    videoPost[c4d.VPAMBIENTOCCLUSION_MAXLENGTH] = 0.1
    videoPost[c4d.VPAMBIENTOCCLUSION_DISPERSION] = 0.1
    videoPost[c4d.VPAMBIENTOCCLUSION_ACCURACY] = 0.1
    videoPost[c4d.VPAMBIENTOCCLUSION_MINSAMPLES] = 1
    videoPost[c4d.VPAMBIENTOCCLUSION_MAXSAMPLES] = 1
    videoPost[c4d.VPAMBIENTOCCLUSION_CONTRAST] = 0.1
    videoPost[c4d.VPAMBIENTOCCLUSION_ENVIRONMENT] = True
    videoPost[c4d.VPAMBIENTOCCLUSION_TRANSPARENCY] = True
    videoPost[c4d.VPAMBIENTOCCLUSION_SELFTEST] = True
    videoPost[c4d.VPAMBIENTOCCLUSION_REVERSE] = True
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_ENABLE] = True
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_SAMPLES] = 1
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_QUALITY] = c4d.VPAMBIENTOCCLUSION_CACHE_QUALITY_CUSTOM
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_RATE_MIN] = 1
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_RATE_MAX] = 1
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_DENSITY] = 0.1
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_DETAILS] = 0.1
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_MAX_LIMIT] = 0.1
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_SMOOTHING] = 0.1
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_SCALE] = True
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_FILE_LOCK] = True
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_FILE_AUTOLOAD] = True
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_FILE_AUTOSAVE] = True
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_FILE_ANIMATION] = True
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_FILE_PATH_ENABLED] = True
    videoPost[c4d.VPAMBIENTOCCLUSION_CACHE_FILE_PATH] = "c:\\SomeFile.txt"
    
    #Second way, using the base container.
    bc = videoPost.GetDataInstance()
    bc.SetBool(c4d.VPAMBIENTOCCLUSION_APPLYTOSCENE,True)
    bc.SetFloat(c4d.VPAMBIENTOCCLUSION_MINLENGTH,0.1)
    bc.SetFloat(c4d.VPAMBIENTOCCLUSION_MAXLENGTH,0.1)
    bc.SetFloat(c4d.VPAMBIENTOCCLUSION_DISPERSION,0.1)
    bc.SetFloat(c4d.VPAMBIENTOCCLUSION_ACCURACY,0.1)
    bc.SetInt32(c4d.VPAMBIENTOCCLUSION_MINSAMPLES,1)
    bc.SetInt32(c4d.VPAMBIENTOCCLUSION_MAXSAMPLES,1)
    bc.SetFloat(c4d.VPAMBIENTOCCLUSION_CONTRAST,0.1)
    bc.SetBool(c4d.VPAMBIENTOCCLUSION_ENVIRONMENT,True)
    bc.SetBool(c4d.VPAMBIENTOCCLUSION_TRANSPARENCY,True)
    bc.SetBool(c4d.VPAMBIENTOCCLUSION_SELFTEST,True)
    bc.SetBool(c4d.VPAMBIENTOCCLUSION_REVERSE,True)
    bc.SetBool(c4d.VPAMBIENTOCCLUSION_CACHE_ENABLE,True)
    bc.SetInt32(c4d.VPAMBIENTOCCLUSION_CACHE_SAMPLES,1)
    bc.SetInt32(c4d.VPAMBIENTOCCLUSION_CACHE_QUALITY,c4d.VPAMBIENTOCCLUSION_CACHE_QUALITY_CUSTOM)
    bc.SetInt32(c4d.VPAMBIENTOCCLUSION_CACHE_RATE_MIN,1)
    bc.SetInt32(c4d.VPAMBIENTOCCLUSION_CACHE_RATE_MAX,1)
    bc.SetFloat(c4d.VPAMBIENTOCCLUSION_CACHE_DENSITY,0.1)
    bc.SetFloat(c4d.VPAMBIENTOCCLUSION_CACHE_DETAILS,0.1)
    bc.SetFloat(c4d.VPAMBIENTOCCLUSION_CACHE_MAX_LIMIT,0.1)
    bc.SetFloat(c4d.VPAMBIENTOCCLUSION_CACHE_SMOOTHING,0.1)
    bc.SetBool(c4d.VPAMBIENTOCCLUSION_CACHE_SCALE,True)
    bc.SetBool(c4d.VPAMBIENTOCCLUSION_CACHE_FILE_LOCK,True)
    bc.SetBool(c4d.VPAMBIENTOCCLUSION_CACHE_FILE_AUTOLOAD,True)
    bc.SetBool(c4d.VPAMBIENTOCCLUSION_CACHE_FILE_AUTOSAVE,True)
    bc.SetBool(c4d.VPAMBIENTOCCLUSION_CACHE_FILE_ANIMATION,True)
    bc.SetBool(c4d.VPAMBIENTOCCLUSION_CACHE_FILE_PATH_ENABLED,True)
    bc.SetFileName(c4d.VPAMBIENTOCCLUSION_CACHE_FILE_PATH,"c:\\SomeFile.txt")

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../advanced_render/description/vpambientocclusion.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseVideoPost *pVideoPost = BaseVideoPost::Alloc(VPambientocclusion);  
    
    //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(VPAMBIENTOCCLUSION_APPLYTOSCENE),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_MINLENGTH),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_MAXLENGTH),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_DISPERSION),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_ACCURACY),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_MINSAMPLES),GeData(1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_MAXSAMPLES),GeData(1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CONTRAST),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_ENVIRONMENT),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_TRANSPARENCY),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_SELFTEST),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_REVERSE),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_ENABLE),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_SAMPLES),GeData(1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_QUALITY),GeData(VPAMBIENTOCCLUSION_CACHE_QUALITY_CUSTOM),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_RATE_MIN),GeData(1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_RATE_MAX),GeData(1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_DENSITY),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_DETAILS),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_MAX_LIMIT),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_SMOOTHING),GeData(0.1),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_SCALE),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_FILE_LOCK),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_FILE_AUTOLOAD),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_FILE_AUTOSAVE),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_FILE_ANIMATION),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_FILE_PATH_ENABLED),GeData(true),flags);
    pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_CACHE_FILE_PATH),GeData(Filename("c:\\SomeFile.txt"),flags);
    pVideoPost->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pVideoPost->GetDataInstance();
    bc->SetBool(VPAMBIENTOCCLUSION_APPLYTOSCENE,true);
    bc->SetFloat(VPAMBIENTOCCLUSION_MINLENGTH,0.1);
    bc->SetFloat(VPAMBIENTOCCLUSION_MAXLENGTH,0.1);
    bc->SetFloat(VPAMBIENTOCCLUSION_DISPERSION,0.1);
    bc->SetFloat(VPAMBIENTOCCLUSION_ACCURACY,0.1);
    bc->SetInt32(VPAMBIENTOCCLUSION_MINSAMPLES,1);
    bc->SetInt32(VPAMBIENTOCCLUSION_MAXSAMPLES,1);
    bc->SetFloat(VPAMBIENTOCCLUSION_CONTRAST,0.1);
    bc->SetBool(VPAMBIENTOCCLUSION_ENVIRONMENT,true);
    bc->SetBool(VPAMBIENTOCCLUSION_TRANSPARENCY,true);
    bc->SetBool(VPAMBIENTOCCLUSION_SELFTEST,true);
    bc->SetBool(VPAMBIENTOCCLUSION_REVERSE,true);
    bc->SetBool(VPAMBIENTOCCLUSION_CACHE_ENABLE,true);
    bc->SetInt32(VPAMBIENTOCCLUSION_CACHE_SAMPLES,1);
    bc->SetInt32(VPAMBIENTOCCLUSION_CACHE_QUALITY,VPAMBIENTOCCLUSION_CACHE_QUALITY_CUSTOM);
    bc->SetInt32(VPAMBIENTOCCLUSION_CACHE_RATE_MIN,1);
    bc->SetInt32(VPAMBIENTOCCLUSION_CACHE_RATE_MAX,1);
    bc->SetFloat(VPAMBIENTOCCLUSION_CACHE_DENSITY,0.1);
    bc->SetFloat(VPAMBIENTOCCLUSION_CACHE_DETAILS,0.1);
    bc->SetFloat(VPAMBIENTOCCLUSION_CACHE_MAX_LIMIT,0.1);
    bc->SetFloat(VPAMBIENTOCCLUSION_CACHE_SMOOTHING,0.1);
    bc->SetBool(VPAMBIENTOCCLUSION_CACHE_SCALE,true);
    bc->SetBool(VPAMBIENTOCCLUSION_CACHE_FILE_LOCK,true);
    bc->SetBool(VPAMBIENTOCCLUSION_CACHE_FILE_AUTOLOAD,true);
    bc->SetBool(VPAMBIENTOCCLUSION_CACHE_FILE_AUTOSAVE,true);
    bc->SetBool(VPAMBIENTOCCLUSION_CACHE_FILE_ANIMATION,true);
    bc->SetBool(VPAMBIENTOCCLUSION_CACHE_FILE_PATH_ENABLED,true);
    bc->SetFileName(VPAMBIENTOCCLUSION_CACHE_FILE_PATH,"c:\\SomeFile.txt");
    pVideoPost->Message(MSG_UPDATE);                                                      
}
             

Buttons

This node has buttons. Buttons can manually be executed by calling the following code

Python

c4d.CallButton(videoPost,c4d.VPAMBIENTOCCLUSION_CACHE_FILE_FLUSH)

C++

DescriptionCommand dc;
dc.id = DescID(VPAMBIENTOCCLUSION_CACHE_FILE_FLUSH);             
pVideoPost->Message(MSG_DESCRIPTION_COMMAND, &dc);

Gradients

This node has gradients. Gradients can manually be edited by calling the following code

Python


C++

           
#include "customgui_gradient.h"
VPAMBIENTOCCLUSION_GRADIENT
GeData data; pVideoPost->GetParameter(DescID(VPAMBIENTOCCLUSION_GRADIENT),data,DESCFLAGS_GET_PARAM_GET)); Gradient *pGradient = (Gradient*)data.GetCustomDataType(CUSTOMDATATYPE_GRADIENT); if(pGradient) { //must be set before any knot is set pGradient->SetData(GRADIENT_MODE, GeData(GRADIENTMODE_ALPHA)); GradientKnot k1, k2; k1.col = Vector(0.0, 0.0, 1.0); k1.pos = 0.0; k2.col = 1.0; k2.pos = 1.0; pGradient->InsertKnot(k1); pGradient->InsertKnot(k2); } pVideoPost->SetParameter(DescID(VPAMBIENTOCCLUSION_GRADIENT),data,DESCFLAGS_SET_PARAM_SET));