eetu
Joker386
In this project I made a simple setup for exporting custom Depth Map with original shaders (not overriding !) :wink:
Strictly speaking it's not really original shaders, as you would need to modify each and every shader used in the scene..
Of course it's not so hard , it's just a simple
Copy and
Paste 2 nodes in each shader (
Distance VOP and
Export Parameter VOP nodes).
We can use a very simple Python Script for doing this operation automatically , for example just select our specify materials and run this script then additional nodes will copy to these shaders .
Also I think using
P in render and using
COP for convert
P to
Pz has same result with using simple
Pz in Mantra (Just it's inverse) , Because Blue value in
P channel has exactly same value like
Pz.
however you don't need to using
R and
G in the
COP , because they are not useful for computing
Depth , they are only useful for position
X and
Y (not
Z!).
in this case you just connect
Cb to
Output node in
Vop COP and it's same with simply using
Pz extra image plane in Mantra , Just with more complexity !