PDA

View Full Version : Render layers: How to remove a per-object material override?


zuao
03-19-2006, 11:53 PM
Hi folks,

somethin serious has to happen, before I start a post about such things. I am finished. Time is up. Beer is empty. Mulligrubs all the way.

If you got per-Object Material Overrides (NOT per-Layer!) with your Render Layers, how do you remove these shady boys. Please note I dont want to remove the objects from the Layer, but their Material Override.
I want to anticipate that removing the object from teh layer, isnt removing any overrides regarding it.

Besides, building the Layers from Scratch is no option.

I would think that it might be possible to manipulate the "renderlayerinfo" attr?
Perhaps there is someone out there, who wouldnt bother to share experiences or solutions or perhaps a script or how to manipulate the MayaAscii ... anything appreciated ...

....waitin....nando.

francescaluce
03-20-2006, 12:25 AM
somethin serious has to happenright click over your override in the AE and
choose RemoveLayerOverride ? :surprised


ciao
francesca

zuao
03-20-2006, 01:31 AM
hi francesca,
youre kiddin, arent you? on which attr should I apply the "remove..."??? I am not talking about prim vis or anything like that.

clean scene. take a primitive. create a render layer. add the object to it. change to the created layer. apply a material to the model (not layer). well, now you got an material override per-object (mind: if "auto overrides" is checked). its ON the sphere.

how to remove the guy?

zuao
03-20-2006, 01:35 AM
note: someone may think of deletin the material that is applied as mat override. this wont remove the override. the f***** stays.

T-R
03-20-2006, 02:11 AM
What are you wanting to do with this object after you remove the material? Applying a new material will get rid of the old one. Maybe expand on what you are trying to do after you remove it.

madart
03-20-2006, 06:50 AM
You do what francescaluce said. Right-click on the render-layer.

Cometsoft
03-20-2006, 10:03 AM
I don't see where you can right click to remove the override on a per object basis. Maybe I'm blind.

The only way I could do it (without using mel) is to go to the Hypergraph select the object and delete the relation to the shader group. Helps to have the render layer active that you want to remove the override from. That restores the object to the material in the master layer.

madart
03-20-2006, 10:28 AM
When you right-click on the render layer, you can see "Remove Material Override", but for that option to become available (black text not grey), you first have to either "Create New Material Override" or "Assign Existing Material Override", so that you will actually have a Material Override to remove.

EDIT: My mistake! I haven't read the the posts properly! Sorry! It says per-object basis... :banghead: Sorry can't help...

zuao
03-20-2006, 10:47 AM
The only way I could do it (without using mel) is to go to the Hypergraph select the object and delete the relation to the shader group. Helps to have the render layer active that you want to remove the override from. That restores the object to the material in the master layer.

Yeah, last exit Hypergraph. Tried that already. Didnt work for me. Nevermind, thanks for the hint.

zuao
03-20-2006, 10:55 AM
What are you wanting to do with this object after you remove the material? Applying a new material will get rid of the old one. Maybe expand on what you are trying to do after you remove it.

Cmon, this is not of help. Expanding what? My Mind? Mr, everything is already expanded to the Maximum. There is one thing, that is not expanding. Project time.

In my opinion it is quite an ordinary demand that someone would like to remove this kind of override, so that material would fall back to the master layer mat. So, try to answer that question would be of help.

No offense, thank you for joinin in.

Nando.

Cometsoft
03-20-2006, 11:14 AM
FWIW, when I did the Hypergraph method it didn't refresh. Had to go back to master then back to layer where override was to see results.

That aside I think it should be a lot easier. The whole render pass thing is pretty flakey. I've been having a number of issues where going from layer to layer has produced error messages and questionable behavior. That's been with not-too-heavy scenes.

francescaluce
03-20-2006, 01:26 PM
clean scene. take a primitive. create a render layer. add the object to it. change to the created layer. apply a material to the model (not layer). well, now you got an material override per-object (mind: if "auto overrides" is checked). its ON the sphere.

I do think you completely miss the whole maya workflow.
I repeat goto the attribute editor, SGnode, right click
where the override and choose, - RemoveLayerOverride

http://img96.imageshack.us/img96/1092/removeoverride4yr.jpg

the material is applied to a sphere ONLY.
once you remove the override the sphere material will
be the one on the master. exactly what're you asking for
if you're able at least to organize your words in something
that make sense.

if you're applying them in a global way, should remove them in
a local way, I mean they're local overrides.


ciao
francesca

zuao
03-20-2006, 01:39 PM
I do think you completely miss the whole maya workflow.


dont be that ignorant!

Nevertheless, overriding the inputs on the ShadingGroup by hand will be the way into the future, definitely. But for now, overrides were set automatically, means your "solution" dont match the problem.

try the attachment.

you ll find these lines in the file, which should be responsible for teh connections, right?

connectAttr "layer1.ri" "pSphere1.rlio[0]";
connectAttr "layer1.oajs[0].ovl" "lambert3SG.dsm" -na;
connectAttr "pSphereShape1.iog" "layer1.oajs[0].opg";

thanks and make my day,
Nando.

francescaluce
03-20-2006, 01:46 PM
ok if you want.. I'm going to insist on this man.

you're not able to change override because you're
applying a whole new Sgnode to your object. this
put you in the same condition as before.. that you're
missing the whole maya workflow. you have to leave
the same SG and apply just different materials
as surface shaders, displacement shaders and so on.
that's the way local overrides work.

:)

take care,
francesca

edit: if you wanna reestablish the previous default mat
you can just reassign manually the master mat layer and
from there start using correctly your overrides, by locally
or manually if you want assing them where you need it.

zuao
03-20-2006, 02:31 PM
Thank you for insisting. Maybe, you're right.
Now I think I missunderstood the terms "layer override" and "object override" - global and local would be better.

Well, everybody got a different way of workflow. Lets see what the docs say about the workflow.


from the docs:

To change an object's material on a per layer basis (auto-overrides)

1. In the Render Layer editor, select a layer.

2. Select the object whose material assignment you want to change.

3. Assign a new material just as you would any new material assignment (for example, right-click and select Materials > Assign New Material from the marking menus). Set the attributes of the material.

4. Switch between the selected layer and any other layer and watch the material assignment on the object change in the Scene view.


So I did, when I started working with Render Layers and now Ive got a complex set-up Scene with about 15 Layers and these Connections that I don't know how to remove. I insist on THAT.

I think I will have to rebuild the scene "correctly" and the pain will go away...

Thank you again francesca.
You got me a little bit excited on that :)

Nando.

francescaluce
03-20-2006, 02:40 PM
well don't use auto-overrides then. :)
SGnode is already 'centralized' that you
know it as a good place to handle your
local overrides. take care that this behaviour
is consistent also on 'local local' overrides
like if you wanna mantain even the same
surface shader but change only its color.

ciao
francesca

T-R
03-20-2006, 03:23 PM
Cmon, this is not of help. Expanding what?

Wow i must have missed the whole point of this thread. I thought you were in a situation in which you have a render layer with an object that has a material overide(not a layer override) and wanting to change the material. Asking someone for more information might not be help but is on the way there.

zuao
03-20-2006, 03:30 PM
Right. This would come more and more to a kinda xsi workflow then - not that clear, easy visible, meaning afaik there is no "tool" to easily inspect, where the overrides are put, right?

But here I am with some problem again or lets say inconsistency.

1. New Scene.
2. Switchin of the "auto overrides" (forever).
3. I got my lovely sphere again.
4. Apply some Material.
5. Put it to a new Render Layer
6. local override on the material shader input of the shadingGroup
7. applying a new shader there

If I am going to remove this local override now, the object would show up even in the masterLayer with NO Materiel assigned, meaning poisonous greenish. This seems to be an update problem, since the Hypergraph will show that everything is connected quite right. But if you do a Renderview just after removing the override, Mental Ray would not render, saying "unexpected internal exception". Save your scene and load it again, would solve the "update" problem. But is this a workflow?

Ciao, Nando.

zuao
03-20-2006, 03:35 PM
Wow i must have missed the whole point of this thread. I thought you were in a situation in which you have a render layer with an object that has a material overide(not a layer override) and wanting to change the material. Asking someone for more information might not be help but is on the way there.

T_R, really no offense. I got it all a little bit tooo emotional last night. But Ive got a really tight project deadline and spent the whole weekend setting up the Layers with an nearly useless Scene in the end. I was just deeply desperate about that thing.

Thank you for joing into the discussion,
Nando.

zuao
03-20-2006, 04:22 PM
SGnode is already 'centralized' that you
know it as a good place to handle your
local overrides.

Since it seems we got on the right path now, I want to add one more thing that is on my mind.
To outline the issue clearly, lets say you've got a fairly normal animation scene with 100 objects (arranged in different hierarchies), each with a different shading network.
Now you have to setup a kind of matte pass, where some of the objects should appear white, the others black. This would be a hack of work to set all those overrides, since you would have to set it on every shadingGroup. So, do I need to write a script here or did I miss something?

thx ia, Nando.

CGTalk Moderation
03-20-2006, 04:22 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.