Shader tweak proxy

47 views
Skip to first unread message

s.des...@gmail.com

unread,
Jun 4, 2025, 5:56:48 AMJun 4
to gaffer-dev
Hello,

I have found that there is a new "+" icon with circle around next to a tweak on the shader tweaks node.
It creates a node shadertweaksproxy when I click on it.
Can you please explain what this node is made for and how to use it in an example ?

Thx,

Seb

John Haddon

unread,
Jun 4, 2025, 7:25:12 AMJun 4
to gaffe...@googlegroups.com
Hi Seb,
The proxy node allows you to insert connections from pre-existing shaders in the network being tweaked. There are a couple of examples in the Help menu - see Examples->Scene Processing->Shader Tweaks.
Cheers...
John

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gaffer-dev/1cf33489-d9b0-4166-93a1-39d87d35dd75n%40googlegroups.com.

s.des...@gmail.com

unread,
Jun 4, 2025, 9:01:17 AMJun 4
to gaffer-dev
Hello John,

Thx, I missed the shader tweaks in the help menu...

As I'm talking about the shader tweaks, I have more questions !

Here’s what I’m trying to do:
I have several objects controlled by a single displacement shader. The displacement textures are written into object attributes and read by an aiImage node using Arnold tokens.
I’d like to be able to override the displacement for certain objects — for example, by adding micro-displacement or adjusting the height (increase/decrease).

To create the overrides, I’m using ShaderTweaks with a path filter targeting the objects I want to modify.

But I’m facing two problems:

  • When I click the "+" and choose “From Affected”, I can see the aiImage node and its parameters, but I don’t have access to the parameters of the Arnold displacement node itself (like map, height, etc.). Is this expected?

  • I also created an aiLayerRgba node to add layers to the displacement. In the input1, I connected my displacement texture, and I’d like to use input2 to add a noise through ShaderTweaks, but I can’t plug an aiNoise into the input2 slot via ShaderTweaks.
    However, I can plug an aiImage.
    Is this a bug, or is there an intermediate node I need to use?

Thx,

Seb

Daniel Dresser

unread,
Jun 4, 2025, 9:46:24 PMJun 4
to gaffer-dev
Some quick replies:

* The parameters of the Arnold displacement node are a bit weird - they aren't part of the shader network in Arnold, they are parameters on the mesh object. But we needed to put them somewhere convenient in the Gaffer UI, so we made the Arnold displacement node. They aren't translated into the shader network, they actually become attributes - you can see them in the Scene Inspector under Attributes at the location as `ai:disp_height` for example. You can tweak them with an AttributeTweaks.
* Connecting an aiNoise to an aiLayerRgba does look a bit awkward currently - the output of aiNoise is rgb instead of rgba - when you're connecting up shader nodes normally, Gaffer understands that there will be an auto-conversion from rgb to rgba, but seem like ShaderTweaks doesn't do this curently. We probably could add this automatic conversion in the future. For the moment, I was able to work around it in a somewhat awkward way by connecting each channel of an aiNoise to an aiFloatToRgba

-Daniel

s.des...@gmail.com

unread,
Jun 5, 2025, 4:31:31 AMJun 5
to gaffer-dev
Hello Daniel,

Thx for your answer.

I also find a workaround by creating a custom "color3f" tweak and give input2 as name. now I can connect the a aiNoise to the aiLayerRgba

Seb
Reply all
Reply to author
Forward
0 new messages