[C4DtoA] How can I make my background object visible in refractions?


You can’t. The background object isn’t visible in refractions. Or reflections, or anything but camera rays.

Here’s an example: a refractive sphere in front of a torus, in front of the background checkerboard object. The black areas are where the background object isn’t visible to refraction rays.

c4d_background_object_refraction

The “background object” is actually a shader plugged into the Arnold background slot.

You won’t see it in Cinema 4D, but when C4DtoA translates the scene to Arnold, the background object is translated as a shader plugged into the options.background parameter (in Cinema 4D, this is the Environment > Background parameter in the Render Settings).

In an ASS file, it looks like this:

options
{
background "c4d|Background"
}

image_plane
{
 name c4d|Background
 color c4d|Arnold_Shader_Network|checkerboard
 lenx 1
 leny 1
 ox 0
 oy 0
}

The image_plane node is a shader, and if you were to check its code, you’d see that it handles camera rays only; for any other ray type (like refraction), the image_plane shader returns black.

shader_evaluate 
{ 
    if (!(sg->Rt & AI_RAY_CAMERA)) 
    {
        sg->out.RGBA = AI_RGBA_BLACK;
        return; 
    }

 

[C4DtoA] Understanding shaders and AOVs


Arnold takes care of writing the built-in AOVs like N, P, Pref, A, and the all-important beauty. But it’s shaders that write to AOVs like direct_diffuse. That’s why something like this is not going to give you what you might expect in the AOVs:

layer_colors

layer_color doesn’t write to AOVs, so you won’t see the layered result in an AOV like direct_diffuse. standard does write to the direct_diffuse AOV (and others), but in this setup, you have multiple standards and they end up overwriting each other, so you get just the last standard output in the AOVs.

It’s better practice to avoid having multiple standard nodes in a single material; instead, layer the maps that go into the standard parameters like the diffuse and specular colors.

Or you could use a node like mix, or the third-party alLayer, which support AOVs. You can tell if a node writes AOVs by looking at its Attribute Editor: there’s usually a tab or list where you can change the names of the AOV outputs.

mix_aovs

[C4DtoA] Installing C4DtoA in a custom location


The C4DtoA installer puts the C4DtoA plugin in the default location: the plugins folder of the Cinema 4D install.

If you want to put C4DtoA somewhere else, like a shared network location, you can use the C4D_PLUGINS_DIR environment variable to point to your custom plugin location.

For example, on Windows I moved C4DtoA to a different drive and then set my environment like this:

set C4D_PLUGINS_DIR=F:\plugins
set PATH=F:/plugins/C4DtoA/arnold/bin;%PATH%

Note that I had to set PATH so C4D could find ai.dll, and that I had to use forward slashes (on Windows, C4D doesn’t like backslashes in the PATH and drops them).

On Windows, the C4DtoA installer puts a second copy of ai.dll in the C:\Program Files\MAXON\CINEMA 4D R17, so you’ll have to remove that ai.dll, and use PATH to point to the ai.dll in the C4DtoA arnold/bin folder.

[C4DtoA] Render failed! Please check the log for more details.


c4dtoa_render_failed

The Arnold log is important, not just for troubleshooting and getting help from us at Solid Angle, but also for understanding what’s going on when Arnold renders your scene.

But, first things first: where’s the log? The Arnold log is output to the Cinema 4D Console:
c4dtoa_console

To open the Console, click Script > Console.
c4dtoa_script_console

You can set the verbosity level in the Render Settings > Diagnostics. By default, the verbosity level is Warnings, but by increasing it to Info, you’ll get the % done log entries. You can also send the log to a file (good for logging support cases!).
c4dtoa_diagnostics