dmstraker Posted January 4, 2020 Posted January 4, 2020 Here's the result of a whole bunch of experimenting over Christmas and the New Year that led to a way to not only create separate Hue, Saturation and Luminosity layers, but also how to recombine them back to the original image. As a result you can now separately edit each of H, S and L, applying the full power of APh to each. In summary: Duplicate twice (three times if you want to keep a copy of the original) Rename Hue, Saturation and Luminosity from the top in Hue layer, Filters/Apply Image, Use Current Layer as Source, Equations (check), then set: DR=(SR-min(SR,SG,SB))/(max(SR,SG,SB)-min(SR,SG,SB)) DG=(SG-min(SR,SG,SB))/(max(SR,SG,SB)-min(SR,SG,SB)) DB=(SB-min(SR,SG,SB))/(max(SR,SG,SB)-min(SR,SG,SB)) Apply, then set Hue layer Blend Mode to Multiply In Saturation layer, go to Apply Image as above and set each of DR, DG and DB to max(SR,SG,SB)-min(SR,SG,SB) Apply, then create a group for Hue and Saturation layers, and set the Blend Mode to Add In Luminosity layer, go to Apply Image as above and set each of DR, DG and DB to min(SR,SG,SB) Now you should see the original image. Edit the HSL layers as you will, noting: In editing the Hue layer, you change basic hue but not saturation or luminance. This may be a bit confusing and seem like nothing is happening if you're not careful. In editing the Saturation layer, this is not a luminance layer, so don't try sharpening it. Rather, make areas darker or lighter to change colours to be greyer or more vivid. In editing the Luminance layer, you can apply noise reduction and sharpening here, rather than on other layers (unless you're getting really creative!). Further note: if you want separate RGB hue layers, you can make, for example in the Red layer, DG and DB zero and then Add and group. Note for the purists: Yes, it may not use the 'proper' algorithm, but it is a working, practical solution. And here's a video of it all, from my InAffinity YouTube channel: Max P 1 Quote Dave Straker Cameras: Sony A7R2, RX100V Computers: Win10: Chillblast i9 Custom + Philips 40in 4K & Benq 23in; Surface Pro 4 i5; iPad Pro 11" Favourite word: Aha. For me and for others.
John Rostron Posted January 5, 2020 Posted January 5, 2020 10 hours ago, dmstraker said: DR=(SR-min(SR,SG,SB))/(max(SR,SG,SB)-min(SR,SG,SB)) DG=(SR-min(SR,SG,SB))/(max(SR,SG,SB)-min(SR,SG,SB)) DB=(SR-min(SR,SG,SB))/(max(SR,SG,SB)-min(SR,SG,SB)) What happens if the source colour is grey (SR=SG=SB). The denominator will then be zero. Should the second and third lines be: DG=(SG-min(SR,SG,SB))/(max(SR,SG,SB)-min(SR,SG,SB)) DB=(SB-min(SR,SG,SB))/(max(SR,SG,SB)-min(SR,SG,SB)) They are in the video. John Quote Windows 11, Affinity Photo 2.4.2 Designer 2.4.2 and Publisher 2.4.2 (mainly Photo). CPU: Intel Core i5 8500 @ 3.00GHz. RAM: 32.0GB DDR4 @ 1063MHz, Graphics: 2047MB NVIDIA GeForce GTX 1050
dmstraker Posted January 5, 2020 Author Posted January 5, 2020 1 hour ago, John Rostron said: What happens if the source colour is grey (SR=SG=SB). The denominator will then be zero. Should the second and third lines be: DG=(SG-min(SR,SG,SB))/(max(SR,SG,SB)-min(SR,SG,SB)) DB=(SB-min(SR,SG,SB))/(max(SR,SG,SB)-min(SR,SG,SB)) They are in the video. John Thanks, John. Post fixed. Yes, I wondered about the divide-by-zero problem. But APh seems to cope ok. I tried it on a monochrome image and the Hue was same mono, Saturation black and Luminosity mono. Difference'd with original showed no abnormalities. John Rostron 1 Quote Dave Straker Cameras: Sony A7R2, RX100V Computers: Win10: Chillblast i9 Custom + Philips 40in 4K & Benq 23in; Surface Pro 4 i5; iPad Pro 11" Favourite word: Aha. For me and for others.
John Rostron Posted January 5, 2020 Posted January 5, 2020 I was wondering why you did not create a macro to perform this separation. I tried it and found out why. You cannot group layers in a macro! John Quote Windows 11, Affinity Photo 2.4.2 Designer 2.4.2 and Publisher 2.4.2 (mainly Photo). CPU: Intel Core i5 8500 @ 3.00GHz. RAM: 32.0GB DDR4 @ 1063MHz, Graphics: 2047MB NVIDIA GeForce GTX 1050
dmstraker Posted January 5, 2020 Author Posted January 5, 2020 3 minutes ago, John Rostron said: I was wondering why you did not create a macro to perform this separation. I tried it and found out why. You cannot group layers in a macro! John You can create groups, though it's non-obvious. Select bottom layer of group. Arrange/Group Select next layer up. Arrange/Move inside And so on. Currently working on macro set around this and more. May release today if I finish it. John Rostron and Ganna 2 Quote Dave Straker Cameras: Sony A7R2, RX100V Computers: Win10: Chillblast i9 Custom + Philips 40in 4K & Benq 23in; Surface Pro 4 i5; iPad Pro 11" Favourite word: Aha. For me and for others.
v_kyr Posted January 5, 2020 Posted January 5, 2020 29 minutes ago, John Rostron said: You cannot group layers in a macro! screencast.mp4 John Rostron 1 Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2
dmstraker Posted January 7, 2020 Author Posted January 7, 2020 Macro set now done, including new(?) RGBW: Quote Dave Straker Cameras: Sony A7R2, RX100V Computers: Win10: Chillblast i9 Custom + Philips 40in 4K & Benq 23in; Surface Pro 4 i5; iPad Pro 11" Favourite word: Aha. For me and for others.
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.