Iray Programmer's Manual

URI schemes

All import and export methods use a common naming convention to identify files based on URIs as defined in [RFC3986]. Currently only the URI scheme file is supported. An empty URI scheme defaults to the file scheme. URI authorities are not supported, except for the empty URI authority, which is needed in some cases to resolve ambiguities (see below).

Within the file scheme relative and absolute URI paths are supported (see Section 4 in [RFC3986]). URI paths are mapped to file system paths as follows.

  • On Linux and Mac OS, URI paths are treated as file system paths without any translation.

  • On Windows, slashes in relative URI paths are replaced by backslashes to obtain the file system path.

  • On Windows, absolute URI paths are mapped to file system paths according to the following table:

    URI path File system path Comment
    /C:/dir1/dir2/file C:\dir1\dir2\file -
    /C/dir1/dir2/file C:\dir1\dir2\file This mapping is supported in addition to the first one since a colon is a reserved character in URIs.
    /dir1/dir2/file \dir1\dir2\file This mapping is only supported for top-level directory names not consisting of a single letter.
    //share/dir1/dir2/file \\share\dir1\dir2\file This mapping requires an (otherwise optional) empty URI authority ( // ) since otherwise the share name is interpreted as URI authority.

Unless the ${shader} variable, explained below, is used, the relative path is resolved relative to the current working directory of the application, or for recursive imports and exports, relative to the scene file referencing it.

The ${shader} variable can be used in URI paths, which is expanded by neuray. The URI path may start with the string ${shader} followed by a slash and a relative path, in which case the relative path is resolved relative to the site's shaders directory. If several shaders directories have been configured, they are searched in turn. The ${shader} variable is only supported for import methods, not for export methods. It is primarily intended to be used for MDL modules (.mdl files).