Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Werner <stefan.werner@tangent-animation.com>2018-10-28 12:37:41 +0300
committerStefan Werner <stefan.werner@tangent-animation.com>2018-10-28 12:37:41 +0300
commite58c6cf0c678849cf9c348a8df5e0ec24a6abd4d (patch)
tree7c6dc887ad93e87ad56c3d0c627265a99c7f1e7d /intern/cycles/blender/addon/engine.py
parentc0b3e3daebd36a483e659d32e6517f2fb9b0e277 (diff)
Cycles: Added Cryptomatte output.
This allows for extra output passes that encode automatic object and material masks for the entire scene. It is an implementation of the Cryptomatte standard as introduced by Psyop. A good future extension would be to add a manifest to the export and to do plenty of testing to ensure that it is fully compatible with other renderers and compositing programs that use Cryptomatte. Internally, it adds the ability for Cycles to have several passes of the same type that are distinguished by their name. Differential Revision: https://developer.blender.org/D3538
Diffstat (limited to 'intern/cycles/blender/addon/engine.py')
-rw-r--r--intern/cycles/blender/addon/engine.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/intern/cycles/blender/addon/engine.py b/intern/cycles/blender/addon/engine.py
index 16ec7bc314b..2cdeb97a32d 100644
--- a/intern/cycles/blender/addon/engine.py
+++ b/intern/cycles/blender/addon/engine.py
@@ -254,6 +254,17 @@ def register_passes(engine, scene, srl):
if crl.use_pass_volume_indirect: engine.register_pass(scene, srl, "VolumeInd", 3, "RGB", 'COLOR')
cscene = scene.cycles
+
+ if crl.use_pass_crypto_object:
+ for i in range(0, crl.pass_crypto_depth, 2):
+ engine.register_pass(scene, srl, "CryptoObject" + '{:02d}'.format(i), 4, "RGBA", 'COLOR')
+ if crl.use_pass_crypto_material:
+ for i in range(0, crl.pass_crypto_depth, 2):
+ engine.register_pass(scene, srl, "CryptoMaterial" + '{:02d}'.format(i), 4, "RGBA", 'COLOR')
+ if srl.cycles.use_pass_crypto_asset:
+ for i in range(0, srl.cycles.pass_crypto_depth, 2):
+ engine.register_pass(scene, srl, "CryptoAsset" + '{:02d}'.format(i), 4, "RGBA", 'COLOR')
+
if crl.use_denoising:
engine.register_pass(scene, srl, "Noisy Image", 3, "RGBA", 'COLOR')
if crl.denoising_store_passes: