Blender Git Commit Log

Git Commits -> Revision d49e7b8

Revision d49e7b8 by Jeroen Bakker (master)
March 16, 2021, 06:43 (GMT)
Compositor: Redesign Cryptomatte node for better usability

In the current implementation, cryptomatte passes are connected to the node
and elements are picked by using the eyedropper tool on a special pick channel.

This design has two disadvantages - both connecting all passes individually
and always having to switch to the picker channel are tedious.

With the new design, the user selects the RenderLayer or Image from which the
Cryptomatte layers are directly loaded (the type of pass is determined by an
enum). This allows the node to automatically detect all relevant passes.

Then, when using the eyedropper tool, the operator looks up the selected
coordinates from the picked Image, Node backdrop or Clip and reads the picked
object directly from the Renderlayer/Image, therefore allowing to pick in any
context (e.g. by clicking on the Combined pass in the Image Viewer). The
sampled color is looked up in the metadata and the actual name is stored
in the cryptomatte node. This also allows to remove a hash by just removing
the name from the matte id.

Technically there is some loss of flexibility because the Cryptomatte pass
inputs can no longer be connected to other nodes, but since any compositing
done on them is likely to break the Cryptomatte system anyways, this isn't
really a concern in practise.

In the future, this would also allow to automatically translate values to names
by looking up the value in the associated metadata of the input, or to get a
better visualization of overlapping areas in the Pick output since we could
blend colors now that the output doesn't have to contain the exact value.

Idea + Original patch: Lucas Stockner
Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D3959

Commit Details:

Full Hash: d49e7b82da67885aac5933e094ee217ff777ac03
Parent Commit: 269536d
Lines Changed: +1166, -142

29 Modified Paths:

/release/scripts/startup/nodeitems_builtins.py (+1, -0) (Diff)
/source/blender/blenkernel/BKE_cryptomatte.h (+8, -1) (Diff)
/source/blender/blenkernel/BKE_cryptomatte.hh (+5, -0) (Diff)
/source/blender/blenkernel/BKE_node.h (+15, -5) (Diff)
/source/blender/blenkernel/intern/cryptomatte.cc (+57, -1) (Diff)
/source/blender/blenkernel/intern/node.cc (+7, -2) (Diff)
/source/blender/blenkernel/intern/scene.c (+3, -2) (Diff)
/source/blender/blenloader/intern/versioning_290.c (+1, -1) (Diff)
/source/blender/compositor/intern/COM_Converter.cc (+3, -0) (Diff)
/source/blender/compositor/nodes/COM_CryptomatteNode.cc (+219, -36) (Diff)
/source/blender/compositor/nodes/COM_CryptomatteNode.h (+60, -2) (Diff)
/source/blender/editors/include/ED_clip.h (+4, -0) (Diff)
/source/blender/editors/include/ED_image.h (+4, -0) (Diff)
/source/blender/editors/include/ED_node.h (+5, -0) (Diff)
/source/blender/editors/include/UI_interface.h (+4, -1) (Diff)
/source/blender/editors/interface/CMakeLists.txt (+1, -0) (Diff)
/source/blender/editors/interface/interface_eyedropper_color.c (+168, -11) (Diff)
/source/blender/editors/interface/interface_templates.c (+2, -6) (Diff)
/source/blender/editors/space_clip/clip_editor.c (+17, -0) (Diff)
/source/blender/editors/space_image/image_ops.c (+17, -0) (Diff)
/source/blender/editors/space_node/drawnode.c (+62, -19) (Diff)
/source/blender/editors/space_node/node_edit.c (+7, -3) (Diff)
/source/blender/editors/space_node/node_view.c (+26, -0) (Diff)
/source/blender/makesdna/DNA_node_types.h (+27, -3) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+209, -6) (Diff)
/source/blender/makesrna/RNA_access.h (+2, -0) (Diff)
/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc (+229, -42) (Diff)
/source/blender/nodes/NOD_composite.h (+1, -0) (Diff)
/source/blender/nodes/NOD_static_types.h (+2, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021