psyop / cryptomatte Goto Github PK
View Code? Open in Web Editor NEWCryptomatte Nuke plugin, Fusion plugin, sample images, and specification
License: BSD 3-Clause "New" or "Revised" License
Cryptomatte Nuke plugin, Fusion plugin, sample images, and specification
License: BSD 3-Clause "New" or "Revised" License
I don't understand the way "Node name with hierarchy" work.
i thought that it render me object by link or group but in fact it render me the same that the "Node name"
just in different color but not the grouped or linked objects.
i render in Vray/3dsmax and compositing in Nuke
Any chance of adopting a release workflow with version numbers? This helps with determining what version of software we have installed and comparing it the repository, especially since installations usually no longer have the git repository with them.
Hello,
Is there a naming convention for objects in the scene? I vaguely remember this being discussed a while ago, but I can't find it right now, so apologies if it's a duplicate.
a) Should I store only the leaf geometry name, the full path from the scene root, or should I provide an option to switch?
b) If I need to store the full name, is there an accepted separator between the object names in the hierarchy? I see that the sample files appear to use '.' but this seems a bit unorthodox compared to '/' or '|'. Should this separator be always included as the first symbol in the path (f.e. "/parent_obj/child_obj" vs "parent_obj/child_obj"?
Best regards,
Vlado
Hi all!
Please, anybody have tried to install the new version of Cryptomatte (1.2)? At github manual (https://github.com/Psyop/Cryptomatte#fusion-installation) there are folders that I couldn't found in Fusion installation folder. So I've created these folders but now Fusion open with this error:
So I ask: What is the right procedure to install Cryptomatte 1.2 on Fusion 9?
Thanks in advance for help me with this matter.
Best Regards,
Yohann da Geb
Hello,
I can't find any reference to the "manif_file" string anywhere in the Cryptomatte sources; it is present only in the specification .rtf file. Is this option supported, or deprecated? Originally I intended to implement it, but I removed the implementation after I realized it's not really used anywhere.
Best regards,
Vlado
Nuke 9.0v7 on Fedora 19.
The hash function from the compiled mmh3
module frequently produces completely different results than the distributed pymmh3
module, which causes the cryptomatte_utilities
module to generate bad expressions with a literal "None" in them when certain objects, materials, etc. are picked.
>>> pymmh3.hash('Buddha11|BuddhaShape')
# Result: 3604411835
>>> mmh3.hash('Buddha11|BuddhaShape')
# Result: -690555461
I have tested mmh3 2.0 and 2.3.1. Using pymmh3
seems to work consistently.
Hello,
How are Unicode strings handled in Cryptomatte? Are object names assumed to be in any particular encoding like UTF8? The specification doesn't mention anything in that regard.
Best regards,
Vlado
I'm noticing that in Nuke the Cryptomatte icon will sometimes show a little "postage stamp" image of the matte, but usually the icon is just black. I'm not sure how to get it to show the matte in the postage stamp consistently or correctly (when it does show an image of the matte in the icon, it will not update the image when the matte is changed).
It's possible this is just user-error on my part, and so if there is a way to get this working, I'm all ears! Thanks :)
The specification PDF describes the labels of the metadata to be of the type:
exr/cryptomatte/#hash#/*
This is not how the metadata should be stored in the OpenEXR file itself, that should be:
cryptomatte/#hash#/*
exr/ seems is a prefix attached automatically by Nuke to designate the source of the metadata.
Hi,
as soon as I connect the Loader-Node to the Cryptomatte-Node Fusion crashes suddenly.
It automatic terminate running.
I created the CryptomatteEXR with Houdini 16.5.268.
The Test-Bunny EXR works create in Fusion.
I attaches my crashing CryptomatteEXR and the normal Render-EXR (Constant Shader).
Many thanks.
Patrick
I'm reopeninig this (#19) issue because there is a problem with metadata on output shaders from arnold.
Arnold implementation IS writing out metadata but in slightly wrong format.
Problem is in key name:
exr/cryptomatte/bda530a/....... (key that is present in exr file)
cryptomate for nuke expect that "cryptomate" keyword is folowed by number in base10 or nothing.
After some experimentation i found out that it works if I replace all "exr/cryptomatte/bda530a/" parts with "exr/cryptomatte/0/" or "exr/cryptomatte//" with ModifyMetaData node.
I don't know if that is Cryptomate for Arnold, or Arnold, or Maya bug, but it is an issue.
EDIT: "exr/cryptomatte//" format does not work. it has to be "exr/cryptomatte/0/"
Tom Vujnovic
I've tried sample images and it looks like it works only with names in matte list. If click "picker add" it adds to matte list a color code but dosen't made any mattes. If I write "bunny" it works fine.
Nuke 9
So that's is another issue that came up in 3ds Max besides Unicode characters. In 3ds Max, object and material names can contain absolutely any characters - including spaces, commas, slashes, quotes etc. However if an object name includes f.e. spaces, it is no longer selectable by the Nuke Cryptomatte plugin.
The Cryptomatte specification does not say anything about these characters. Should they be replaced by some other valid character, f.e. underscores? Or should the Cryptomatte plugin for Nuke be updated to handle such object names properly? How should quotes be treated (i.e. should they be escaped with a back slash)?
Best regards,
Vlado
How can i use it on Katana?
Katana Arnold export one channel cryto_object and do not have cryto_object00 cryto_object01 cryto_object02?
How can i export on katana?
Hello, I use the translation software to write the following questions. Hope to understand.
Only the ass scene is rendered, the output of the exr. You can not use Cryptomatte to extract the correct mask in nuke. You must create a model in the scene and give the alsurface shader. exr can be correctly extracted from the mask.
Hi Folks
Nuke does this silly thing where it appends the file format to all the metadata keys.
IE
cryptomatte/881c23b/manifest
becomes
exr/cryptomatte/881c23b/manifest
On both read and write nodes we turn on the knob "do not attach prefix" to get rid of this silly addition as Nuke is kind of dumb as next time you write out a file with metadata the existing metadata will become exr/exr/cryptomatte and if you write it again it will become exr/exr/exr/cryptomatte.
The trouble is the gizmo breaks when you turn "do not attach prefix". You guys should make it work with and without this on.
Hi there,
I am writting this message because I have an issue and to be honest I do not know how to solve it. I created a .exr file using Vray, that file constains three differents cryptomattes. So I import it in fusion 8 and when I try to change the layer selection in cryptomatte node, nothing happen. It is like this option is blocked because I cannot type anything on it. thank you
Hi there,
I'm able to use the cryptomatte node correctly with the sample images, but when I try to use the node with our exrs, there are no options for Layer Selection even though the exr has cryptomatte layers (they show up correctly in the viewer and are named the same as the layers in the sample images). Our exrs were rendered with Vray for Maya on a Deadline render farm. I've tried force updating the cryptomatte node and there are no visible errors. I'm using Nuke10.0v4 with the latest cryptomatte version. Any ideas of what might be going wrong in this scenario? Why would the layer selection options be empty?
Thanks for your time.
Unloading a manifest should replicate some of the settings of the original node it was triggered from like "Preview", "Matte Only", "Remove Channels", "Matte Output" and "Unpremultiply". It should also use the current node for the first matte instead of creating new ones above the one you've triggered the "unload manifest".
Cheers,
Diogo
Hi
In 3dsmax/Vray is there a way to have the all channels refract option in the cryptomatte ?
I mean when i make a matte of a window glass i want to have the object behind it
Thanks
Hey there!
We updated to the latest Cryptomatte and on Windows i see no problem, but linux renders give an error. We found out, that using the pickers will add an array as the knob value.
pickerAdd {0.09262084961 0.2319335938 0.177734375 0 372 482 373 483}
If we override this before the actual render to 0, everything works OK.
Not sure if anybody else encountered this issue, but I had to zero these values out for every single cryptomatte node in the scene to be able to render it without freeze on Linux. On Windows this works.
If you start Nuke in terminal mode and open a script that contains a disabled Cryptomatte gizmo, the knobChanged
callback will raise one or more exceptions during the script loading process, depending on the state of the saved gizmo. I've looked over the code, and basically the issue is that in this particular scenario, the node metadata lookup will return None.
https://github.com/Psyop/Cryptomatte/blob/master/nuke/cryptomatte_utilities.py#L86
I don't really have the time to sort this out and submit a pull request right now, but the fix is very simple: Check if exr_metadata_dict is None
and bail out if it is.
If the Cryptomatte gizmo has been baked into a group it throws an error when reopening the script (or just simply copy/paste the group in the DAG).
If you run .Class() on the knob you see that it's now an Obsolete_Knob and you get the following error:
Obsolete_knob ColorKey call is wrong, probably a missing NULL for script argument.
Maybe the gizmo should use a basic Color_Knob instead? I'm not sure If the Eyedropper_Knob is used much.
Hi there, I don't know if this is the right place to write this, but...
Well we installed the version of Fusion in several computers and we can't see anything when we select the node. actually is missing the arrows that we can see on the reference videos you uploaded.
we copied the Fuse in the Fuse folder, and the other files in the root of Fusion. ( 7 and 8 studio )
Could be soo cool having this working, is something you knew already?thanks!
I've been noticing a tiny little fringe around the edges of the generated masks from Nuke's Cryptomatte node in VRay renders that seems to be fixable by gamma correcting the masks to 2.4.
Is that expected behavior or am I doing something completely wrong here?
Renders are from Maya's Vray (Lin float), Nuke 10.5v6 and the latest Cryptomatte master release.
I've just checked with a test image posted here by another user and the same things seems to happen there (file attached).
Cheers,
Diogo
In Fusion 9 when working on an animation (Multichannel EXR rendered with V-ray) , Cryptomatte loses the selected objects randomly.
It also seems to mix the Z-depth pass at some frames.
A temporary solution is to make a "cache to disk" for every Cryptomatte node in the composition but that's a huge waste of time.
We did 2 screenshots: the first one shows the issue and the other one is what it should be.
The second screenshot was taken after moving the matte locator which "updated" the Cryptomatte node getting him back to normal.
Errors look like so:
Traceback (most recent call last):
File ".../nuke/win64/10.0v6/plugins\nuke\callbacks.py", line 127, in knobChanged
_doCallbacks(knobChangeds)
File ".../nuke/win64/10.0v6/plugins\nuke\callbacks.py", line 46, in _doCallbacks
f[0](*f[1],**f[2])
File ".../temp/cryptomatte/nuke/cryptomatte_utilities.py", line 40, in <lambda>
nuke.thisNode(), nuke.thisKnob()), nodeClass='Cryptomatte')
File ".../temp/cryptomatte/nuke/cryptomatte_utilities.py", line 430, in cryptomatte_knob_changed_event
_set_keyable_surface_expression(node, cinfo)
File ".../temp/cryptomatte/nuke/cryptomatte_utilities.py", line 795, in _set_keyable_surface_expression
for c in cinfo.get_channels():
File ".../temp/cryptomatte/nuke/cryptomatte_utilities.py", line 214, in get_channels
return self.cryptomattes[self.selection]["channels"]
KeyError: None
(I intend to fix this myself, just adding it here for tracking)
We make all Nuke gizmos into groups so that we can ensure increase probability that the script can be opened exactly as it was created a year or two down the line (for various reasons), even if we do have software version control in place which will properly register the Nuke/Cryptomatte versions etc...
gizmo = nuke.createNode('Cryptomatte')
group = gizmo.makeGroup()
nuke.delete(gizmo)
I'm noticing that the Cryptomatte v1.1.4 gizmo breaks when made into a group. Is it possible to avoid this breakage somehow?
Perhaps this cannot be avoided, and if so, that's fine. I just wanted to check.
the picker add and remove doesn't seem to work.
it work doing the unload manifest
and decryptomatte buttons,
the images iam trying it on are render from vray. it was working fine in 11.0v3
Hi,
Just wondering if when this is checked the Cryptomatte Metadata should still be available for downstream nodes if the crypto layers are not being kept.
Adding a ModifyMetaData node below the Remove node with the following "action: remove, key: exr/cryptomatte/*" could address this and keep things even cleaner downstream.
Cheers,
Diogo
Would it be possible to get cryptomatte example images which has the color in the rgba of the bunny? Not just the cryptomatte channels?
I'm rendering multichannel EXRs from V-Ray and I can successfully pick my objects using the Cryptomatte Nuke plugin (v1.1.4).
I would now like to render this out from Nuke into another EXR file, still maintaining the (otherwise untouched) Cryptomatte channels. It seems this is possible only if I set the "datatype" to "32-bit" float and also setting "metadata" to "all metadata" in the Write node.
If I instead choose "16-bit half", the re-written EXR cannot be used with the Cryptomatte Nuke plugin.
EDIT: So, yes, using e.g. Nuke 10.5v6 I can render out 32-bit float EXR files and still maintain the Cryptomatte channels perfectly fine. You also need to set metadata to "all metadata" in the Write node. Nuke can not write out a "mixed bit-depth" EXR, unfortunately, so even if many channels are 16-bit half, I'll have to write out a fully 32-bit float EXR from Nuke.
Running Nuke9.0v6 and when i try to run Nuke after installing the plugin i get a error
/Library/Application Support/Nuke/9.0/plugins/Cryptomatte/init.py
error interpreting the plugin
If i try run Nuke using the full path to the app, the plugin loads successfully
/Applications/Nuke9.0v6/Nuke9.0v6.app/Contents/MacOS/Nuke9.0v6
Any thoughts?
Cryptomatte works fine on a multichannel EXR with ZIP scanline compression, but not with DWAA or DWAB compression. That is, it is not possible to select the objects in Nuke with the Cryptomatte gizmo when the image is rendered with DWA compression. Experiencing this both with Arnold and Vray renders.
In the below node graph, connect the "A" input of the ChannelMerge to the TimeOffset. When you copy/paste the node graph, the "A" input becomes disconnected (which also happens when the script is saved/reopened)
It is caused by something to do with the knobChanged callback - if I remove the inputChange
part of this method, the problem stops (but some functionality no longer works):
def cryptomatte_knob_changed_event(node = None, knob = None):
if knob.name() == "inputChange" or knob.name() == "cryptoLayer" or knob.name() == "cryptoLayerLock":
It's strange - only seems to happen with the ChannelMerge, regular Merge and other two-input nodes seem okay.
set cut_paste_input [stack 0]
version 10.0 v4
push $cut_paste_input
TimeOffset {
time ""
name TimeOffset7
label "\[value time_offset]"
selected true
xpos 13246
ypos 6816
}
set Ndd6dafc0 [stack 0]
push $Ndd6dafc0
add_layer {crypto_object crypto_object.red crypto_object.green crypto_object.blue crypto_object.alpha}
add_layer {crypto_object00 crypto_object00.red crypto_object00.green crypto_object00.blue crypto_object00.alpha}
add_layer {crypto_object01 crypto_object01.red crypto_object01.green crypto_object01.blue crypto_object01.alpha}
add_layer {crypto_object02 crypto_object02.red crypto_object02.green crypto_object02.blue crypto_object02.alpha}
Cryptomatte {
name Cryptomatte6
selected true
xpos 13150
ypos 6876
matteList ""
cryptoLayer crypto_object
expression a
keyedName "ID value not in manifest."
previewChannel crypto_object
in00 crypto_object00
in01 crypto_object01
in02 crypto_object02
in03 none
in04 none
in05 none
in06 none
in07 none
}
ChannelMerge {
inputs 2
operation in
name ChannelMerge7
selected true
xpos 13246
ypos 6941
}
Where can I find documentation on the EXRIO pointer that's created in fusion/cryptomatte_utilities.lua? There's nothing to be found in the scripting docs, user manual, or tool reference, and nor does Google find anything relevant. Do I need access to the Fusion SDK to develop with EXRIO?
Hi
Cryptomatte seems not working whith the update of Fusion 9.02, have you the same problem
Thanks
When I try to select an object with the color picker behind transparency I can only get the foreground object and never the one behind.
Is there a way to select objects behind transparent other objects without having to go to the 3d scene to get the exact name of the shape ?
Hi Guys,
is there any chance or any way to cryptomatte works with the v6 version of Nuke 7.0 ?
Regards.
"ShuffleCopy_embedMask" (out knob) could be replaced for a "Copy" (to0 knob) node in order to allow users to output to a specific channel within a layer instead of outputting the same thing to all 4 channels of a layer.
I would also rename the gizmo "Input1" to "Input" to avoid giving the impression there are multiple inputs on the gizmo.
Hey Guys
I hope all is well you are having a great holiday. I have come across and issue when using cryptomatte, we deal with really large images for print and in order to get renders turned around we do a lot of tiles. I have noticed when we do the tiles and combine them all together in nuke we can use the cryptomatte gizmo without a problem, however, when we try to merge the metadata streams from all the exrs to create a flattened exr and that exr is read back in the gizmo no longer works. I suspect that when the tiles are merged and the gizmo is placed inline after the merge the original metadata streams can be parsed independently, but when we merge the metadata and make a single image somehow they do not play well together.
Has anyone else come across this?
Should i be looking to combine these images with something OpenExr Commandline?
Great work guys! Would be possible to also have the beauty pass on the sample images?
Hello,
Not sure this is the best place to ask, if there is a better place, please let me know.
Is there a document describing how a renderer should generate weights for
a) transparent objects (i.e. does the weight include the transparency of the object) - my guess is "yes", but I'd like to confirm;
b) objects behind other transparent objects (i.e. should the weight take into account any attenuation by transparent objects in front of the selected one) - my guess is "yes", but I'd like to confirm;
c) if the answer to b) is "yes", how is colored transparency handled?
Best regards,
Vlado
Just wondering if there is any real need to create the ShuffleCopy there?
Wouldn't be cleaner to just set the proper output channels on the Expression node directly and get rid of the ShuffleCopy, Dot nodes and wonky node positioning there?
Even the possible Unpremult node could go away by adding de divide to the CryptoExpression directly on the Expression node.
Cheers,
Diogo
Hello,
There is something that is puzzling me in the Nuke plugin implementation. From what I can see, whenever a name is specified in the "Matte List" knob, the plugin directly computes the hash for the name and tries to match the resulting ID with the image data. Wouldn't it make more sense to look up the hash in the manifest, if one is provided? And directly compute a hash only if there is no manifest? This would allow other hashing mechanisms to be implemented without modifying the plugin in any way, or other IDs that are normally generated by the renderer to be used.
Best regards,
Vlado
Any plans for an After Effects plugin (or knowledge thereof), would it even be possible? The reason I ask is because it's my go-to for simple compositing and 2.5D animation. Mostly since Nuke is so expensive.
Photoshop support would be rad too for still work, but I'm probably already pushing it with AE. ;)
Hello,
Having an issue getting renders to work from 3dsmax/Vray 3.60 to Nuke. VRay will auto name the pass "VRayCryptomatte" for example. Now I can see this channel in Nuke but the Cryptomatte gizmo will not pick it up (automatically I'm assuming?). Even if I type in the channel name into "Layer Selection" it still wont work.
If I use a provided sample image and connect the Cryptomatte the "uCryptoAsset" is seen. I can then name the vray pass "uCryptoAsset" and switch the input to this file and it works.
Is there something I'm missing coming from the VRay side? There is very little VRay documentation on this new feature.
Thanks for your time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.