Neon Junkyard Posted September 2, 2016 Share Posted September 2, 2016 Is there any way to create object-based mantra AOVs (for object ID mattes) instead of having to go through the shader, like how vray for maya handles it where you can create an object property with an override object ID and you can throw multiple objects in it that will all inherit the same object ID? I'm referring to would would be object RGB object mattes in other software I know you can export custom AOVs inside a shader but for my workflow I have three issues with that- 1) if you are doing quick look-dev and iterating through multiple different shaders and you export that variable in one but quickly shift gears to a different look and forgot to include it in the new shader it won't render 2) If you want multiple objects to share the same object ID matte rather than having to annoyingly shuffle copy everything together in nuke you have to duplicate the same variables for each shader 3) and most importantly, and I don't really see a way around this, you need to unlock every shader HDA which is, as I have read, extremely innefficient in H15 as their load time and memory footprint are greatly optimized in their VEX HDA definition state Ideally this would be something you could implement at the SOP level in a wrangle or something Is there any way to quickly enable/disable all extra image planes like you can in maya/max/cinema/every other software, without manually unchecking every box? Then finally, when you export a float AOV and bring it in to nuke it basically reads it as an alpha channel; it won't be visible to a shuffle node as most AOVs would, you need to use a copy node to extract it. That isn't a huge deal except for I use a lot of python scripts that automate a lot of this and that breaks my workflow a bit. Any way around this? Any insight on this is greatly appreciated! Quote Link to comment Share on other sites More sharing options...
bonsak Posted September 3, 2016 Share Posted September 3, 2016 (edited) On your ROP add the rendering parameter "vm_generate_opid": Cog wheel -> Edit rendering parameters -> Root/Mantra/Extra Image Planes/Generate Op ids for objects. Then add an extra image plane: VEX Op_id, Type: Float, Name: Op_Id. And check "Generate Op Ids for Objects" Now if you render you get a plane "Op_Id" with different values (press the I key in mplay to measure) for each object. Not sure if this will work for you but you can get decent masks by extracting the different values in comp. -b op_id.hiplc Edited September 3, 2016 by bonsak Typo 1 1 Quote Link to comment Share on other sites More sharing options...
bonsak Posted September 4, 2016 Share Posted September 4, 2016 On the other hand, if you modify your shader types with a bind export "some-object-id-variable" and save them first, you'll have this functionality in any new shader you make. -b Quote Link to comment Share on other sites More sharing options...
Neon Junkyard Posted September 5, 2016 Author Share Posted September 5, 2016 Thanks for the info, didn't know you could control the Op_Id element, I have basically ignored it up until this point I went ahead with the object_ID vector4 variable approach which works pretty well, one thing that I didn't even think to do was just sticking that parameter in the default mantra surface/principled shader and then saving the definitition thus making it export that attribute by default without having to unlock the shader every time 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.