Author Topic: Can't produce a correct CMasking_Cryptomatte element  (Read 1858 times)

2023-01-13, 13:02:10

mase

  • Active Users
  • **
  • Posts: 91
    • View Profile
So I've been trying to make use of CMasking_Cryptomatte element with no success. I've followed official tutorial on Corona website, tried using different ID types in the element settings rollout, save the file in all kinds of formats and open it in Photoshop using Exr-IO plugin. Every single time, it opens a file with many layers in it but the actual monochrome masks for different materials or instances are not present.

After doing some digging up here in the forum there doesn't seem to be that many people facing the same issue so I want to believe the issue lies somewhere on my end, however I have no idea what else can be done in order to make this work. Has anyone else had trouble loading cryptomatte file into photoshop or is it just me?

2023-01-13, 15:55:08
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12889
  • Marcin
    • View Profile
Which version of Corona are you using?

Please see this guide: https://support.chaos.com/hc/en-us/articles/4954305024529

You need to save your output file in .CXR format (you can use the "Save CXR" option in Render Setup or in the VFB after clicking-and-holding on the VFB Save button). Then you need to change its file extension to .EXR and open this in your 2D editor. Actually, I would not advise using Photoshop for this, but "proper" compositing software like Nuke, Fusion, possibly even Blender.

Please let us know if this is not helpful - we can look into your issue more.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-01-13, 16:04:27
Reply #2

mase

  • Active Users
  • **
  • Posts: 91
    • View Profile
I'm using Corona 9 (Evergreen). And that's the exact tutorial I tried following. As mentioned previously, I have tried saving in .EXR/.CXR, changing extension after saving the file, checking/unchecking various options when opening with EXR-IO in Photoshop and all the other iterations of this tutorial with no success.

I understand that other compositing software is better in how it deals with color, grading, etc. but our team is using mostly Photoshop so it's just more convenient at the moment...

2023-01-13, 16:15:39
Reply #3

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5618
    • View Profile
Must be saved to CXR, then renamed to EXR. EXR-IO settings should as attached (note that Cryptomatte Raw Data is unchecked). If the settings there don't resolve it, can you post an example CXR that is not opening properly for you, and the scene? You can make a simple one so long as it is one you can't get working.
Tom Grimes | chaos-corona.com
Product Manager | contact us

2023-01-16, 12:00:13
Reply #4

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12889
  • Marcin
    • View Profile
Here is how it's working for me:
- set up a simple scene
- add a CMasking_Cryptomatte render element
- use the settings you need in it (I used levels 6 and ID Type "Hierarchy")
- render
- stop rendering
- save as CXR
- rename the file to .EXR (be sure to change extension instead of renaming it to name.exr.cxr)
- open the resulting EXR in Photoshop
- I end up with a files with layers, which looks like in the attached video
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-01-20, 14:31:07
Reply #5

mase

  • Active Users
  • **
  • Posts: 91
    • View Profile
Ok, so it works now and I think I figured out why it didn't work first (and whether that's a bug or not it's up to you).

I would save my render to .cxr (we use deadline for rendering so that's a standard workflow) and then would open it with Image Editor and would try to save from there to another .cxr file. Instead, I should've just copied the original .cxr and renamed it to .exr, opened it in Photoshop and voila! In theory, resaving the .cxr into another .cxr should create the exact same file but somehow it doesn't work with cryptomatte exr worflow. I know it's confusing but I hope I made it clear enough to understand.

Thanks for your help.

2023-01-20, 14:39:05
Reply #6

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12889
  • Marcin
    • View Profile
Ok, so it works now and I think I figured out why it didn't work first (and whether that's a bug or not it's up to you).

I would save my render to .cxr (we use deadline for rendering so that's a standard workflow) and then would open it with Image Editor and would try to save from there to another .cxr file. Instead, I should've just copied the original .cxr and renamed it to .exr, opened it in Photoshop and voila! In theory, resaving the .cxr into another .cxr should create the exact same file but somehow it doesn't work with cryptomatte exr worflow. I know it's confusing but I hope I made it clear enough to understand.

Thanks for your help.

Thanks for sharing, this is very interesting and we will investigate. Just to make sure: in Corona Image Editor are you using the "save" or "save all" option when resaving to CXR format?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-01-20, 17:00:47
Reply #7

mase

  • Active Users
  • **
  • Posts: 91
    • View Profile
Thanks for sharing, this is very interesting and we will investigate. Just to make sure: in Corona Image Editor are you using the "save" or "save all" option when resaving to CXR format?

Just "save". It already takes some time especially when cxr is in high resolution and with a lot of elements, I'm afraid "save all" as cxr would explode my machine.

2023-01-20, 17:05:23
Reply #8

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12889
  • Marcin
    • View Profile
If I am not mistaken, "save" only saves the item currently visible on screen. So if you are viewing the LightMix element, you will only save that single element in .cxr format, if you are viewing CMasking_Mask, you will only save that single mask. But I will double check and return here.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-01-24, 11:24:54
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12889
  • Marcin
    • View Profile
Ok, so I was wrong and I can reproduce the issue:

"Save all" in CIE saves all render elements as separate files - my bad!

If I follow these steps:
1. Set up a scene with cryptomatte, render, save as CXR
2. Open in CIE
3. Save in CIE as CXR
Then I get different layers in Photoshop if I compare the CXR saved in point 1 vs the one saved in point 3.

I will now report this to the devs. I do not have a workaround at this time, sorry.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-01-24, 11:33:34
Reply #10

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12889
  • Marcin
    • View Profile
On the other hand, there are no differences between the two files (CXR from VFB and CXR from CIE) when opened in Fusion. They have the same elements on the list. Perhaps this is again some limitation of Photoshop/EXR IO plugin, but we will see if we can make it work in PS too.

(Internal ID=1041833956)
« Last Edit: 2023-01-24, 11:49:02 by maru »
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us