I'm fully expecting the answer to this will be "that's not possible".
I've got an effect I'm working on at the moment, building off a
tutorial for creating a money style effect using multiple layers. The
guilloche patterns are used as mask selection image that's been copied once for each time the patterns will be applied. each layer of the image has it's threshold adjusted so the darker patterns affect the darkest shadows while the lighter patterns affect the faintest shadows. This takes a lot of effort to set up, which isn't a problem for a still image, but I'm looking to create an animated gif of this where a light source adjusts the shadows causing the patterns to adjust correctly.
The problem here is that because the effect is applied via a mask across upwards of eight layers, I can't just paint on one layer and have the tone affect some layers more than others in a way that I know of. I'm currently looking at Dan Fessler's HD Index Painting In Photoshop Tutorial but I'm not sure it's going to work as I expect.
If anyone has any thoughts on this it would be appreciated!
Replies
But ultimately this might be done better in a compositing tool, where you have a better material-based layout. After Effects comes to mind. Heck, even 3ds Max's node-based material editor might do this better.
Imagine the light pulsing and pushing the linework around like shadows. That's the effect I'm after.
Like @Eric Chadwick mentioned, a real time solution would be better, but I've been down the rabbit hole of game development before. Three months of pulling teeth and hair to determine that a visual concept wasn't going to work isn't something I'm out to ensure again.
This paper provides some good info about how it's achieved:
http://artis.imag.fr/Members/Cyril.Soler/DEA/NonPhotoRealisticRendering/Papers/p581-praun.pdf
https://www.youtube.com/watch?v=PXh0-JPPNSY
https://www.youtube.com/watch?v=IEL32r-PRpg
The reason I'm hesitant to go back into a development space to try this is that I did the exact same thing a few years back. I tried both Unreal and Unity, and where Unreal never spit out anything functional, Unity at least displayed objects, but nothing ever moved. The visuals came out incredibly muddy, and any shaders I tried to produce were like writing out random lines on paper and hoping it spelled readable sentences in a foreign language. I never understood why something didnt work, and it was in all an incredibly demoralizing three months.
Is a development environment the only way you see this working?
For example, searching for "after effects cross hatch":
https://www.youtube.com/watch?v=gsCuC6Qytm8
(Source image was this.)
The layers needed (I actually used more for the above):
(1) Group folder, always in Multiply blend mode.
(2) A Threshold adjustment layer with the threshold set to what you want to extract from the source image for that particular pattern.
(3) The source image as a Smart Object so that you can edit it in another window by the side (like on that GIF) and change it with Brightness\Contrast, Levels or Curves, save it and have it update automatically for all its duplicates (this is how you'll animate this effect, in steps). The smart object layer and the threshold layer are clip-masked to layer (4) below.
(4) The layer with the lines pattern. The lines are not faded in any way, they fill the entire layer.
Duplicate the Pattern 1 group as many times as you want, advance the threshold level of the layer (2) of each group and replace the layer (4) of each group with the different patterns\line weights.
It's the multiply blending of the group folder that makes this work, because the source image is thresholded between black and white, then clip-masked to the lines pattern and this results in some lines being flat white (so they don't do anything when multiplied) and others flat black, which darken whatever's below.
If you plan on doing it in real-time (with Unity, for example), you'll need to use a post-processing shader.
You can pack 4 different patterns on a single RGBA image, since the only thing you care about is their transparency (the alpha channel). So with just two small seamless textures (32x32 or something like that, so they can tile and fill the entire screen), you'd have a total of 8 unique patterns.
You can then have your shader do something like this (untested):
Maybe someday I try my hand at it again. For now though I'll be trying to animate this with a combo of illustrator, photoshop and after effects (once I get close enough to that bridge to burn it).