Skip to content

Risiamu/Kriptomatte

Repository files navigation

Kriptomatte_icon.png

Kriptomatte: Making Cryptomattes Easier for 2D Artists

This document outlines the Kriptomatte project, which aims to bring Cryptomatte functionality to Krita, the popular open-source painting software.

Demo Video

What is Kriptomatte and What is this repo?

Kriptomatte is a tool that helps artists work with Cryptomattes, which are special masks embedded within EXR image files. These masks isolate objects, materials, and assets, making them easier to select and manipulate in video post-processing software.

Unfortunately, typical 2D image editing software doesn't work well with Cryptomattes, so artists often rely on ID Passes. While many popular software packages, such as Blender, lack the option to render ID passes, the codes in this repo (Kriptomatte Phase 1) offer a solution. Kriptomatte converts Cryptomatte information into ID Pass-like masks that can be used in painting software like Krita, Photoshop, and Clip Studio.

Kriptomatte Sample.png

Seperated Masks are also exported for a finer control.

Kriptomatte_Seperate_Mask.png

Install

Download the km.exe from release page and add it to your PATH.

Use from Terminal

After installation, you can use km.exe in your terminal. Open the terminal again, navigate to the directory containing your EXR file, and run the following command, replacing "path/to/your/file.exr" with the actual path to your file:

To easily find the path to your EXR file on Windows, left-click it, then type alt + 3. This will copy the file location to your clipboard. You can then paste it into the command. If the hotkey doesn't work, you can find a light blue option to copy the file path in the top-left corner of your File Explorer.

km -i "path to your exr file"
# for example
km  -i "C:\Users\xxx\Pictures\sample.exr"

Important Note:

Currently, the script only supports Cryptomattes stored in 32-bit EXR files. Ensure your EXR files are rendered with 32-bit precision for the script to work correctly.

Code Reference

Friedman, Jonah, and Andrew C. Jones. 2015. “Fully Automatic ID Mattes with Support for Motion Blur and Transparency.” In ACM SIGGRAPH 2015 Posters, 1–1. Los Angeles California: ACM. https://doi.org/10.1145/2787626.2787629.
“OpenEXR Bindings for Python.” n.d. Accessed July 17, 2024. https://www.excamera.com/sphinx/articles-openexr.html.
“Psyop/Cryptomatte.” (2015) 2024. Python. Psyop. https://github.com/Psyop/Cryptomatte.
“Synthesis-AI-Dev/Exr-Info: Package with Helper Modules to Process EXR Files Generated by Renders.” n.d. Accessed July 21, 2024. https://github.com/Synthesis-AI-Dev/exr-info.

About

A Cryptomatte to mask conversion tool.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors