File Paths

Absolute Paths

You can use absolute paths in your scene, however, it is not recommended.

Absolute texture path

If you use an absolute path and share your scene (e.g. copy it to another machine, upload to a server, etc.), usually you will have to edit your scene and replace the paths before rendering. To avoid this you can use relative paths instead.

Relative Paths

Cinema 4D offers a method to manage your project with all of its assets by storing your files in the tex folder and use only the file name in the scene.

For example, if you have the following folder structure:

You can simply set *mytexture1.exr* or *mytexture2.exr* in your shaders.

The advantage of relative paths is that you can move and share your project without any modification to the scene.

C4DtoA follows this method and allows you to store your textures, ASS files used in procedurals, OpenVDB volume files, etc. under the tex folder and use the file name in the image shader, Arnold Procedural, Arnold Volume object, etc.

Assets Outside the Project

It's not recommended to store assets outside your project because it makes sharing more difficult (you have to copy not just the project folder but these files as well). If you still do so you can also use a relative path instead of an absolute path. You just need to define your custom folders as a C4D texture search folder (Edit > Preferences... > Files) or add it to the texture/procedural search path in the Arnold Render settings (Arnold Renderer > System > Search paths).

ASS Export

You can export your scene to an ASS file and use it in an Arnold Procedural or render it on a farm via kick, etc. Arnold looks for the search paths and/or the current working directory to resolve a relative path.

If you define an absolute path in your scene it will be exported as an absolute path to the ASS file as well. If you define a relative path there are two possible cases:

  1. Arnold uses the texture or procedural search path to resolve the path. In this case, a relative path is exported and the folder of the file is added to the Arnold texture or procedural search path (*options.texture_searchpath, options.procedural_searchpath*). Examples are a texture in the image shader, a library or ASS files used in an Arnold Procedural.
  2. No search path is used to resolve the path. In this case, an absolute path is exported. For example, an OpenVDB sequence used in an Arnold Volume.

Why don't we export a relative path? A relative path would make workflows more difficult, as you can see in the table below.

Absolute path File name (relative path)
Render with kick Renders fine. Have to move files to the directory where the kick command is executed (current working directory).
Use in a procedural Renders fine. Files have to be in the current working directory (which changes inside C4D).
Share the project Have to replace the project folder. Have to replace all file names.

How to render an ASS when you share your project (e.g. upload to a server)

Let's take an example where your files (C4D scene and assets) are located under c:\myproject folder (your project folder). If you export your scene to an ASS file and move your project to a different folder (for example upload your files to a server) you have to do the following steps:

  1. Replace your project folder to the new one in the ASS file: *c:\myproject --> c:\path\to\new\project.*
  2. Replace the plugin folders in the search paths (e.g. c:\Program Files\MAXON\CINEMA 4D R18\plugins\C4DtoA) to the C4DtoA install used while rendering.
  3. Make sure path separators in the search paths are correct for the OS where you are rendering. Windows uses ; while OSX/Linux uses : as path separator. So if your ASS file is exported on Windows with the following texture search path: *c:\folder1;c:\folder2* then you have to change to */folder1:/folder1* when rendering on OSX.
  4. Do the above steps for all ASS files referenced in procedurals.

Procedurals

You can render objects from ASS files in render time using the Arnold Procedural node in your scene. In this case, Arnold uses search paths from the scene (where the procedural is defined) and search paths defined in the referenced ASS files are skipped. Which means to render assets with relative paths correctly normally you have to add search paths from the referenced ASS files to your scene. C4DtoA automatically does this for you.

Automatic search path update does work only with compressed ASS files (.ass.gz). You have to do it manually in that case.

If you have a relative path in your referenced ASS file which does not use search paths then you must move the file to your current working directory.

Team Render

Assets defined in your scene with either absolute or relative paths are automatically downloaded by render clients. You must ensure that paths are valid on the server machine.

Procedurals

Procedurals can reference other assets in ASS files which are 'invisible' for C4DtoA. For example, if you have an object with a texture in your referenced ASS file, C4DtoA does not know anything about this texture and won't distribute it to the clients. In this case, you have to manually define these assets in the Asset tab of the Arnold Procedural object.

It is important that you define the same paths here as they are in the ASS file. If the path is absolute in the ASS file you must set an absolute path here. If only the file name is given, you must set the filename here as well. If you have a sequence in the ASS file, define it here using padding (characters). This is because C4DtoA has to replace the path in the ASS file to the downloaded assets on the client machines.