Clorofilla Posted September 25 Share Posted September 25 I often manually paint shadows in my compositions, which adds a bit of shading to my elements. Whenever possible I like them to be in a single fill layer (with a mask), so I can easily adjust the global intensity, color and more. In affinity photo is easy to clip a shadow to an pixel layer (children get auto-clipped): But when dealing with a group the same is no longer true: I think this happens because: the group has no "pixel layer" to clip to, because it's pixels come from the sum of it's children,of which the painted shadow is one. What to do then? Is there any non-destructive way of clipping to a group? Of course I could merge the group, or create a mask of the combine group alpha and apply it to the shadow... but this can be tedious to track (e.g. I add a new object tot he group, or I move something). Thanks for any suggestion Quote Link to comment Share on other sites More sharing options...
GarryP Posted September 26 Share Posted September 26 You might be able to use States to do what you want to do. In my example video I have two Ellipses, each with a Pixel Layer which is a painted shadow which is clipped to the ellipse, and a Recolour Adjustment is applied to each Pixel Layer. I also have two State Queries, one for the Shadows and one for the Shadow Colour Recolour Adjustments. You can see how I can change the opacity and colour of the shadows together quite easily even though they are different layers. Some experimentation will tell you whether this will work for you. 2024-09-26 09-36-07.mp4 Clorofilla 1 Quote Link to comment Share on other sites More sharing options...
Clorofilla Posted September 26 Author Share Posted September 26 I gotta say. Initially I was diffident of having to use the States panel as it felt like added complexity... But I see that your trick is actually about the ability to "tag" various of layers in order to be able to quickly select them later. Which... is just so powerful. I realize only now that there are many situations in which you add similar shading/filtering/recoloring layers to elements that are both in the background and foreground (so far away in the layers hierarchy). Now I almost wish for a "quick tagging" & "select by tag" system. I know there are the color tags, but they are limited in number, non-descriptive and slow-ish to assign, and you still gotta create a dedicated states for selecting them. What I am going with is to give more structured name to the layers I want to be able to select later. For example, in a document, among all the layers, I could create the one that I use to paint shadows with these names: orb-shadow big orb-shadow orb-shadow character-shadow floor-shadow floor-shadow Then with the state panel I could select them by their names. Unfortunately there is only the option "Layer name is X" and not "Layer name ends with X". But I can use the regular expression mode and just write: .*-shadow To select any layer ending in "-shadow" and even .*orb-shadow To select only the one ending in "orb-shadow" thus only the ones I've painted for my orbs, for example. For some situation this is overkill, but if, for any reason, you do have a lot of the same repeated effect/layer in different groups/places and you want to tweak it at the same time... then this is pretty sweet! Thanks again @GarryP ! P.S. For those new to Regular Expression they are a way to write rules to target specific portion of a text. In this case it's simple: the "." means "any letter, number or symbol" and the "*" means "as many times as you want, even zero". So ".*-shadow" is about targeting a text with "any bunch of letters/number/symbols, even none, followed by -shadow and nothing more". Thus perfect for targeting suffixes. If you want to target prefixes you would do "myprefix.*". Learning regex (regular expressions) is super frustrating, and often useful only to programmers. But as you can se they may appear here and there in the softwares you use (as a lazy way to allow users to apply custom filters). If you want to learn more on them, there are tutorials https://regexone.com/ and playgrounds to test them out https://regexr.com/. Quote Link to comment Share on other sites More sharing options...
GarryP Posted September 26 Share Posted September 26 You're welcome. I believe the regular expression for ‘ends with’ in the Affinity suite is to put a $ at the end, so 'ends with shadow' would be shadow$ . I don’t use regular expressions much so I can’t give further advice on them. If you type regular into the Help search box you will get a link to a page which has a useful links to explain the regular expression syntax which is used. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.