tonyrambler Posted December 21, 2022 Posted December 21, 2022 This is a very technical question and a very long shot, and I am not necessarily mathematical enough to understand a technical answer! Back when I used Corel Draw there were three blend modes I haven't seen elsewhere: And, Or and Xor. I did many pieces of work using the And mode for a particular effect. My question is, does a tool such as Procedural Texture allow the creation of such a custom blend mode (or to mimic it) and how would something such as the And calculation be formulated? I haven't yet found anything explaining the nuts and bolts of the And mode in Draw. I see things written about And gates, such as the equation is Y=A.B but I don't know how this relates to creating the solution. Anybody clued up on this kind of thing? Thanks! Quote
loukash Posted December 22, 2022 Posted December 22, 2022 1 hour ago, tonyrambler said: does a tool such as Procedural Texture allow the creation of such a custom blend mode (or to mimic it) and how would something such as the And calculation be formulated? The search returns many results, but among them are also quite a few examples: forum.affinity.serif.com/index.php?/search/&q=Procedural Texture Quote MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2
RichardMH Posted December 22, 2022 Posted December 22, 2022 Is this for images or shapes? https://affinity.help/photo/en-US.lproj/index.html?page=pages/CurvesShapes/join.html?title=Joining Quote
tonyrambler Posted December 22, 2022 Author Posted December 22, 2022 I was using it in Corel Draw for shapes with gradient fills. Often the shapes were just rectangles over the entire area of the design, as it was the gradients I wanted. Here's a portion of one example. This is two overlaid gradient filled rectangles, one radial and the other (probably) conical, blended using And. Ignore the star effect, it is just the background colouration effect that's important. I haven't found a way to recreate this yet without Draw. Quote
NotMyFault Posted December 22, 2022 Posted December 22, 2022 First, procedural texture filter is unable to do layer blending on its own. The input values always take the colors from layers below, actually one value, not multiple values from specific layers. What you are looking for is apply image filter. There you can blend 2 images by a self-provided formula. https://affinity.help/photo2/en-US.lproj/pages/Filters/imageBlending.html The help is quite sparse about which functions are available. I think you can use some or most of those listed in procedural texture filter. The disadvantage of the filter is the bad UI: You cant save formulas as presets, and need to enter everything again from scratch. It is destructive. No non-destructive version exists. Macros may help to overcome some of the limitations. Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
NotMyFault Posted December 22, 2022 Posted December 22, 2022 Operations like and, or, xor maybe could be simulated with existing blend modes and / or blend ranges. Could you provide the exact definition on how these functions work on the individual RGB color channels? I found some old reports saying is using bitwise and/or/xor - this would be difficult to achieve in Photo because these functions are not available out of the box, and simulating bitwise functions with idiv / irem etc is high effort Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
tonyrambler Posted December 22, 2022 Author Posted December 22, 2022 Hi NMF, thanks for those details. I'll look at Apply Image later when I have some clear-headed time. I searched what I could find on CDraw blend modes but can't find a definition of how And or Or work, only found Xor on one forum. I'm not even certain that Draw still includes And. As you can imagine, it's also a very frustrating search term to have to use. It's almost impossible to search for in any specific way, so I've had to look for complete docs on blend modes but can't find the formula listed. Thank you for your suggestions. Quote
firstdefence Posted December 22, 2022 Posted December 22, 2022 Can I clarify, are we talking about Layer blend modes in Corel Photo-Paint? List of blend modes from Corel Photo-Paint below? or the Effect in CorelDraw of blending two objects characteristics, such as colour shape etc. Note: Defo Corel Photo-Paint not CorelDraw, although Photo-Paint is part of CorelDraw Suite. UPDATE: Found the the Merge Modes in CorelDraw under an objects Properties and on the Transparency Tab. Quote iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 (Please refrain from licking the screen while using this forum) Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions
v_kyr Posted December 22, 2022 Posted December 22, 2022 1 hour ago, tonyrambler said: I'm not even certain that Draw still includes And. For APh see: Layer blending ... though it doesn't offer any logical AND/OR/XOR blend modes. 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
firstdefence Posted December 22, 2022 Posted December 22, 2022 By example maybe we can create effects that resemble the results shown below. Base Gradient Logical OR Logical XOR Logical AND NotMyFault 1 Quote iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 (Please refrain from licking the screen while using this forum) Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions
NotMyFault Posted December 22, 2022 Posted December 22, 2022 It is possible in theory, but the formula for apply image will be huge, possible larger than the allowed input length. unfortunately we have no basic logic functions, except not (x) = 1-x. This even works for 8 bit integers For and, we can use *, for or +, for xor (a,b) = a*(1-b) + (1-a)*b but these work only for 1 bit (0 / 1). We can extract 8 bits from a color value with idiv / irem and suitable factors, e.g. irem(idiv(x*255,128),2) for bit 7 irem(idiv(x*255,64),2) for bit 6 so you could build a formula by extracting individual bits, from individual color channels, for src and dst layer, and combine them. 8 * 3 formulas with 2 inputs, plus combining the bits by ((b7*2+b6)*2+b5)*2 ….. )*2+b0. maybe next year. I have done a PT filter to convert RGB to HSL and back, this took me about a month. firstdefence 1 Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
RichardMH Posted December 22, 2022 Posted December 22, 2022 Are you sure you can do this with curves and geometry? Quote
firstdefence Posted December 22, 2022 Posted December 22, 2022 22 minutes ago, RichardMH said: Are you sure you can do this with curves and geometry? It's not Geometry functions Richard, it's Blend modes, how layers above affect colours when using a particular blend mode from the layers panel, what you are showing would result in a different shape if two curves were selected. Quote iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 (Please refrain from licking the screen while using this forum) Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions
firstdefence Posted December 22, 2022 Posted December 22, 2022 Just for reference: http://product.corel.com/help/PHOTO-PAINT/540227992/Main/EN/Documentation/wwhelp/wwhimpl/js/html/wwhelp.htm#href=Corel-PHOTO-PAINT-Understanding-merge-modes.html Quote iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 (Please refrain from licking the screen while using this forum) Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions
tonyrambler Posted December 24, 2022 Author Posted December 24, 2022 Thanks everyone for the continued inputs. I will be looking at the earlier replies in more detail when I have some free time. For clarity, all of my work using (Logical) And mode was always in Draw, not PhotoPaint, as my work was all vector based. FirstDefence—yes, those are something like I was producing, but always in Draw. None of the Affinity modes replicate the effect, including Multiply. RichardMH, I think I see what you are getting at. I have actually done a couple of pieces where I mimicked the approximate effect by combining shapes and things like that, but it's a very tiresome workaround and it doesn't provide the organic variations of the blending modes. Thanks. Tony Quote
firstdefence Posted December 24, 2022 Posted December 24, 2022 4 hours ago, tonyrambler said: FirstDefence—yes, those are something like I was producing, but always in Draw. Yeah just updated a previous post to correct wrong info but I'll reiterate here, the Blend(Merge Modes as Corel call them) were under an objects properties on the Transparency Tab. Quote iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 (Please refrain from licking the screen while using this forum) Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions
lepr Posted December 25, 2022 Posted December 25, 2022 14 hours ago, lacerto said: exporting to PSD with layers, and then opening them in GIMP, and applying G'MIC blend modes might be one possible route worth an effort. Also, VectorStyler has AND, OR, XOR, NOR blend modes. Quote
iconoclast Posted December 25, 2022 Posted December 25, 2022 I'm not familiar to those blend modes, but Krita has such ones. They are in the category "Binary". Maybe it will give some clearness if you take a look at Kritas Manual: https://docs.krita.org/en/reference_manual/blending_modes.html Quote
lepr Posted December 26, 2022 Posted December 26, 2022 1 hour ago, lacerto said: One possible scenario for experimenting with logical blend modes and retaining vector format would be doing the blending in VectorStyler, making a copy of the blend group, applying Boolean Division, and then copy pasting the blend color values using a color picker to the divided (flattened) vector shapes (the blended color values are unfortunately lost when dividing), and finally copy pasting to Affinity apps. VS now has a Flatten command to perform transparency flattening, but it currently disregards blending modes of the source objects when calculating the colours of the resulting fragments, making the result wrong except for when source objects have Normal blending mode. lacerto 1 Quote
Lisbon Posted December 26, 2022 Posted December 26, 2022 Sorry but this is the first time I'm looking at these blend modes. In the Krita manual, the "AND" blend mode example shows two fully opaque gradients. But after changing to "AND", apparently the result is partially transparent. It looks that the RGB data affects alpha. Am I interpreting the manual correctly? Quote
Lisbon Posted December 26, 2022 Posted December 26, 2022 Continuation of previous message. I believe that two gradients produce smaller and smaller squares that look like transparency. Is that it? Quote
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.