Jump to content
kensonuken

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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!

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

I really give this method a try but without any success :( i think it's not possible,hope i am wrong.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×