Surfaces

In Cinema 4D, materials consist of channels. Shaders can be assigned to these channels; shaders may consist of images, effects, or layers that contain additional shaders.

Each channel, and within them the shaders, are represented in GDL script by a compound parameter name. For example, if you wish to create a color shader in the color channel, and then assign a particular color to it, you can do the following:

dim color[3]
    color[1] = 0    ! red
    color[2] = 0    ! green
    color[3] = 1    ! blue

define material "c4d_mat" 2,    ! usual material parameters, matte (type = 2)
		1, 0, 0,        ! usual parameters, simply red					
    additional_data C4D_ChCol_State  = 1,       ! turn on the 	channel
                    C4D_ChCol_Texture = "1",    ! add a shader to the channel 
						!   - its params will end with _1
                    C4D_ShColor_Color_1 = color	! set shader parameter(s) 
                                                !   - now it is blue by the color array

Available channels

Each channel – except size and illumination – has a ‘State’ parameter, which represents the channel’s on/off status. The Color and Specular channels are turned on by default, the rest are off.

Name Description Type
ChAlp Alpha AlphaChannel
ChBum Bump BumpChannel
ChCol Color ColorChannel
ChDif Diffusion DiffusionChannel
ChDis Displacement DisplacementChannel
ChEnv Environment EnvironmentChannel
ChFog Fog FogChannel
ChGlo Glow GlowChannel
ChGra Grass GrassChannel
ChIll Illumination IlluminationChannel
ChLum Luminance LuminanceChannel
ChNor Normal NormalChannel
ChRef Reflection ReflectionChannel
ChSize Size SizeChannel
ChSpe Specular SpecularChannel
ChTra Transparency TransparencyChannel