Jump to content


zephyr707

Member Since 19 Dec 2011
Offline Last Active May 21 2013 12:45 PM
-----

Posts I've Made

In Topic: Object Mask passes

04 May 2013 - 05:49 AM

hey jordan, take a look at the attached cobbled together example where the matte* parameters are declared in the shader (up to matte04). probably not best to put the id on the point attrib, but it was the fastest to get the example going.

procedurally changing parameter names on the fly might work, but i think declaring your spare parameters in the shader is much easier and, as far as i know, doesn't negatively affect performance in any significant way. you only export the planes you use. it would be cool to see a procedural method, though.

View PostJordan Walsh, on 02 May 2013 - 09:34 PM, said:

So back to the idea of getting multiple mattes in shaders procedurally...
can I use a for loop in the shader then chuck a parameter node in there and get the parameter name to change based on the for loop iteration?

In Topic: Object Mask passes

04 May 2013 - 05:12 AM

hey hey, good to hear from you billy.

it is exactly as tomas describes, the mask of the object_id pass exactly matches the alpha if you were to render everything else matte shaded. the overlapping filtered border is where the line manifests itself. granted, it is only very noticeable if you push it in comp to the point where you would probably be best re-rendering anyways. certainly easier and faster than creating a bunch of passes with each object matted by the others.

View Postslamfunk, on 02 May 2013 - 02:25 AM, said:

Was just thinking about how to go about this in Houdini today, as we've been using Object ID passes from V-Ray in production, and I find two good friends discussing it over here. :D

In Topic: Object Mask passes

29 April 2013 - 05:21 AM

ah thanks, i made the example in haste and didn't change the defaults. don't understand the <1 value for gaussian, it is 1 for catmull-rom.

nice example, can do a lot with local material overrides if you can accomplish everything with the single shader. it's true, the object_id pass does have the same filtering, but for overlapping objects I find that it is still a problem.

exactly what i'm doing, just using the object_id color pass as a mask for grade/colorcorrect, etc, but I still get an edge when it overlaps objects. tried to get rid of it and I can't figure it out. Granted I'm really pushing the gain it to expose the problem, so it works for most adjustments, the results are just never as good for me as rendering out each object with others as matte shaded and using disjoint-over in nuke.

It definitely works for most purposes though and it is very straightforward.

View Postanim, on 28 April 2013 - 11:13 AM, said:

hi Alex, the 0.9998 value seems to be 1 if you use 16bit float, which I use by default so I never faced that problem

here is the example of the object_id variable 1 shader and 4 objects
each object has object_id attribute with different value which gets picked by the shader
when you render and look at object_id image plane you will have 4 masks that can be isolated by looking at red, green, blue or alpha channel, they should have exactly the same filtering as the objects in beauty pass
actually in my opinion this is the only way how to avoid edge problems since you keep objects in different channels, at least the only one I can count on

usage in compositing is pretty straightforward, you simply extract one of the channels and use as a mask

View Postanim, on 28 April 2013 - 11:13 AM, said:

hi Alex, the 0.9998 value seems to be 1 if you use 16bit float, which I use by default so I never faced that problem

here is the example of the object_id variable 1 shader and 4 objects
each object has object_id attribute with different value which gets picked by the shader
when you render and look at object_id image plane you will have 4 masks that can be isolated by looking at red, green, blue or alpha channel, they should have exactly the same filtering as the objects in beauty pass
actually in my opinion this is the only way how to avoid edge problems since you keep objects in different channels, at least the only one I can count on

usage in compositing is pretty straightforward, you simply extract one of the channels and use as a mask

In Topic: Object Mask passes

29 April 2013 - 05:12 AM

hi Jordan, perhaps a simple solution would be to just have the extra Matte0# parameters in the shader by default? you may not use all of them, but it saves you from having to add new parameters in the shader, just need to add the image plane exports in the rop if you used them.

View PostJordan Walsh, on 28 April 2013 - 03:33 PM, said:

So I have been using this setup for a little bit and its been working great. I just add a Matte01 parameter in the shader then use local material overrides on the different objects to set the value (for up to 4 objects). Is there a way to add a local override or set up some system that lets me change the name of the parameter to Matte02, Matte03 etc. procedurally? I find I've only needed up to matte04 a few times but its a bit of a pain to have to add new parameters in the shader.

In Topic: Object Mask passes

28 April 2013 - 06:49 AM

with no aa filtering it works great, so i've always just assumed it was the filtering...