2
$\begingroup$

I have a shader node tree like this. It works well even in Eevee.

enter image description here

^ All of the yellow circles use the same image file.

This is inconvenient when I want to :-

  • change the file later
  • create a reusable node group that have image file as input e.g. to create an awesome blur/high-pass node

How to split the file-text-box to an input socket?

I wish for something like :-

enter image description here

Edit (reason to reopen this question) :-

  • A duplicate question and answer suggested by Gorgious Timaroberts♦ (Select Input Texture file name as parameter/node) forces me to use OSL.

  • Unfortunately, OSL is currently not supported by GPU-rendering / Eevee at all. Thus, such solution has heavy negative impact on rendering/preview time.

  • How to solve the problem without negative impact on rendering/preview time? Moreover, I still want to achieve it in Eevee.

$\endgroup$
3
  • $\begingroup$ @Gorgious :: I have just clarified the question a few minute ago. Hopefully, it is probably no longer considered as a duplicate anymore. (or a better duplicate might be found) I would be glad if you may take a look. Thanks. :) $\endgroup$ Commented Jan 26, 2021 at 9:43
  • 1
    $\begingroup$ There is no way right now, good feature request for blender.community/c/rightclickselect though. $\endgroup$
    – brockmann
    Commented Jan 26, 2021 at 11:44
  • 1
    $\begingroup$ Agreed, I see only two ways currently : Using a custom node with OSL, or modify the source code of Blender, but unless you are an actual developer by trade this will be a very difficult task. I would very much like this feature to be implemented too :) $\endgroup$
    – Gorgious
    Commented Jan 26, 2021 at 12:29

1 Answer 1

2
$\begingroup$

Any reason you couldn't encapsulate the image texture node within its own Node Group?

enter image description here

Then, each instance of the group can get its own coordinate space, and you only have to enter the node group and change the image texture once to update it in all locations.

$\endgroup$
3
  • $\begingroup$ Even if this is cumbersome, I guess this is the reason why there is no additional socket for now. $\endgroup$
    – brockmann
    Commented Jan 27, 2021 at 22:10
  • $\begingroup$ Suppose that I have a ShaderA that requires a blurred version of ImageA. As suggested, I create NodeGroup. Then, I happen to need a new ShaderB that requires a blurred version of ImageB. There are a few difficulties :: 1. I need to copy the whole tree e.g. Texture Coordinate & NodeGroup nodes. (total 25 nodes) 2. I need to find a way to edit NodeGroup's image from ImageA to ImageB without impact on ShaderA 3. If I want to change blur-kernel, I have to manually edit both ShaderA and ShaderB. ... Sadly, this solution is still the best workaround, thanks. +1 $\endgroup$ Commented Jan 28, 2021 at 1:10
  • $\begingroup$ You can nest nodegroups, you can create a single-user copy if you want to make a change but also retain the previous version everywhere it exists, and you can always keep extra copies of your node groups easily accessible in a separate viewport, just pin a dummy material to it. $\endgroup$ Commented Jan 28, 2021 at 23:53

You must log in to answer this question.

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