Krion Posted March 26, 2019 Share Posted March 26, 2019 (edited) Hi! I have in the past done rendering with object ID's in 3DS Max with which i could simply isolate these objects in AE, but the stuff i find about this with Houdini is quite confusing to me. I would like some basic instructions. How do i have different passes in which only (the visible of) an object is visible? I would like these objects to be certain groups that are extant in my SOP level. Help would really be appreciated! Edited April 14, 2019 by that Abstract guy Quote Link to comment Share on other sites More sharing options...
bonsak Posted March 26, 2019 Share Posted March 26, 2019 (edited) Hi You might need to convert your groups into regular attributes. Check out the attached file to see how attributes on an object travel through a bind and bind export in the shader and is picked up in the aov section on the mantra node. I tried with groups but i couldnt figure out how to bind it through the shader. -b aov.hiplc Edited March 26, 2019 by bonsak 2 Quote Link to comment Share on other sites More sharing options...
davpe Posted March 27, 2019 Share Posted March 27, 2019 you can work with groups in shader via inGroup VOP - boolean output indicates membership (which basically is a mask for that group) 1 Quote Link to comment Share on other sites More sharing options...
Krion Posted March 27, 2019 Author Share Posted March 27, 2019 10 hours ago, bonsak said: You might need to convert your groups into regular attributes. Check out the attached file to see how attributes on an object travel through a bind and bind export in the shader and is picked up in the aov section on the mantra node. I tried to recreate that file and as far as i know i have the same settings, but it doesn't work. Do you maybe know what i do wrong? AOV namaken.hipnc 3 hours ago, davpe said: you can work with groups in shader via inGroup VOP - boolean output indicates membership (which basically is a mask for that group) How would you do that? I can't specify a path to my /obj/grid_object1 in the geometry file parameter. And: do you also need to bind export that? Thanks u both! And sorry for my noobness, haha. Quote Link to comment Share on other sites More sharing options...
bonsak Posted March 27, 2019 Share Posted March 27, 2019 You need to give the attribute a value. In your file its is set to zero. 1 Quote Link to comment Share on other sites More sharing options...
davpe Posted March 27, 2019 Share Posted March 27, 2019 actually, you can't read groups directly as i thought, but you can easily convert them to a string attribute and read that: groups.hiplc 2 1 Quote Link to comment Share on other sites More sharing options...
Krion Posted March 27, 2019 Author Share Posted March 27, 2019 (edited) Allright, got it. But how would you do this when you have something like a Principled shader? Or multple different shaders? I think that Material Builder in these files just needs to applied to the geometry, right? Also: Can you only output an alpha? In the past i think i got an colored output of the object ID's just as it was in the normal render. But i might be wrong about this. (Got no access to that exr right now) Edited March 27, 2019 by that Abstract guy Quote Link to comment Share on other sites More sharing options...
anim Posted March 27, 2019 Share Posted March 27, 2019 You can use cryptomatte to output custom ID's http://www.sidefx.com/docs/houdini/render/cryptomatte.html 1 Quote Link to comment Share on other sites More sharing options...
Krion Posted April 8, 2019 Author Share Posted April 8, 2019 (edited) On 27/03/2019 at 3:12 PM, anim said: You can use cryptomatte to output custom ID's http://www.sidefx.com/docs/houdini/render/cryptomatte.html Ah I see. And is all the stuff discussed in this thread also applicable to CryptoMatte? How would you get a group cryptomatte layer? It doesn't work with VEX Variable it seems? Edited April 8, 2019 by that Abstract guy Quote Link to comment Share on other sites More sharing options...
anim Posted April 8, 2019 Share Posted April 8, 2019 3 hours ago, that Abstract guy said: How would you get a group cryptomatte layer? It doesn't work with VEX Variable it seems? You would use Material Stylesheets similar to the instancing example, as Stylesheets can Target groups, but obviously it'll be more flexible to use string attribute instead of groups and directly base your cryptomatte property on its values 1 Quote Link to comment Share on other sites More sharing options...
Krion Posted April 12, 2019 Author Share Posted April 12, 2019 (edited) On 09/04/2019 at 1:15 AM, anim said: but obviously it'll be more flexible to use string attribute instead of groups and directly base your cryptomatte property on its values I'm now going deeply into investigation on what Stylesheets are and how they work: Does this second method you've mentioned also involve Stylesheets or is it something different? Which example do you mean with string attribute? The first example (aov.hiplc) does it with float attributes. And with the first (Stylesheet) method, would the group mattes just appear in the CryptoMaterial layer? Or do you need to make a material for every group? I would like the object to have one material but more group mattes. Doesn't the matte styles override the material? Edited April 14, 2019 by that Abstract guy Quote Link to comment Share on other sites More sharing options...
Krion Posted April 14, 2019 Author Share Posted April 14, 2019 (edited) Oh do you mean the instancing example of the SideFX Documentation? Do I need to understand the 'Render property' and 'Inline Script' stuff for this Group/Cryptomatte/Stylesheet method? Edited April 14, 2019 by that Abstract guy Quote Link to comment Share on other sites More sharing options...
Krion Posted April 14, 2019 Author Share Posted April 14, 2019 (edited) Please someone help. I am just confused here. How do I get these 'string attributes' that I apparently should be able to use as user properties in a Cryptomatte layer? When I use the 'name's generated for the groups by the name SOP in the CryptoMatte, it doesn't work. And it seems the Attribute Create SOP to create a string attribute for my groups doesn't work either. When I put these attribute names in the Property parameter of a Cryptomatte layer, the layer shows up but it doesn't seem to have any white mattes in it. Edit: I've made a new post for this now: Edited April 14, 2019 by that Abstract guy Quote Link to comment Share on other sites More sharing options...
davpe Posted April 15, 2019 Share Posted April 15, 2019 hey, I can't help you getting the result with stylesheets+cryptomatte. you can, however, inspect the attached scene that's doing more-less the same thing in more simplistic way. steps I have done in the scene: 1 - build your groups 2 - convert them to primitive string attribute with Name SOP 3 - loop over the named primitives with For-Each loop (which is basically looping over your groups as the attribute is based on those) 4 - inside loop, generate random colors based on current iteration number, so you end up with random colors per group 5 - bind the color attribute into a shader that's applied to your geometry (or convert the color to some arbitrary attribute) and render that instead of cryptomatte it only have one caveat which may, or may not matter, depending on what you doing - if you've got two objects with the same group names, it may not result in the same colors (as the resulting color is not based on group name, but rather on loop iteration number) if you want to retain certain colors for certain group names over more objects, just use the solution i shared before, only you have to assign a color to each particular result. obvious disadvantage here is that with many groups it would be a lot of manual work to do. but if you only have a few groups, this is the most straightforward way i can think of. in the attached scene there are both approaches, you can swap the result of random and manual in the shader. if you need to do this across more shaders, you will have to copy that over to the other shaders as well - but that shouldn't be a big deal. stylesheets + cryptomatte probably provide more comprehensive solution but also the most technical, with cvex scripting involved groups_id.hiplc Quote Link to comment Share on other sites More sharing options...
anim Posted April 17, 2019 Share Posted April 17, 2019 stylesheets example: 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.