LightShade

This is a channel shader which is intended to be placed in a channel of a material. It can be placed in any channel but the effects vary depending on the selected mode.

In 'Alpha' mode, the shader returns a brightness value between 0 and 1 depending on the illumination of the surface by a specified light or lights. If a surface point is not illuminated by the light, the shader returns 0; if it is brightly lit by the light, it returns 1. Intermediate values can also be returned depending on the brightness of the surface illumination.

In 'Color' mode, the brightness returned is then used to select a color from a gradient using the value as an index into the gradient.

Possible uses

You can use this shader to:

  • color a surface depending on the degree of illumination of the surface
  • add transparency to a surface depending on the illumination
  • mix two textures on an object using the shader in the alpha channel of a material with the blend between the two controlled by the surface illumination

In addition, the returned value can be combined with another shader for some interesting effects.

Compatibility

LightShade is compatible with the following versions of Cinema 4D:

Cinema 4D version Compatible?
R14-R19 No
R20, R21 No
S22 No
R23, S24 Yes
R25, S26 Yes
R2023 Yes
R2024 Yes

Note - there are separate downloads for R23/S24, R25/S26, R2023 and R2024- make sure you download the correct file!

User Interface

The plugin has a number of settings, full details of which are found in the plugin documentation.

Examples

Transparency

In this image, there is a sphere with a red material inside a cube with a green material. The green material has a transparency channel with a LightShade shader in it, so that the sphere is revealed where the spotlight shines. (There is no hole in the geometry, this is entirely due to transparency.)

Alpha

Using this shader in the alpha channel allows the mixing of textures on an object according to the illumination. In this scene, the cube has two materials applied, one red and one green. The green material texture tag comes after the red one in the object manager, so normally you would only see green. Using this shader in the alpha channel of the green material and a spotlight to illuminate the surface means that where the light shines, the alpha value of the green material is 1 (completely opaque) but when this is inverted by checking the 'Invert' switch, the red material shows through where the light shines.

Color

In this image, both the material and the light are white but the LightShade shader is in the color channel of the material. Color mode is used with the default gradient, so where the light illuminates the surface the returned color is blue (which is at the right-hand end of the gradient) and where it does not, the color is red. For degrees of brightness between 0 and 1, a color from the middle of the gradient is used.

Shaders

You can use the 'Shader' link field to combine the light brightness value with a shader. Any shader (except the Layer shader) can be used including bitmaps. For example, this animation shows LightShade in Color mode using an X-Particles Sample shader in the link field.

Download

Download LightShade for R23/S24

Download LightShade for R25/S26

Download LightShade for R2023

Download LightShade for R2024

Page last updated October 6th 2023