Utility Shaders - Arnold for Cinema4d
| Further Reading |
|---|
| See also Utility Shaders in the Arnold User Guide |
Below is a list of Utility shaders available in Arnold.
- blackbody
- bump2d
- bump3d
- cache
- camera_projection
- clamp
- clip_geo
- distance
- facing_ratio
- normal_map
- object
- osl
- passthrough
- round_corners
- space_transform
- switch
- trace_set
- utility
- uv_projection
- uv_transform
- vector_map
Bump and Normal Shaders
Workflow
Connect bump and normal shaders to the Normal input of the standard_surface shader.

Bump and normal maps usually are not color corrected and contain scalar and vector values as raw data. Therefore, when connecting an image shader to the Bump and Normal map input, C4DtoA automatically sets the color space to raw.

Distance shader
A scene file that demonstrates the distance shader can be found here.
distance.out_directionX -> float_to_rgb -> flat.color
Scene files that demonstrate distance.out_direction can be found here.
OSL
OSL Editor

The OSL Editor offers a user-friendly interface to edit OSL scripts. It lists all OSL shaders available in the scene and displays the code of the selected shader. The code is automatically compiled when the editor loses its focus. The result of the compilation is shown in the console window under the text editor. In case of errors, the error message and line number (where the error happened) are listed.
The Cinema 4D SDK does not allow custom syntax highlight, therefore the editor uses the built-in Python syntax highlight instead of a dedicated OSL highlighting.
Round Corners
Workflow
Connect the round_corners shaders to the normal input of the standard_surface shader.

Switch
Info: The following setup can be used in extreme situations if you need more than 20 inputs. This example demonstrates selecting inputs from two switch nodes (switch_01 and switch_02). You need a third switch node (main_switch) to control which of your switches are active. The integer input (user_data_int in this example) is connected to a divide and a modulo node, both of which have a divisor of 20 (the size of a switch node). The divide node is responsible for selecting the active switch, which is connected to the main switch. The modulo node is responsible for selecting the input of the active switch, so it is connected to all other switch nodes.

