5
$\begingroup$

For a model I've made I'd like to keep the basic properties of the Cycles material (shader type etc) the same for most of the objects that make up the model, but have a different image mapped to for each object. This is so the (for instance) nacelles have a particular image as part of their material, the main fuselage another etc but all are made of the same basic type of "metal". I don't want an entirely separate material for every object though.

The reason for this is that I want to be able to tweak how shiny or whatever the whole model is without having to repeat this for every single object.

Is there a way to do this? Am I missing something obvious? I'm Happy to elaborate with specifics if I haven't made my intention clear.

$\endgroup$
2
  • $\begingroup$ possible duplicate of Control several different materials via one slider $\endgroup$
    – Gunslinger
    Commented Nov 2, 2013 at 7:46
  • $\begingroup$ @Gunslinger in this case, the solution proposed on the linked question would work with adaptation, but is not an exact or even complete duplicate. $\endgroup$
    – wchargin
    Commented Nov 5, 2013 at 23:51

1 Answer 1

9
$\begingroup$

You can use a node group for your settings. The texture is an input to the node group but all other settings are hardcoded into it. Go into the node editor with a material you want to reuse. Select the nodes you want to make common (for instance, hold down shift while selecting). Press Ctrl - G to make them a group. You are now seeing the internals of your group. Press tab to close it. Press tab again to edit it. It is sort of edit mode for node groups. It looks like this:

Node group beeing edited

To the left you see inputs and to the right outputs. There are empty circles on the input and output nodes. Drag from or to these to add more parameters. There is also an editor for this to the right in the properties panel. Here you can add, remove, reorder and rename parameters.

If you tab out you can rename your group.

Now that you have your group. You can use it in other materials. When adding a node in the node editor, your group will show up under groups.

Add node group

Here I have used my SimpleMaterial on two cubes. One of them got a checkered texture for color and the other got a solid color:

Two cubes and some nodes

$\endgroup$
2
  • $\begingroup$ That solution was perfect; I was going totally down the wrong path previously trying to acheive these results by assuming I needed to feed in the image somehow using the Attribute node (to leverage the UV Map name or the Object pass index number.) $\endgroup$
    – user1519
    Commented Nov 2, 2013 at 10:49
  • $\begingroup$ Good to hear. :) $\endgroup$
    – Gunslinger
    Commented Nov 6, 2013 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .