6
$\begingroup$

I have a character that is linked into a Scene as a collection. I want to change an input value of a nodegroup in one of the character's materials, preferably without making the whole thing local. Of course, I cannot access the materials of a linked collection in the usual way.

I am looking for the best way to Override or proxy or whatever else I need to do in order to get access to the material. And I'm going to need to be able to do this to every material in the scene, of which there are many (but I can write a script to mass apply whatever method.) I'm just trying to avoid having to make it all local because then my files will be multiple gigs in size.

Is there a way to do this?

$\endgroup$
3
+50
$\begingroup$

There are several ways to do this.

Using Object color.

This is quite limited way but it's easy.

You can use object color in node editor and the tricky thing is then you make an instance of the object it will use an object color of the instancer, replacing the original object colors.

So here is the workflow. You use an object color in the node tree:

enter image description here

Next, then you instance the object, use object color to set color for all objects inside the instance:

enter image description here

For this method, no proxy or overrides required, but you are limited to one RGB+Alpha color per instance.

Using Drivers

One of the solutions is using drivers. Let say, I have a character, and I'm going to drive the color of his clothes:

enter image description here

So I created a bone, that will drive this color. Then I pressed RMB on Y Location of this bone and select copy as new driver:

enter image description here

Next, I pasted this driver in Fac field:

enter image description here

Now, then I move this bone color makes blue.

enter image description here

That's all. Then you will use your character via proxy or library override, you will always make a local copy of pose, and changes in this pose will drive color in material.

$\endgroup$
3
  • $\begingroup$ That will work well for characters that will have their rigs proxied anyway. But it won't work for other objects, unless they are all also proxied. $\endgroup$
    – Ascalon
    Mar 25 at 0:56
  • $\begingroup$ @Ascalon added another method $\endgroup$
    – Crantisz
    Mar 25 at 18:37
  • $\begingroup$ Object Color ended up being what I needed since it works on a whole character brought in as a Linked Collection. I used the Object Color's R channel as a mix fac between 2 shader trees. Now its convenient to swap the shader trees on different layers using a driver based on the layer name (can be setup getting the Layer name from the Dependency Graph.) $\endgroup$
    – Ascalon
    Mar 30 at 1:20
1
$\begingroup$

Wrap your entire material into a single nodegroup. Give this outermost nodegroup inputs for only the characteristics that you would like to be able to change in the linking scene.

In your linking scene, set your material slots link mode to "Object" instead of "Data". Make the material local, but keep the internal nodegroup and the object data linked. You can then make changes to the input(s) on the nodegroup or even build a new node tree around it, but the nodegroup itself and the object data stay linked.

An annotated example is below:

enter image description here

The nodegroup stays linked. So does the object data. Any change made to the internal nodetree or mesh geometry in the library file will be reflected here as well. The only data that's really local in this example is the "RGB" input node (which I don't think you actually need), and its connection to the linked nodegroup.

I'm not sure if you can adapt this to work on a whole collection, but it should at least solve having to localize the data and make your file multiple gigabytes.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.