Author Topic: Cryptomatte + Nuke, what's the ideal workflow?  (Read 769 times)

2025-03-07, 11:50:01

moriah

  • Active Users
  • **
  • Posts: 28
    • View Profile
Hi,
I'm a long time Vray user, and i'll have to use Corona for an upcoming automotive animation project. From what i've been testing, cryptomatte is implemented differently in Corona than in Vray.

Vray: Add your Cryptomatte render elements » save multipart exr with dwab compression » load a single exr in nuke (or with separate cryptomatte in recent vray versions)
Corona:
A. Add your Cryptomatte render elements » save cxr » it's not a multipart so every render element is split which is awful » rename cryptomatte cxr to exr » beauty cxr in nuke doesn't have any color corrections saved, but cryptomatte is loaded.
B. Render your beauty with standard render elements with multipart exr » calculate cryptomatte separately in cxr » rename to exr » load in nuke.

With A we lose the multipart exr and there's manual renaming of cxr, also the beauty is unusable directly because it lacks the color corrections in vfb.
with B we have to calculate everything twice which isn't the ideal workflow either.

My question is if i'm missing something? We use deadline and renderstacks for the shot prep and management. Cryptomatte is a MUST for compositing, so what's the best workflow here?

Thank you,

2025-03-07, 13:54:44
Reply #1

RecentSpacesSam

  • Active Users
  • **
  • Posts: 103
    • View Profile
Something I've done before is to use Gaffer to resplit/recompress the cxr into multi part, it is a bit slow but if you can implement it into your deadline workflow then that's not really an issue.

2025-03-07, 14:06:26
Reply #2

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 6027
    • View Profile
Also, shouldn't have to calculate everything twice I believe - you could just render with ALL elements (including the cryptomatte), save to CXR and rename to EXR to load the Cryptomatte and any elements other than the tone mapped Beauty, and then without re-rendering save just the tone mapped beauty to EXR or other high bit depth format. So rendering once is all that's required, "just" saving twice.

As a note, CXR not containing a tone mapped Beauty is already slated to be changed, because we'll need that to work with the AI Enhancer, so in a future update it will remove the need to save twice.

Since I don't use Nuke, can you clarify on "it's not multipart" as to what that means? Someone who does have Nuke had a look at EXR from V-Ray and "EXR renamed from CXR" from Corona, and the cryptomatte worked identically in each (you see the cryptomatte image, and can just click on the item you want to mask by to have that activated). Thanks!
Tom Grimes | chaos-corona.com
Product Manager | contact us

2025-03-07, 16:44:36
Reply #3

moriah

  • Active Users
  • **
  • Posts: 28
    • View Profile
Something I've done before is to use Gaffer to resplit/recompress the cxr into multi part, it is a bit slow but if you can implement it into your deadline workflow then that's not really an issue.

Appreciate the tip, however i think i still have the problem with the beauty not being tonemapped correctly in CXR

2025-03-07, 16:48:21
Reply #4

moriah

  • Active Users
  • **
  • Posts: 28
    • View Profile
Also, shouldn't have to calculate everything twice I believe - you could just render with ALL elements (including the cryptomatte), save to CXR and rename to EXR to load the Cryptomatte and any elements other than the tone mapped Beauty, and then without re-rendering save just the tone mapped beauty to EXR or other high bit depth format. So rendering once is all that's required, "just" saving twice.

As a note, CXR not containing a tone mapped Beauty is already slated to be changed, because we'll need that to work with the AI Enhancer, so in a future update it will remove the need to save twice.

Since I don't use Nuke, can you clarify on "it's not multipart" as to what that means? Someone who does have Nuke had a look at EXR from V-Ray and "EXR renamed from CXR" from Corona, and the cryptomatte worked identically in each (you see the cryptomatte image, and can just click on the item you want to mask by to have that activated). Thanks!

Thanks for the clarification. I'm not talking about single images, but rather several animations being saved via deadline. I don't think there's an option either in Renderstacks or Deadline to double save the same file with different options after being rendered once.

When i mean multipart, it's 1 exr with all the passes inside. Right now CXR has everything split, each render element is a separate file. Maybe i'm missing an option to make it multi part like EXR?

If CXR had the tone mapped beauty we had our problem solved i think. Any ETA on that option?

Appreciate the help!

edit: Actually Renderstacks only supports corona exr saving, no cxr at all.

2025-03-07, 17:09:55
Reply #5

piotrus3333

  • Active Users
  • **
  • Posts: 295
    • View Profile
no clue about Corona with Renderstacks/Deadline but CXR is multi layer by default and never multi part.
Nuke can do all the tonemapping available in Corona and more. it can also do everything you need with exr files - most likely convert multi layered to multi part - better performance in Nuke.
Marcin Piotrowski
youtube
CGI OCIO config 04

2025-03-07, 17:28:58
Reply #6

moriah

  • Active Users
  • **
  • Posts: 28
    • View Profile
no clue about Corona with Renderstacks/Deadline but CXR is multi layer by default and never multi part.
Nuke can do all the tonemapping available in Corona and more. it can also do everything you need with exr files - most likely convert multi layered to multi part - better performance in Nuke.

Sure i know Nuke can do everything Corona does, but when delivering to comp it must match the output of corona inside max and in a final format ready to work. If i was a solo artist sure it would be no problem, but in a team pipeline that won't work at least for us.


2025-03-07, 17:51:27
Reply #7

piotrus3333

  • Active Users
  • **
  • Posts: 295
    • View Profile
so rendering twice is easier for you than a precomp in Nuke?
Marcin Piotrowski
youtube
CGI OCIO config 04

2025-03-07, 20:58:11
Reply #8

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 6027
    • View Profile
I personally can't test with Deadline or other render managers, but I did check rendering an animation from 3ds Max to .cxr, and there is an unnecessary extra .cxr  (which when renamed to .exr just contains the color, visual interpretation of the cryptomatte and not the actual cryptomatte layers, so these can safely be deleted - they'd be named "FILENAME __CMasking_CryptomatteFRAMENUMBER"), while the main .cxr files did contain the cryptomatte layers as expected. You could open a support ticket via https://support.chaos.com/requests/new for the support team to investigate results through render managers specifically.

If Renderstacks only supports .exr, it will not contain the cryptomatte data - that is only written in CXR files.

The latest that tone mapped Beauty will appear in CXR is June when Corona 13 comes out. It might show up at the end of this month when Corona 12 Update 2 comes out. Will check in with you next week on that :)
Tom Grimes | chaos-corona.com
Product Manager | contact us

2025-04-14, 16:56:31
Reply #9

Steven_IAS

  • Active Users
  • **
  • Posts: 9
    • View Profile
I am still to this day not sure why Corona has this workflow for cryptomatte. I was hoping that when they became part of the chaos group, they would adopt industry standards, but here we are in version 12, and it is still wonky. Is there some internal code issue with Corona to only use the .CXR format and not just write the crypto to a proper multichannel EXR? It just seems so odd even to use something like a CXR in the first place. If Corona really wants to be taken seriously in the 3D community, it needs to sort of these oddities that every other render engine has.

When I work with an artist who has never used Corona before, they really like it until it gets to the is stage, then they are like, what the hell is this? It is kind of embarrassing, honestly. Makes it feel like a toy and not a production render engine.

2025-04-14, 18:55:48
Reply #10

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 6027
    • View Profile
If I remember right, this is because we save through the DCC save routines, and are limited in what we can do there by what the DCC exposes and allows. CXR is the only one we control entirely by ourselves :) V-Ray totally re-wrote the save routines to use their own for all file formats - and we're considering the same thing for a variety of reasons. Previously though it was a "don't re-invent the wheel, and focus on developing things that if we don't develop them, the engine won't be able to do it, so let's just use the existing save routines in the DCCs".

BTW, I personally haven't seen the difference between opening an EXR from V-Ray and a renamed-to-EXR from Corona (because CXR is compliant to EXR format, just it has extra metadata we need), but this was just in Photoshop using IO-EXR. What is the difference if loaded into Nuke after renaming?
Tom Grimes | chaos-corona.com
Product Manager | contact us

2025-04-14, 19:12:01
Reply #11

Steven_IAS

  • Active Users
  • **
  • Posts: 9
    • View Profile
There is no difference in the image quality; it is just the process of having to rename the files, which is time-consuming when you are working with sequential renders. If you have to do that for 10-20 shots with 3-6 render versions, it eats up time and slows the process.

2025-04-14, 19:48:50
Reply #12

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 6027
    • View Profile
TY! Understood on that, it  would indeed be very tedious. I just wanted to check that I wasn't missing something else in the way the files are set up on the inside.
Tom Grimes | chaos-corona.com
Product Manager | contact us