This is the Arnold implementation of Cryptomatte, by Jonah Friedman, Andy Jones, and Anders Langlands. Cryptomatte creates ID mattes automatically with support for motion blur, transparency, and depth of field, using names available in the Arnold scene at render time.
Version 1.2.3 See changelog for version history.
- Arnold 6.0.4 or later
- (Windows) Visual Studio 2015 Redistributable
- Main Cryptomatte for Arnold shader documentation
- Usage in *toA plugins (Helpfully provided by Solid Angle):
- Nuke and Fusion documentation found in the Main Cryptomatte repo, as are links to Fnordware ProEXR builds and others.
This project uses CMake >= 2.8 to build. It has been tested on Mac OS X >=10.7, Windows 7 with MSVC++2015 and Centos6 with gcc4.4. On Windows, cmake-gui is recommended.
Distributed builds are built with the following:
- (Windows): MSVC 14 (2015) Win64
- (Linux): Centos6.9 + Developer Toolset 7
- (OS X): OS X 10.9
In order to set it up to build in your environment you need to tell CMake where Arnold API is installed. Specify ARNOLD_ROOT in one of the following ways:
- Set ARNOLD_ROOT in your environment before running CMake
- Pass ARNOLD_ROOT to cmake directly as in:
> cmake -DARNOLD_ROOT=<path> ..
- Create a local.cmake file and set it in there
- On Windows, set in cmake-gui (see below)
By default, the shaders will be installed to build/dist. From there you can copy the files to the appropriate paths on your system. If you would like to install directly to a specific path you can set INSTALL_DIR as described for ARNOLD_ROOT above to install to ${INSTALL_DIR}/bin etc. Alternatively setting INSTALL_ROOT instead will install to ${INSTALL_ROOT}/${CM_VERSION}/ai${ARNOLD_VERSION}
Once those variables are set, cd to the top-level CryptomatteArnold directory:
> mkdir build
> cd build
> cmake ..
> make
> make install
On Windows use CMakeGUI.
- Set the source directory to where you unpacked the source files
- Set the build directory to be the same but with "\build" on the end.
- Use "Add Entry" to add
ARNOLD_ROOT
, set to point to the root directory of the Arnold API. - Click "Configure", Select "Yes" when it asks if you want to create the build directory, and choose a Win64 compiller option, e.g.
Visual Studio 14 2015 Win64
. - Click "Generate". This will create a Visual Studio project files in the build directory
- Open a "Developer Command Prompt for VS2015"
- cd to the top-level CryptomatteArnold directory
> msbuild build\INSTALL.vcxproj /p:Configuration=Release
This repo contains a test suite. Running it requires:
- Python 2.7
- Arnold 5.0.1+
- OpenImageIO (Python)
- Build of CryptomatteArnold in ARNOLD_PLUGIN_PATH
To run the unit and integration tests, cd to the root directory of this repo, and run:
python tests
This will do several renders at low resolution, and compare the results to known right answers for pixel values, metadata, and sidecar files. These tests should be robust enough to continue passing with changed sampling seeds, making them suitable for testing with newer versions of Arnold. The test suite has been designed to run quickly to allow fast iteration, though this means packing multiple tests into each render.
This will also run unit tests written in C++.
To run a subset of tests, wildcard filters can be used:
python tests -f Cryptomatte01*
Many people have contributed to Cryptomatte for Arnold with code contributions, bug reports, reproductions, and technical advice. This list is certain to be incomplete.
- Tony Barbieri
- Kevin Beason
- Benoit Leveau
- Alon Gibli
- Gaetan Guidet
- Sen Haerens
- Michael Heberlein
- Martin Kindl
- Martin Ögren
- Jean-Francois Panisset
- Sachin Shrestha
- Vahan Sosoyan
- Solid Angle
- Stephen Blair
- Marcos Fajardo
- Mike Farnsworth
- Angel Jimenez
- Peter Horvath
- Brecht Van Lommel
- Frederic Servant
- Ramon Montoya Vozmediano
- Sebastien Blaineau-Ortega
- The Cryptomatte Committee