New in version R13.016.
Returns the overall number of objects.
Return type:  int 

Returns:  The total number of objects. 
Returns the number of skies.
Return type:  int 

Returns:  The number of skies. 
Returns the current CPU on which the shader is executed.
Return type:  int 

Returns:  The running CPU id. 
Returns the CPU count the renderer is utilizing.
Note
The value returned here can differ from the global GeGetCPUCount() as the renderer can utilize a different number of CPUs than are available.
Return type:  int 

Returns:  The number of CPUs. 
Notify CINEMA 4D that a (severe) outofmemory condition occured. CINEMA 4D will stop as soon as possible, but there is no guarantee when exactly. It is possible that your shader could still be called several times, so it has to be programmed to handle this and to be crashproof.
Skips the render process. (Useful for custom renderers.)
Transform screen to camera coordinates. During QTVR rendering same point is returned.
Parameters:  p (Vector) – The screen coordinate. 

Return type:  Vector 
Returns:  The camera coordinate. 
Transform camera to screen coordinates. During QTVR rendering same point is returned.
Parameters:  p (Vector) – The camera coordinate. 

Return type:  Vector 
Returns:  The screen coordinate. 
Set the status bar text during initialization of your shader or videopost effect. If an empty string is passed the status bar will be cleared.
Parameters:  str (str) – The status text to display. 

Set the progress bar during initialization of your shader or videopost effect.
Note
The value passed will only be displayed if it is bigger than the previous one. To reset the bar call StatusSetText (“”).
Set the render progress bar spinning. Use this to indicate that your plugin is still processing even if the progress bar isn’t increasing.
Parameters:  on (bool) – True to set the progress bar spinning, False to stop it. 

Returns the overall number of lights.
Return type:  int 

Returns:  The number of lights. 
Get the given lightsource.
Parameters:  index (int) – The index of the light source to return. 

Return type:  ptr 
Returns:  The light source. 
If you code custom illumination models (e.g. different specular function) you can do this for standard lightsources easily. For area lights you’ll usually want to fall back to the default illumination model though, as otherwise you’d have to rebuild the sample code of area lights!
Parameters: 



Return type:  
Returns: 
The diffuse and specular components. 
Compute a shadow.
Parameters: 



Return type:  
Returns: 
The returned shadow value. If there is no shadow, 0.0 will be returned. 1.0 is the maximum shadow value for each component. 
Calculates the light intensity for a given point p. This routine can calculate the illumination for any point in space and is widely used for transparent volumetric shaders (gases, clouds etc.).
Parameters: 



Return type:  
Returns: 
The returned color. Note The returned color components can exceed values of 1.0! 
This function is used for custom illumination models. You can calculate the intensity of incoming light for a given light and surface point.
Parameters: 



Return type:  
Returns: 
True if the light illuminates the objects surface point. 
New in version R13.029.
Returns the mixed color of all visible lights on a given ray span.
Parameters: 


Return type:  
Returns: 
The mixed color of the lights and a value indicating if some light sources have a dust effect (!= 0 in this case). 
Calculates the R/S parameters for a point.
If you want to calculate weighted data (e.g. based upon a color for each polygon point) you can do this the following way:
r, s = GetRS(hitid, p);
result = [color a] * (1.0rs) + [color d]*r + [color c]*s
Parameters: 


Return type: 
tuple(bool, float, float) 
Returns: 
New in version R13.029: If the polygon is a quadrangle then the first value holds True for the second part (acd) of the quadrangle or False for the first part (abc). If the polygon is a triangle then this is the same as the first part of a quadrangle (abc). The 2nd and 3rd values are the R and S parameters for point p. 
New in version R13.029.
Returns barycentric coordinates for a point on the surface of a polygon. CINEMA 4D uses enhanced interpolation routines for quadrangles, so you’ll get a higher quality using it instead of considering a quadrangle as two triangles. The routine works for any type of polygon, including triangles and noncoplanar quadrangles.
The function returns a tuple with the weight factors for the global polygon with ID hitid at p. Works similar to GetRS(), but has a higher quality.
Parameters: 


Return type: 
tuple(float, float, float, float) 
Returns: 
A tuple with the respective weight factors for points A, B, C and D. 
New in version R13.029.
Returns the phong normal for a point.
Parameters: 


Return type:  
Returns: 
The phong normal. 
Returns the current X/Y pixel position in render resolution. Render resolution is the screen resolution multiplied by ‘scale’.
Return type:  tuple(int, int, int) 

Returns: 
The X, Y pixel positions and render scale.
Note X/scale and Y/scale is the screen position. 
Sets the current X/Y pixel position in render resolution. Render resolution is the screen resolution multiplied by ‘scale’.
Note
X/scale and Y/scale is the screen position.
Note
Some Shaders use the screen pixel position. Plugins (like the Baker for instance) can change this position without having to render an image.
Parameters: 


Calculates the foreground or background color and alpha at (x,*y*).
Parameters: 


Return type: 
tuple(Vector, float) 
Returns: 
The background/foreground color and alpha. 
Calculate the light falloff function (light intensity for a distance).
Parameters: 



Return type: 
float 

Returns: 
The light falloff. 
Generate the view ray for a position.
This function does not set Ray.pp [0..2], Ray.vv [0..2], Ray.transport and Ray.ior.
Parameters: 


Returns the nth video post effect for this render process.
Return type:  BaseList2D 

Returns:  The video post, or None if the index is too large. 
Returns a video post effect for this render process by ID.
Parameters:  id (int) – The video post effect ID. 

Return type:  BaseList2D 
Returns:  The found video post, or None if it doesn’t exist. 
Initializes this VolumeData object with the data from the from object. Only the most essential parts are copied over, including the render instance.
Parameters:  from (VolumeData) – Source object. 

Copy this to another VolumeData.
Parameters:  dst (VolumeData) – The destination VolumeData. 
