Metadata-Version: 2.3
Name: kriptomatte
Version: 0.0.8
Summary: Decode Cryptomattes in EXR file to PNG masks.
Project-URL: Homepage, https://github.com/GrandArth/Kriptomatte-Phase-1
Project-URL: Issues, https://github.com/GrandArth/Kriptomatte-Phase-1/issues
Author-email: GrandArth <risiamuxms@outlook.com>
License-File: LICENSE
Keywords: Cryptomatte,EXR
Classifier: Development Status :: 1 - Planning
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.5
Requires-Dist: imath
Requires-Dist: numpy
Requires-Dist: openexr
Requires-Dist: pillow
Description-Content-Type: text/markdown

# 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
python kripto_decode.py -i "path_2_exr_file"
```

# Reference
```ref
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.
```