Jump to content

how to renderout ObjectID pass


Recommended Posts

I have a scene where a House consists of atleast 50 material groups. Now I want to renderout Mattes for each of these but would love to know if there is any way to render out all the mattes in single exr file with relevant material or object name... any ideas?

Hi there,

I just recently set this up with the help from sam.h - discussed here. Scroll down until you see the Object_ID example hip file that he uploaded. Hope that helps somewhat. I'm not sure how easy it will be though since you have 50 different pieces. I also heard somewhere that there is a new AOV in the mantra image plane pulldown called : "diagnostic_node id" or "diagnostic_node primitive id" which will assign an integer number to the individual objects. So you might want to look into that. I haven't checked it out yet but i'd be interested to hear what you find about it!

Cheers,

Jonathan

Link to comment
Share on other sites

I heard a good idea for this a while ago, to limit the amount of images / planes that you have one disk.

In the first matte image split up all 50 objects into 3 groups for R,G,B.

In a second matte split those 3 groups into another 3 groups with R,G,B

And so on!

you could even use the alpha channel so you can do 4 at once ..

You will get a lot more unique object mattes by doing that instead of one matte for each object!

Link to comment
Share on other sites

hi,the best way is to separate them into RGB groups, but you may wanna check this way

first, you lose the antialiasing this way but at least you get the all the pieces in one plane,you can play with the filtering to get better result and i saw once that if you use coverage pass ,it can help with the edges too.
Link to comment
Share on other sites

hi,the best way is to separate them into RGB groups, but you may wanna check this way http://www.vimeo.com/2903392 first, you lose the antialiasing this way but at least you get the all the pieces in one plane,you can play with the filtering to get better result and i saw once that if you use coverage pass ,it can help with the edges too.

Ah, yeah, that's the name of it: Op_Id. Actually, this gave me an idea. We can combine the "two ideas" to get the "opacity" filtering. Use sam.h's method of doing it in the shader. But instead of using a vector. Use a Float like the Op_Id. Then assign each object you want their own value. And then you can multiply the "alpha" by this value before outputting it to it's own parameter! Haven't tried it but it sounds fine in theory. Except I like how Op_Id automatically sets the id's of the objects for you. I'm wondering if we can get access to that value in the shader context to use, instead of having to manually type one in?

Another idea is to maybe just output the Op_Id and Alpha seperately, then multiply in comp?

Lastly, just tried something. I used it in my example project i've been working on, which is making use of the "delayed load shader"... I have say 15 individual GEO NODES each with a delayed load shader pointing to a different "disk file"... In some respects it's cool to use the Op_Id in this context, because it allowed me to break apart ALL of the individual delayed load objects, BUT, at the same time, this goes to show that doing it in the SHADER in some instances, can have it's advantage. *meaning*, I can just assign one id value for ALL of the particle objects, that way they act as ONE object instead of many... Just a bit more to think about. Sounds like there are lots of options now =)

Jonathan

Edited by itriix
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...