Skip to main content

Decode Cryptomattes in EXR file to PNG masks.

Project description

Kriptomatte Phase 1

The goal of Kriptomatte project is to provide Krita the opensource painting software with the ability to deal wth Cryptomattes in EXR images, thus the name Kriptomatte.

Planing

The Kriptomatte project will be carried in 4 separate phases.

Phase 1

Develop a Python script that, given an EXR file, can output combined and separated cryptomattes (which means ID masks for Objects, Materials and Assets) in common image format that supports Alpha channel, namely PNG.

In this phase, my aim is to make Cryptomattes more accessible for 2D artists in general. With a simple pip install kriptomatte, artists can decode properly colored PNGs from EXR render results for painting in their favorite software, whatever it is.

Phase 2

After Phase 1 go through testing and finalizing, I will rewrite codes in Phase 1 in C++. So that a single drag and drop executable can be built. The executable will be doing the exact same thing, only faster. The tool will also be more accessible, as artists won't need to have any experience with pip or any terminal in general.

Phase 3a and 3b

Port the C++ code to Krita. Make a Python plugin for Krita.

Upon initial inspection, I believe after Phase 2, implementation in Krita should be simple (Push the results to layers with whatever code that dose the thing.). That being said, I have no experience with QT, so I plan to do these in the last Phase. Meanwhile, I do hope ppl have more experience with Python plugin can help bring the Phase 1 code to krita real soon.

Usage

python kripto_decode.py -i "path_2_exr_file"

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kriptomatte-0.0.8.tar.gz (28.5 kB view hashes)

Uploaded Source

Built Distribution

kriptomatte-0.0.8-py3-none-any.whl (27.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page