Karma Cryptomatte issues in Houdini 19.5.403

   4063   14   3
User Avatar
Member
75 posts
Joined: Dec. 2017
Offline
I found a series of issues of Karma's Cryptomatte.

1. When rendering to Mplay and then save frame into disk, houdini won't write out the correct Cryptomatte metadata, neither Houdini COP or Nuke can use those Cryptomatte.

2. Cryptomatte aov set by different methods seems to write non-generic metadata.
- the first way is set the Cryptomatte aov on the karma render settings node, set the extra render vars 'CryptoObject'. it will give the 'CryptoObject' aov, and it can give the correct metadata that Houdini and Nuke can read.


- the other way is set the Cryptomatte aov on the 'Karma Cryptomatte' node (will output CryptoPrimitives aov),if use this method only Houdini COP can read the metadata and use the Cryptomatte correctly. (Nuke can't even read beauty pass when there is 'CryptoPrimitives')



3. when using 'CryptoObject' method , if read the EXR file in the COP and use AIdenoiser to denoising the image, and use COPROP render it out, the metadata will also mess up (can't use Cryptomatte after denoising and render it out).

The above three problems, I think there may be some Nuke side issues? But the use of aidenoise in cop will break the use of Cryptomatte, it seems that it should not appear.

I have attached the exr file rendered by both methods: https://mega.nz/folder/PkR1XDzb#b_CVkNNoLodQZh858DFjig [mega.nz]
Edited by ysysimon - Nov. 2, 2022 22:06:48

Attachments:
CryptoObject.png (63.1 KB)
CryptoPrimitives.png (52.5 KB)

User Avatar
Member
7785 posts
Joined: Sept. 2011
Offline
Does it work in nuke if you render the crypto to a separate file? I never save crypto in the same file as the beauty, that always causes problems.
User Avatar
Member
75 posts
Joined: Dec. 2017
Offline
jsmack
Does it work in nuke if you render the crypto to a separate file? I never save crypto in the same file as the beauty, that always causes problems.
How?
I believe muti-layer EXR currently supports rendering crypto into the same exr file, as evidenced by the method 'CryptoObject' being successfully read by nuke.
In fact, rendering alone without beauty aov involves another issue, for which I made a separate post:https://www.sidefx.com/forum/topic/87180/ [www.sidefx.com]
User Avatar
Member
7785 posts
Joined: Sept. 2011
Offline
ysysimon
How?

On the Karma Cryptomatte node, under mode, instead of adding to an existing product (output file), create a new one.
User Avatar
Member
2 posts
Joined:
Offline
Hi,

I am running into this same issue in 19.5.493 - is there a resolution for having cryptomattes readable within the same renderproduct as the rest of the AOVs? I can see the cryptomatte AOVs are written into the exr in RV however it is not readable in Nuke.

Thanks
Juri
User Avatar
Member
1 posts
Joined: May 2017
Offline
Has anyone found an answer to this? I'm having the same issue in Houdini 20 karma solaris. Nuke seems unable to read exr's with AOVs and crytomattes.

Flame and Chaos Player read the AOvs+crytpmattes correctly but nuke seems unable to see not only the beauty,rbga and C pass but can't see the cryptomattes inbeaded in the multichannel exr, It only sees the AOV's.

What am I missing?

Attachments:
Capture.JPG (113.8 KB)

User Avatar
Member
4 posts
Joined: March 2015
Offline
Personally, this is a first. I've never had this issue in the past, adding cryptos with other AOV's.
I've had this issue when I added cryptomatte render vars in Karma. Below is the fix:
Usd Render ROP>Driver>Render Command
husk --exrmode 0
This will force the EXR format to a legacy version, which I believe Nuke still uses(OpenExr 2.2, 2017), I believe the latest version of OpenExr is 3.2 - don't quote me on that though. You can find more information regarding Husk and karma cryptos in the links below:
Last bullet point under tips - https://www.sidefx.com/docs/houdini/nodes/lop/karmacryptomatte.html [www.sidefx.com]
Husk Render Args - https://www.sidefx.com/docs/houdini/ref/utils/husk.html [www.sidefx.com]
User Avatar
Member
20 posts
Joined: June 2012
Offline
Hmm, I'm also trying to set this up today and having issues. Even with the ```husk --exrmode 0``` mentioned above, I'm not getting it to work in Fusion.
I'm also not getting any joy in COPs though. It looks correct in MPLAY and the renderview, but not when I extract the mask in COPs.

If I use the Karma Crypto Matter node however, I can get useful data for COPs at least. But nothing that works in Fusion.

Anyone solve this?
https://www.richlord.com/ [www.richlord.com]
User Avatar
Member
20 posts
Joined: June 2012
Offline
Ok I have worked out this issue for me.

If you want to use Cryptomatte from Karma in Fusion, this works for me.

1 - you have to have the ```husk --exrmode 0``` in the Render Command as Anton81 mentioned above.
2 - you have to bring in your exrs into Fusion with a Loader node. It wont work for whatever reason unless you do that. I didnt discover this straight away as I use Resolve+Fusion, not the standalone. So the input nodes are set up for you. Delete them and use a loader instead. Dragging exr's into Fusion also doesnt work.

Ok, this was a real mission, but its working for me now. Hope this helps someone else.
https://www.richlord.com/ [www.richlord.com]
User Avatar
Member
75 posts
Joined: Dec. 2017
Offline
It’s unbelievable that Comp packages is still using old version OpenExr.
User Avatar
Member
8567 posts
Joined: July 2007
Offline
Anton81
Usd Render ROP>Driver>Render Command
husk --exrmode 0
or as a shortcut

USD Render ROP and USD Render ROP LOP -> Husk -> Rendering -> Enable Legacy EXR Mode checkbox
Karma ROP -> Advanced -> Driver -> Enable Legacy EXR Mode checkbox
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
4 posts
Joined: March 2015
Offline
tamte
Anton81
Usd Render ROP>Driver>Render Command
husk --exrmode 0
or as a shortcut

USD Render ROP and USD Render ROP LOP -> Husk -> Rendering -> Enable Legacy EXR Mode checkbox
Karma ROP -> Advanced -> Driver -> Enable Legacy EXR Mode checkbox
Oh yeah, that's great, it's right there staring at me:
Edited by Anton81 - Dec. 2, 2023 18:46:50

Attachments:
snapshot_legacy_mode.png (44.2 KB)

User Avatar
Member
4 posts
Joined: March 2015
Offline
It's worth mentioning that enabling "Legacy EXR Mode" is not ideal, particularly if using Nuke. I say Nuke because Fusion may be using an older OpenExr version than 2.0. I couldn't find any info regarding Fusion's exr version. Anyway, with Legacy EXR Mode enabled, you'll no longer have access to the Multipart feature in the newer builds of OpenExr(2.0+). Multipart allows software packages to access individual parts without the need to read other parts in the file.

From the docs - https://www.sidefx.com/docs/houdini/nodes/out/usdrender.html [www.sidefx.com]:
Enable Legacy EXR Mode
When saving OpenEXR images with multiple AOVs, husk will normally save the images using multi-part EXR files. This extension (introduced in 2013) lets programs read a single AOV without having to read the entire image. This allows most software to work much more efficiently.
Some applications have not transitioned to support multi-part images. If your pipeline uses software that doesn’t support OpenEXR v2.0, this option will force husk to write out images in an inefficient, but more compatible format.


Helpful explanation to anyone using Fusion:
https://bryanray.name/2022/06/04/karma-cryptomatte-and-fusion/ [bryanray.name]
Edited by Anton81 - Dec. 2, 2023 20:09:09
User Avatar
Member
1 posts
Joined: Nov. 2019
Offline
Hi everyone, I tried the above methods on Houdini 20 and karma and it still didn't work for me, So anyways I kept those setting as above and took a render and brought my karma render into nuke, and began to inspect the metadata for the crypto matte exr file. I had one previous working crypto matte file from another render that was working ( Renderman R25 ) and began to compare the metadata values.

I noticed that the " exr/cryptomatte/9171e81/name " key was not present on the karma render. From there it was easy

I added a ModifyMetaData node and added the key as " exr/cryptomatte/9171e81/name " and gave the layer name " CryptoMaterials " as a value. It can be based on any form of crypto matte based on object/primitive, kind, materials, etc.

After that, the crypto matte plugin began to work like a charm.

Thanks and Cheers

Attachments:
Capture.PNG (62.0 KB)
Capture_2.PNG (218.6 KB)

User Avatar
Member
75 posts
Joined: Dec. 2017
Offline
adershbalachandran97
Hi everyone, I tried the above methods on Houdini 20 and karma and it still didn't work for me, So anyways I kept those setting as above and took a render and brought my karma render into nuke, and began to inspect the metadata for the crypto matte exr file. I had one previous working crypto matte file from another render that was working ( Renderman R25 ) and began to compare the metadata values.

I noticed that the " exr/cryptomatte/9171e81/name " key was not present on the karma render. From there it was easy

I added a ModifyMetaData node and added the key as " exr/cryptomatte/9171e81/name " and gave the layer name " CryptoMaterials " as a value. It can be based on any form of crypto matte based on object/primitive, kind, materials, etc.

After that, the crypto matte plugin began to work like a charm.

Thanks and Cheers

Cryptomatte in the same file as the beauty will work?
  • Quick Links