Corona Ray Switcher material and Ray Switch shader - C4D

Corona Ray Switcher material and Ray Switch shader - C4D

 

In addition to the below content, also see:

 

Corona Ray Switcher Material


 

The Corona Ray Switcher material lets you assign different material types for different ray types (GI, reflection, refraction, direct visibility). For example, you can use it to create materials that do not affect the GI, or materials to reduce or increase the color bleeding, or to look different through reflection or refraction.


Material Examples


Example A

 
Reflective object. No Corona Ray Switcher material was used. Visible reflective caustics:

00_RaySwitchMaterial_Example_A_SimpleMaterial.png


We used a "Non-reflective" material (pure black, no reflection) for the GI rays. The result: No visible reflective caustics.

01_RaySwitchMaterial_Example_A_RaySwitchMaterial.png
 
Material setup:
02_RaySwitchMaterial_Example_A_MtlSetup.png

 
 

Example B

For this example, we first used coloured plastic material, semi-glossy:

03_RaySwitchMaterial_Example_B_SimpleMaterial.png
 
For the modified version, it was only applied to the base of the sculpture, and we used the same coloured plastic material for direct visibility, reflection, and refraction rays. And for the GI rays, we used another material with the Self-illumination channel enabled:
 
04_RaySwitchMaterial_Example_B_RaySwitchMaterial.png
 

Material Setup:
05_RaySwitchMaterial_Example_B_MtlSetup.png

 


Example C

For this example, we applied to the sculpture a rusted metal material for direct visibility and GI, orange plastic material for reflection, and a magenta matte material for refraction. And for the base, we used a Gold material for direct visibility, a material with the self-illumination channel enabled for the GI and reflection, and lastly, a magenta matte material for refraction:

06_RaySwitchMaterial_Example_C_RaySwitchMaterial.png
 
Material setup (sculpture):
07_RaySwitchMaterial_Example_C_MtlSetup_01.png

Material setup (base):
08_RaySwitchMaterial_Example_C_MtlSetup_02.png

 

 

 

 

Corona RaySwitch Shader


 

The Corona Ray Switch shader is analogous to the Corona Ray Switcher material. It lets you assign different shaders or solid colors for different ray types (GI, reflection, refraction, direct visibility).

 

Shader Examples


Example A

(Objects)
For this example, a Corona Physical material has been applied to the statue. The following shaders are in use inside the Corona Ray Switch Shader: a Magenta solid color was used for the Global Illumination, a Checkerboard shader was used for Reflections, an Orange solid color was used for Refractions, and a Light grey solid color was used for the Direct visibility:
 
Simple material without the Corona Ray Switch Shader:
00_RaySwitchShader_Example_A_SimpleMtl.png
 
Material using the Corona Ray Switch Shader:
01_RaySwitchShader_Example_A.png
 
Material Setup:
02_RaySwitchShader_Example_A_Mtl_Setup.png

 

Example B

(Interior scene)
In this case, the walls and ceiling are monochromatic and slightly reflective; the floor is highly reflective and saturated. We want to get rid of excessive color bleeding and noisy reflective caustics on the walls:

03_RaySwitchShader_Example_B.png
 
04_RaySwitchShader_Example_B_Floor_MtlSetup.png 05_RaySwitchShader_Example_B_Wall_MtlSetup.png
Floor material setup Wall and ceiling material setup
 
We will use a Corona Ray Switch Shader to reduce the color bleed for the floor material's Baselayer texture. Then, we will use a darkened color for the Global Illumination input slot of the Corona Ray Switch and the previous floor color for the rest of the input slots.

Result:
06_RaySwitchShader_Example_B_Dimmed_GI.png
 
Material setup:
07_RaySwitchShader_Example_B_Floor_MtlSetup_Dimmed_GI.png



Now let's do the same for the Reflect override input slot from the Corona Ray Switch Shader to dim the floor's colorful reflections in the walls:

Result:
08_RaySwitchShader_Example_B_Dimmed_Reflection.png
 
Material setup:
09_RaySwitchShader_Example_B_Floor_MtlSetup_Dimmed_Reflect.png

Additionally, we can repeat the process for the material applied to the walls.



Before and After comparison:

 
The end result, after the same amount of passes, is less noisy and renders slightly faster while preserving the direct visual appearance of materials. It is not physically correct, though.
 
10_RaySwitchShader_Example_B_Comparison_A_Original.png
Original image.
11_RaySwitchShader_Example_B_Comparison_A_Modified.png
The applied materials are using the Corona Ray Switch Shader.

 

 

See also:

 

 

Was this article helpful?
0 out of 0 found this helpful