Jump to content
Starrider

general h16 material question

Recommended Posts

i'm just starting to use the new material workflow in h16 and got a couple of questions:

* when i'm working in a more complex scene and i have a bunch of shaders with nodes connected to their inputs, my matnet gets polluted pretty quickly. i tried to split things out into subnets, but then the shaders didnt work anymore (also tried it with connecting the outputs, didnt work either). is there another way to 'compile' shaders into some kind of container that i missed? what's the recommended workflow for that?

* i'm trying to export masks (aovs) for comp (for example debris: red, main geo: green: character: blue). is there a way to add those without cracking the shader nodes open? i hacked it for now by connecting my (always export) mask parameter node to an unused slot on the principal shaders (for example emission and turning down the emission intensity). this is something which is needed in most productions and it feels odd that there is no extra slot for additional aov export parameters. is there another way for that?

thanks in advance!

Share this post


Link to post
Share on other sites

im not using the new workflow for reasons you described. if you have two shades it looks so nice in demo, if you have 150shaders (normal count im having on some assets) the all on one level shaders creates huge mess.

 

What im using instead is classic core shader inside material subnet.

But there is bug that i listed months ago that once you use material subnet, shaders dont compile correctly and each time you make a change you have to Force Cook the shader.

01.JPG

Share this post


Link to post
Share on other sites

Thanks for your reply!

I tried setting up a material subnet with a shader inside (tried principal and also classicshadercore). I then assigned the subnet's shader to my geometry and used opcook -F to force cook them (also tried to cook the whole subnet). But that didn't get it working. Strange. Any idea what I could be missing? 
Are you saying that to use subnets I have to use the classicshadercore, or is that just something you prefer? How are you force cooking them? opcook -F ? 

I might go back to the older workflow for now than. This is a bit sad.

Share this post


Link to post
Share on other sites

sorry i should be more clear. force shader is necessary if you promoted some attributes from inside the subnet. Otherwise it cooks its self fine.

Im usin classic as i never got used to principled shader. But works with both.

Im sending simple scene using material builder

 

 

material.hip

01.JPG

Share this post


Link to post
Share on other sites

I had the same problem exporting the AOVs, it works fine if you are using one custom shader, but if you put two shaders with a layer mix it stops working, I'll let you the path to my topic, there is also a file to check in there, the custom AOV is called turb and it only works if you use only one material.  Alejandro Echeverry (pazuzzu) helps me with that, and now is working so I will leave the working file here too.

 

layerMixExports.hip

Share this post


Link to post
Share on other sites

Thanks for the replies!

I actually got both things solved with your help. I guess subnets just dont work, but using the materialbuilder node instead and putting everything inside of it, fixes both issues. The parameter node for export can live in there (and it's working) and my main network stays nice and clean, as shaders are contained.

I haven't checked the issue with layer mixed shaders though. Moneitor - I'll keep this in mind, when I use them.

Thanks to both of you for your help!

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

×