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 XSLANoise

XSLANoise

Attributes

  • ENGLISH NAME : NoiseShader
  • NAME : XSLANoise
  • INCLUDE : Mpreview
  • INCLUDE : Xbase
  • PATH : sla/description/xslanoise.res
  • PLUGIN : sla
  • MAXON online help (may not exist): XSLANOISE

Elements

ID UI Name Type Parameters Cycle
SLA_NOISE_COLOR1 Color1 COLOR  
SLA_NOISE_COLOR2 Color2 COLOR  
SLA_NOISE_SEED Seed LONG  
SLA_NOISE_NOISE Noise LONG
CUSTOMGUI NOISE
NOISE_OFFSET 2000
SLA_NOISE_OCTAVES Octaves REAL
MIN 0
STEP .1
MAX 20
SLA_NOISE_SPACE Space LONG  
SLA_NOISE_SPACE_UV UV(2D)
SLA_NOISE_SPACE_TEXTURE Texture
SLA_NOISE_SPACE_OBJECT Object
SLA_NOISE_SPACE_WORLD World
SLA_NOISE_SPACE_CAMERA Camera
SLA_NOISE_SPACE_SCREEN Screen
SLA_NOISE_SPACE_RASTER Raster
SLA_NOISE_GLOBAL_SCALE GlobalScale REAL
UNIT PERCENT
MIN 0
SLA_NOISE_SCALE RelativeScale VECTOR
UNIT PERCENT
MIN 0
SLA_NOISE_ANI_SPEED AnimationSpeed REAL
MIN 0
STEP .1
SLA_NOISE_TIMEPERIOD LoopPeriod REAL MIN
SLA_NOISE_DETAIL_ATT DetailAttenuation REAL
UNIT PERCENT
MIN 0
SLA_NOISE_DELTA Delta REAL UNIT
SLA_NOISE_MOVEMENT Movement VECTOR UNIT
SLA_NOISE_SPEED Speed REAL UNIT
SLA_NOISE_ABSOLUTE Absolute BOOL  
SLA_NOISE_CYCLES Cycles REAL
MIN 0
STEP .1
SLA_NOISE_LOW_CLIP LowClip REAL
UNIT PERCENT
MIN 0
MAX 100
MINSLIDER 0
MAXSLIDER 100
CUSTOMGUI REALSLIDER
SLA_NOISE_HIGH_CLIP HighClip REAL
UNIT PERCENT
MIN 0
MAX 100
MINSLIDER 0
MAXSLIDER 100
CUSTOMGUI REALSLIDER
SLA_NOISE_BRIGHTNESS Brightness REAL
UNIT PERCENT
MIN -100
MAX 100
MINSLIDER -100
MAXSLIDER 100
CUSTOMGUI REALSLIDER
SLA_NOISE_CONTRAST Contrast REAL
UNIT PERCENT
MIN -100
MAX 100
MINSLIDER -100
MAXSLIDER 100
CUSTOMGUI REALSLIDER
SLA_NOISE_USE_AS_ENV UseasEnvironment BOOL  
SLA_NOISE_PROJECT_ENV ProjectEnvironment BOOL  
SLA_NOISE_COMPATIBILITY Compatibility BOOL  

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():
    shader = c4d.BaseShader(c4d.Xnoise)
    
    #You can set parameters two different ways. 
    #First way              
    shader[c4d.SLA_NOISE_SEED] = 1
    shader[c4d.SLA_NOISE_NOISE] = 1
    shader[c4d.SLA_NOISE_OCTAVES] = 0.1
    shader[c4d.SLA_NOISE_SPACE] = c4d.SLA_NOISE_SPACE_UV
    shader[c4d.SLA_NOISE_GLOBAL_SCALE] = 0.1
    shader[c4d.SLA_NOISE_SCALE] = c4d.Vector(1.0,1.0,1.0)
    shader[c4d.SLA_NOISE_ANI_SPEED] = 0.1
    shader[c4d.SLA_NOISE_TIMEPERIOD] = 0.1
    shader[c4d.SLA_NOISE_DETAIL_ATT] = 0.1
    shader[c4d.SLA_NOISE_DELTA] = 0.1
    shader[c4d.SLA_NOISE_MOVEMENT] = c4d.Vector(1.0,1.0,1.0)
    shader[c4d.SLA_NOISE_SPEED] = 0.1
    shader[c4d.SLA_NOISE_ABSOLUTE] = True
    shader[c4d.SLA_NOISE_CYCLES] = 0.1
    shader[c4d.SLA_NOISE_LOW_CLIP] = 0.1
    shader[c4d.SLA_NOISE_HIGH_CLIP] = 0.1
    shader[c4d.SLA_NOISE_BRIGHTNESS] = 0.1
    shader[c4d.SLA_NOISE_CONTRAST] = 0.1
    shader[c4d.SLA_NOISE_USE_AS_ENV] = True
    shader[c4d.SLA_NOISE_PROJECT_ENV] = True
    shader[c4d.SLA_NOISE_COMPATIBILITY] = True
    
    #Second way, using the base container.
    bc = shader.GetDataInstance()
    bc.SetInt32(c4d.SLA_NOISE_SEED,1)
    bc.SetInt32(c4d.SLA_NOISE_NOISE,1)
    bc.SetFloat(c4d.SLA_NOISE_OCTAVES,0.1)
    bc.SetInt32(c4d.SLA_NOISE_SPACE,c4d.SLA_NOISE_SPACE_UV)
    bc.SetFloat(c4d.SLA_NOISE_GLOBAL_SCALE,0.1)
    bc.SetVector(c4d.SLA_NOISE_SCALE, c4d.Vector(1.0,1.0,1.0)
    bc.SetFloat(c4d.SLA_NOISE_ANI_SPEED,0.1)
    bc.SetFloat(c4d.SLA_NOISE_TIMEPERIOD,0.1)
    bc.SetFloat(c4d.SLA_NOISE_DETAIL_ATT,0.1)
    bc.SetFloat(c4d.SLA_NOISE_DELTA,0.1)
    bc.SetVector(c4d.SLA_NOISE_MOVEMENT, c4d.Vector(1.0,1.0,1.0)
    bc.SetFloat(c4d.SLA_NOISE_SPEED,0.1)
    bc.SetBool(c4d.SLA_NOISE_ABSOLUTE,True)
    bc.SetFloat(c4d.SLA_NOISE_CYCLES,0.1)
    bc.SetFloat(c4d.SLA_NOISE_LOW_CLIP,0.1)
    bc.SetFloat(c4d.SLA_NOISE_HIGH_CLIP,0.1)
    bc.SetFloat(c4d.SLA_NOISE_BRIGHTNESS,0.1)
    bc.SetFloat(c4d.SLA_NOISE_CONTRAST,0.1)
    bc.SetBool(c4d.SLA_NOISE_USE_AS_ENV,True)
    bc.SetBool(c4d.SLA_NOISE_PROJECT_ENV,True)
    bc.SetBool(c4d.SLA_NOISE_COMPATIBILITY,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../sla/description/xslanoise.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseShader *pShader = BaseShader::Alloc(Xnoise);  
    
    //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;
    pShader->SetParameter(DescID(SLA_NOISE_SEED),GeData(1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_NOISE),GeData(1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_OCTAVES),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_SPACE),GeData(SLA_NOISE_SPACE_UV),flags);
    pShader->SetParameter(DescID(SLA_NOISE_GLOBAL_SCALE),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_SCALE),GeData(Vector(1.0,1.0,1.0)),flags);
    pShader->SetParameter(DescID(SLA_NOISE_ANI_SPEED),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_TIMEPERIOD),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_DETAIL_ATT),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_DELTA),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_MOVEMENT),GeData(Vector(1.0,1.0,1.0)),flags);
    pShader->SetParameter(DescID(SLA_NOISE_SPEED),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_ABSOLUTE),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_NOISE_CYCLES),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_LOW_CLIP),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_HIGH_CLIP),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_BRIGHTNESS),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_CONTRAST),GeData(0.1),flags);
    pShader->SetParameter(DescID(SLA_NOISE_USE_AS_ENV),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_NOISE_PROJECT_ENV),GeData(true),flags);
    pShader->SetParameter(DescID(SLA_NOISE_COMPATIBILITY),GeData(true),flags);
    pShader->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pShader->GetDataInstance();
    bc->SetInt32(SLA_NOISE_SEED,1);
    bc->SetInt32(SLA_NOISE_NOISE,1);
    bc->SetFloat(SLA_NOISE_OCTAVES,0.1);
    bc->SetInt32(SLA_NOISE_SPACE,SLA_NOISE_SPACE_UV);
    bc->SetFloat(SLA_NOISE_GLOBAL_SCALE,0.1);
    bc->SetVector(SLA_NOISE_SCALE, c4d.Vector(1.0,1.0,1.0);
    bc->SetFloat(SLA_NOISE_ANI_SPEED,0.1);
    bc->SetFloat(SLA_NOISE_TIMEPERIOD,0.1);
    bc->SetFloat(SLA_NOISE_DETAIL_ATT,0.1);
    bc->SetFloat(SLA_NOISE_DELTA,0.1);
    bc->SetVector(SLA_NOISE_MOVEMENT, c4d.Vector(1.0,1.0,1.0);
    bc->SetFloat(SLA_NOISE_SPEED,0.1);
    bc->SetBool(SLA_NOISE_ABSOLUTE,true);
    bc->SetFloat(SLA_NOISE_CYCLES,0.1);
    bc->SetFloat(SLA_NOISE_LOW_CLIP,0.1);
    bc->SetFloat(SLA_NOISE_HIGH_CLIP,0.1);
    bc->SetFloat(SLA_NOISE_BRIGHTNESS,0.1);
    bc->SetFloat(SLA_NOISE_CONTRAST,0.1);
    bc->SetBool(SLA_NOISE_USE_AS_ENV,true);
    bc->SetBool(SLA_NOISE_PROJECT_ENV,true);
    bc->SetBool(SLA_NOISE_COMPATIBILITY,true);
    pShader->Message(MSG_UPDATE);                                                      
}