ShaderQuery output

41 views
Skip to first unread message

Riccardo Cecchinato

unread,
Sep 25, 2026, 9:12:03 AM (13 days ago) Sep 25
to gaffer-dev
Hello dear Gaffer devs!

I am trying to figure out a specific behaviour about the ShaderQuery. Here is my use case:

I am receiving a lookdev shader box from the lookdev department, which is an aiStandardShder which emissive color is driven by an aiImage file.

On my side, without "opening" and messing with their lookdev publish, I need the ShaderQuery to expose the "out" of the aiImage node, so to "retrive" the texture value that the lookdev department is using for the emissive channel, and plug it to a mesh light shader (which therefore will allow me to translate the emission to an actual light, driven by the exact same source image).
The "issue" is that the ShaderTweak allows me to expose the inner parameters of the aiImage node, but not the "compound result" of it (its actual image output).

To make an easier example: if I were to connect a 6x6 red/green checkerboard instead of an aiImage, the ShaderQuery would allow me to expose eg. the Color 1 or 2, the V channel, or the Contrast, or the Uvset (...), but not the resulting output (the actual 6x6 red/green checker procedural image).

Is there a way to obtain this - clearly without copying and deconstructing the original lookdev box - or is it just not possible?

Thanks in advance for your invaluable help!

Riccardo

Riccardo Cecchinato

unread,
Sep 25, 2026, 10:13:59 AM (13 days ago) Sep 25
to gaffer-dev
I forgot to specify I am on Gaffer 1.6.6.1

dan...@image-engine.com

unread,
Sep 25, 2026, 6:01:01 PM (13 days ago) Sep 25
to gaffer-dev
Maybe John will have a better idea, but I can't really see any way to do this currently. ShaderQuery only grabs parameters from shader nodes, it doesn't grab outputs, and it can't evaluate anything. ShaderTweaks can modify shader networks, but it can't work between locations, and you want to splice part of the shader network at one location into the shader network at a different location.

I'm guessing that the reason for this is that lookdev is using all the parameters on aiImage to tweak and offset the texture, so grabbing all the parameters and hooking them up to a new aiImage would be fairly irritating?

I think doing this conveniently would require a new feature ... but as I said, John might have a better idea.

-Daniel

John Haddon

unread,
Sep 28, 2026, 4:04:13 AM (10 days ago) Sep 28
to gaffe...@googlegroups.com
I think this could be done using Python expressions, but not using ShaderTweaks at present. But Eric is currently wrapping up support for UsdLux mesh lights, which automatically adopt the emission from any surface shader assigned to the same object. Depending on your schedule, might be worth just updating to the next 1.7 release...
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/0c229b63-c4a8-4920-a990-3e3eca644131n%40googlegroups.com.

Riccardo Cecchinato

unread,
Sep 28, 2026, 4:40:52 AM (10 days ago) Sep 28
to gaffer-dev
Daniel, John,

thanks a lot for your quick replies! We are already testing 1.7.* and the idea is to adopt the latest Gaffer version, and this is definitely one more reason to do it! Amazing news : )

Have a great week!

Riccardo

Reply all
Reply to author
Forward
0 new messages