I'm modeling a large set of similar objects (a deck of cards) and I'd like to have a "master" shader that takes an image input. Is there a way to create an Abstract (programming term) shader that I can instantiate in each card shader so I can adjust the look and feel of all the cards while not messing with the UV maps for my images?

Basically I'd like to replace PrincipaledBSDF with MyCardWhichIsAPrincipaledBSDF shader. I can copy and paste the variables to 54 objects one at a time but I'd love a better workflow in the future.

enter image description here

  • 1
    $\begingroup$ Yes. There is a "group" feature, Select your Nodes > Ctrl + G. You can also give all the cards a unique name and write a script to find the image based on the name in any given folder... $\endgroup$
    – brockmann
    Feb 25, 2020 at 20:29

1 Answer 1

  • Add a reroute beween your principled BSDF and your texture
  • Select both the bsdf and the reroute
  • Go to Add > Group > Make Group (CTRL + G )
  • Link the group input to your color and delete the reroute

enter image description here

  • Go back to the shader with TAB or the arrow in the top right
  • Now you can plug your image in the group
  • Create another shader, delete the principled, add your group with Add > Group > NodeGroup and plug your other card image
  • Example with procedural textures but it can be used with image textures :

enter image description here

Note the "2" on the right of the name of the node group. That means that it currently has 2 users. If you want to make a hard copy and edit it independently, click on the number and the name should change. The resulting node group will not be shared with the other ones.

If you want to tweak the roughness for example, select the node group and tap TAB to edit it.

  • 1
    $\begingroup$ Thanks, I'm going to refactor this model, it is used for 5 or 6 animations this week but this is potentially exactly what I'm looking for. I'll see if I can implement it. $\endgroup$ Feb 26, 2020 at 15:17
  • 1
    $\begingroup$ Great ! You can do much more than that, this is kind of the most basic stuff you can do with group nodes. You can also nest group nodes into other ones. I think you can find plenty of stuff about it on the internet if you want to take full control over it $\endgroup$
    – Gorgious
    Feb 26, 2020 at 15:31
  • $\begingroup$ Thanks for this, I was not able to get it done before the content went live but I learned a great new trick here. You've probably saved me thousands of hours in the next decade--thanks, I really appreciate it. $\endgroup$ Mar 5, 2020 at 6:29

You must log in to answer this question.

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