oldiesgoodies Posted June 12, 2011 Share Posted June 12, 2011 Hi What is the best way to do material override globally without changing the individual object`s shader affiliations? Basically I want to be able to render everything in my scene with clay type shaders without applying clay shader to all the objects. thanks Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted June 12, 2011 Share Posted June 12, 2011 Disable surface shading in the Mantra ROP will give you kinda that result. Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted June 13, 2011 Share Posted June 13, 2011 Or you can add shop_surfacepath path to ROP node, this will force mantra to use this shader for all objects.But this should be surface shader, not material. 1 1 Quote Link to comment Share on other sites More sharing options...
anim Posted June 13, 2011 Share Posted June 13, 2011 (edited) Or you can add shop_surfacepath path to ROP node, this will force mantra to use this shader for all objects.But this should be surface shader, not material. I am not sure this will work since inheriting of properties prefer lower levels so surface shader on objects will always override ROP or Camera level surface shader if present I usually create Take where I override material or just surface shader of all objects to desired one, This is just a matter of seconds in Parameter Spreadsheet so pretty straightforward It's not that procedural though so if you add new object you need to override shader for that as well manually Edited June 13, 2011 by anim Quote Link to comment Share on other sites More sharing options...
Jason Posted June 14, 2011 Share Posted June 14, 2011 Take a look at Python Filtering -- in this post: Quote Link to comment Share on other sites More sharing options...
oldiesgoodies Posted June 15, 2011 Author Share Posted June 15, 2011 Hi Thanks for all the answers. It sounds like there is no straight solution to global override but as usual Houdini offers a lot of alternative methods. thanks Quote Link to comment Share on other sites More sharing options...
Jason Posted June 15, 2011 Share Posted June 15, 2011 If you look at the PythonFilter example code (which does almost the exact thing you're asking for) you'll see these two lines - the lines which actually set the new properties. mantra.setproperty('object:surface', 'matte') mantra.setproperty('object:overridedetail', 1) The first line sets the new shader, the second line tells it to override any shaders set by Material SOPs and use the object:surface strictly. For the first line, you can tell it to (1) use a shader out of the OTL libraries -- in which case use: mantra.setproperty( 'object:surface', 'opdef:/Shop/plastic diff 1 1 1'.split() ) (2) use a shader in the IFD, which needs to be forced into the IFD using the mantra rendering property "Declare Materials"(declare_all_shops) set to "Declare All SHOPs" I, too, wish a downstream property could be set to override upstream properties :-/ 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.