Custom Cryptomatte attributes

   5281   3   3
User Avatar
Member
53 posts
Joined: 1月 2015
Offline
Hello all,

I'd like to get a firm grasp on creating custom cyrptomatte attributes/properties. I followed the docs with regards to creating a custom cryptomatte property and I am able to generate a cryptomatte pass for a specific object adding the user property at the /obj level such as this video where they isolate the trees.

https://www.youtube.com/watch?v=4tZ2hYxJdAw [www.youtube.com]

What I have not been able to get working yet (and I'm not sure if I'm doing this the right/wrong way), is to create a cryptomatte pass that lets me choose specific objects rather than the whole group at /obj level. An example of this is a bunch of objects that all live in a geo node i.e. /obj/objects. If I have a random ID attribute on each object how can I make a cryptomatte pass that lets me isolate each one using that random ID as its seed.

I can use object and name in this scenario, but in the scope of a larger asset objects might all be attached together. So far I'm just generating a colour based on the random ID and using that to pick objects. Cryptomatte would be much nicer though.

I'd put up an example file if I knew how to approach it properly, but I don't think I'm properly understanding how to leverage the properties to do this.

Thanks!
www.carlocarfora.co.uk [www.carlocarfora.co.uk]
User Avatar
スタッフ
428 posts
Joined: 9月 2016
Offline
There are a couple approaches:

To give a primitive or set of primitives within an object different user property, you may have to give them unique material assignment, each material having Properties VOP that defines user property. This is more useful for aggregating multiple materials and objects into single ID, not the other way around, so it's probably not the answer you want.

To transfer an attribute to property, you'll have to use material stylesheets, but it will only work with point instances and packed primitives, so you may have to group and pack the primitives based on the IDs first.
(see https://www.sidefx.com/docs/houdini/render/cryptomatte.html [www.sidefx.com] under instancing section, except “target” should be “primitive” instead of “point intances”)
User Avatar
Member
53 posts
Joined: 1月 2015
Offline
Thanks for the reply, I was hoping there might be a solution without using material stylesheets but I'll give it a go and report back if I have any issues!
www.carlocarfora.co.uk [www.carlocarfora.co.uk]
User Avatar
Member
30 posts
Joined: 10月 2014
Offline
Hi, i was wondering how did this work out. I am trying to use crypto with a crowd sim and have each one selectable.
  • Quick Links