Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cryptomatte custom AOV

10 REPLIES 10
Reply
Message 1 of 11
edenexposito
1328 Views, 10 Replies

Cryptomatte custom AOV

Hi,

Seems that Cryptomatte support custom AOV's (not only crypto_asset, crypto_object, crypto_material). I'm trying to create a custom AOV to store vertex color information, (I'm called crypto_vertex) but I don't know how to do it properly.

I had create a custom aov (crypto_vertex) and I create this chain:

1245-cryptomatte-custom.png

Somebody has created this kind of custom AOV, not only for vertex_color... any other beyond crypto standard AOV (asset, object, material).

Seems that input expect some kind of string variable (give me an error if I try to add RGB nodes)

Thanks to all

Tags (1)
Labels (1)
10 REPLIES 10
Message 2 of 11

I don't think it works that way. The shader expects the name of a string type user parameter in User crypto src 0, and creates the ID hash from the string in the user parameter. So basically instead of using the object or material name you can define a custom string to use as the ID.

Message 3 of 11
edenexposito
in reply to: edenexposito

A simple usage example will be great!

Message 4 of 11

Attached is a basic scene to demonstrate the usage of the user aovs. There's a user parameter on the objects, called 'myname'. That's the source of the user aov. You can define any custom name for the objects in the 'myname' parameter, they are used as the IDs in the custom user aov.

cryptomatte-custom-name-test.zip

So it's probably not what you were after.

Message 5 of 11
cdordelly09
in reply to: edenexposito

Hi guys! I made a script to automate this process with a simple UI:

1300-capture.png

I made it from the Cryptomatte script from SA support site, you only need to select which object you want to add the user data and if you want to give them different IDs like others Cryptomattes or the same ID.

It have only one bug, I don't how can avoid the user data repetitions if you select one input that already have the object, do you know how to do this? Or how can I assign a Crypto User Data Tab only for this user datas.

Hope you find it useful, cheers!

crypto-custom-data-v05.zip

Message 6 of 11

Here's an updated script which does not create a new user data when one with the same name already exists.

1302-crypto-custom-data-v06.zip

As far as I know you can not create your own Crypto User Data tab.

Message 7 of 11
cdordelly09
in reply to: edenexposito

Awesome! you're the best @Peter Horvath, thanks for this.

Message 8 of 11
edenexposito
in reply to: edenexposito

It's only possible use object ID info?

I think that would be more interesting if we can create a custom cryptomatte pass but with "faces selections", "vertex color" and other info beyond object ID. Maybe it's possible and I simply don't know how to name or add this "variables".

I have tried to generate a custom user data in Vertex Color tags instead in objects but seems that not work.

It's possible? An example of how to add this kind of data would be great!

Message 9 of 11

You can write out custom AOVs via the aov_write shaders, like in this tutorial, but that's independent from cryptomatte: https://support.solidangle.com/display/A5AFCUG/AOV+Object+ID

Message 10 of 11
edenexposito
in reply to: edenexposito

Thanks @Peter Horvath I know that, but again same object ID example.

I suposse that with custom AOV we can go beyond object ID's. I thought that is difficult know what other variables exists and is hard to find a little examples to know how theses other variables can be used with custom AOV.

An aditional Arnold help page with this kind of info would be wellcome.

Message 11 of 11
edenexposito
in reply to: edenexposito

Maybe now somebody can add how to do it this like RedShift team as do it here https://docs.redshift3d.com/display/RSDOCS/Cryptomatte?product=cinema4d

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report