Using Cinema 4D Shaders in Redshift
It is possible to use shaders from the C4D standard renderer in Redshift, which is a Good Thing because there are a lot of them available. The most useful of them all - Noise - is already a native Redshift node and so are a few others - Brick, Pavement, Ambient Occlusion, Fresnel, Tiles and so on - but most aren’t and no third-party shaders are available as a Redshift node.
In fact, it seems likely that it will never be possible for third-party developers to create native Redshift material nodes as that would require Maxon to expose proprietary code and tools to enable it. So if you have developed a shader which uses the standard C4D renderer, there must be some other way to make it work in Redshift.
Since I’ve been spending a lot of time writing shaders, and I also want to use Redshift for rendering, this is important to me. Fortunately, Redshift has a facility to use the standard shaders: this is the Redshift C4D Shader node. This allows you to plug a standard shader into the node then link that to a Texture node, which is then used like any other texture in Redshift. Unfortunately, there are some caveats in using this node:
- The node works by converting the standard shader’s output into a baked texture (essentially, a bitmap). This only works if the shader output can be rendered as a 2D map, so special 3D shaders such as the old 3D materials Cheen, Nukei etc. can’t be used at all. If you use a Noise shader in the C4D Shader, it works but only in UV (2D) space. If you select any other space in the Noise shader, it still renders as if you had selected the 2D option. (This is presumably why there is a native Redshift node duplicating the Maxon noise shader.)
- The C4D Shader node is only available as a node in the old-style shader graph (the one which uses the Xpresso node interface). If you create a Redshift Material or Standard Material from the material manager, you won’t be able to add a C4D Shader node, as opening the node editor will show the new (much better) interface - but without the C4D Shader node in its node list. To get this shader, you must create a C4D Shader material, whose node editor does open in the old-style interface. It would be nice if this could be fixed but perhaps there’s a reason why it can’t be.
- The resolution of the image generated by the C4D Shader node by default has a ridiculously low resolution, 128 x 128. Remember that this node outputs a bitmap so with a low resolution you may see blurring or loss of detail. You will usually need to increase the resolution to 1024 * 1024 or 2048 * 2048 for good results.
How to use the C4D Shader node
This is very simple. In the material manager, choose Create->Materials->C4D Shader. This creates a material with the required nodes in it, already linked up. It looks like this:
Note that the node editor is the old Xpresso interface, not the modern, much nicer, node editor. By default, it uses the Brick shader from the standard renderer. To change this, in theory you simply change the Brick shader for the one you want, but if you do, it doesn’t change the shader in the renderer - presumably because the baked texture is cached. You can solve this by deleting the C4D Shader node which had the Brick shader in it, then add another one and link it to the ‘Image Filename’ port of the Texture node. Or, probably easier, change something in the C4D Shader node parameters. For example, if you change the ‘Width’ parameter, this forces Redshift to rebuild the cache and the new shader is used (then you can change the width back to the required value).
When rendered, the shader looks blurry and lacking detail. This is due to the low default resolution set in the C4D Shader node (‘Width’ and ‘Height’ parameters). These two renders show the default 128 * 128 resolution on the left, and 2048 * 2048 on the right. You can see how much more detailed the texture is with the higher resolution:
Once you have changed to the required shader and set the resolution accordingly, you can render in Redshift using the standard shader. Here’s an example using the Mandelbrot shader, which is supplied with the Maxon SDK:
You can use this material as it stands and edit the parameters of the standard shader in the usual way. But there is a potential problem. Suppose that for some reason or other you want to use the standard shader in another Redshift material. You create the material, open the node editor, which will be the nice new-style editor, and find you can’t add a C4D Shader node because there isn’t one in the node list for this editor.
You can work round this by using a Reference node. First, create the C4D Shader material as outlined above. Then add a Reference node (it’s in the Utility group) to the editor and in the interface there’s a link field for a material. Drag the C4D Shader material you created into this link field and then link the ‘Output’ port of the Reference node to the desired input port of another node, such as a Standard material node. The node tree looks like this (using a Redshift Standard material):
Now, if you assign this material to the object to be rendered, you will see that it has no effect. You get whatever colour was in the Color input port before you added the link from the Reference node. If you are using the Redshift render view, you might see an obscure warning at the bottom of its window.
The reason this happens is that in the C4D Shader material the baked texture is linked to a Redshift material node and then to the Output node (see the second image above). If this is done the output is regarded as invalid if you add it to another Output node. All you have to do is in the C4D Shader material, delete the Redshift material node, then link the ‘outColor’ port of the Texture node directly into the Output node:
Then it works as expected. One final, rather irritating problem is that to edit the standard shader, you can’t do it from the new-style editor. You have to open the shader graph for the C4D Shader material and edit it there. You also find that changing any shader parameters won’t automatically update the Redshift render view; you must force an update manually.
It’s a pity that this procedure can’t be made easier, because there are a lot of good shaders for the standard renderer out there and for the time being at least, there’s no way to create a new shader node for Redshift. If you really want a Mandelbrot shader for example, either use this method, or - and I think this is the better option - obtain or write one using OSL (Open Shading Language) which will run in Redshift using the OSL node.
Page last updated January 31st 2025