Jump to content

Global material override?


Recommended Posts

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 by anim
Link to comment
Share on other sites

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 :-/

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...