Jump to content
You must now use your email address to sign in [click for more info] ×

Are the effects on a master page layer always drawn first?


Recommended Posts

Windows 10 Home 1903, Publisher 1.7.2.471.

This is a bit of a weird one and probably won’t come up in normal use but I thought I’d mention it.

Edit: “Problem” fixed. It wasn’t a problem, just me not knowing what I was doing. See posts below for an explanation.

I have a document where I added some basic text and a blue rectangle to the default master spread.
Then I went to the normal page and edited the master spread ‘detached’ and changed the blend mode of the text to Erase.
Then I went back to the master spread and gave the text an Outer Glow.
I then went back to the normal page and added two new rectangular layers.
Then I moved the master spread layer above the two rectangles and I am now in the position you see my GIF (AFPUB also attached).

The Erase mode of the detached text – which is still attached to the master spread size/position-wise – knocks out the colour of the yellow and green rectangles as expected but the glow is still drawn below the two coloured rectangles. This doesn’t seem right to me. Surely the master spread layers and their related effects should be drawn within the sequence defined by the Layers panel. (The blue rectangle is fine and seems to be drawn as it should be.)

Is this a bug or am I missing something?

effects-always-drawn-first.afpub

effects-on-master-drawn-first.gif

Edited by GarryP
Added note about explanation.
Link to comment
Share on other sites

Try it without a Master page, just put all elements on a normal page

What do you see?

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

Exactly, so what has this to do with

38 minutes ago, GarryP said:

This doesn’t seem right to me. Surely the master spread layers and their related effects should be drawn within the sequence defined by the Layers panel. 

There may be a question that needs answering in your post but it's not the one you asked

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

Nope: Try changing the colour of the glow from black to other colours, including white

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

Ah...

Well, now I think the question should be: “Why don’t I figure out what the tools do and how to use them?”

For anyone else wondering, the "problem" is that the Outer Glow effect uses a blend mode of Screen by default.
This means that the Outer Glow will use the calculations of the Screen blend mode to determine which colour to display.

The calculation for the Screen blend mode is: f(a,b)=1-(1-a)(1-b) where ‘a’ and ‘b’ are the colours of the pixels in the range 0 (Black) to 1 (White).
My Yellow colour is hex E5F20D which gives decimal RGB values of 229, 242, and 13.
Converting these to values between 0 and 1 we get: 0.8980, 0.9490, and 0.0509 (to four decimal places).
The Outer Glow is Black so its values are 0, 0, and 0.
Calculating the R portion of the colour we have: f(0.8980,0) = 1-(1-0.8980)(1-0) = 0.8980.
Calculating the G portion of the colour we have: f(0.9490,0) = 1-(1-0.9490)(1-0) = 0.9490.
Can you see the where this is going?
Calculating the G portion of the colour we have: f(0.0509,0) = 1-(1-0.0509)(1-0) = 0.0509.
Converting these values back to byte values we get 229, 242 and 13, which is hex E5F20D, and that's my original colour Yellow.
So, basically, using an Outer Glow of Black with a Screen blend mode will simply show the colour it is drawn onto, which is what I get, which is why the effect looks like it is drawn first as everything else, every other colour, is essentially ignored by a Screen blend mode with Black.

Also, if anyone is wondering why I can still see the Black glow against the White page – surely f(1,0) = 1-(1-1)(1-0) = 1-(0)(1) = 1, which is White? - it’s because the White page doesn’t really exist. It looks White but there’s nothing there and you can’t apply a blend mode to nothing.

P.S. Changing the blend mode of the Outer Glow to Normal, in this specific case, fixed it.

Link to comment
Share on other sites

7 minutes ago, GarryP said:

basically, using an Outer Glow of Black with a Screen blend mode will simply show the colour it is drawn onto

More generally, ‘Screen’ blend mode will show the lightest colour at each pixel position. So blending between black and a colour will always give you the colour, whereas blending between white and a colour will always give you white.

’Multiply’ blend mode works the other way around. Blending between white and a colour will always give you the colour, whereas blending between black and a colour will always give you black.

 

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

Just in case it is helpful, here is a link to a PDF that I produced. I had written some, but not all, of a chapter for a novel and I wanted to publish it and get it stored in the British Library. Yet I wanted to clearly distinguish the draft version as a draft.

http://www.users.globalnet.co.uk/~ngo/localizable_sentences_the_second_novel_chapter_008_draft_3.pdf

So using PagePlus I put the text

Draft 3

on the master page in colour and in a large size and I produced a PDF. The colourful lettering is behind the text of the chapter itself.

I had not even thought about it, I just expected the text from the master page to be behind the text of the chapter. I only thought about it when I saw the title of your thread.

As the colour of the wording on the master page is rather pale, just to make sure I have now got a copy of the original source of the document and made the words Draft 3 bright green (r=0, g=255, b=0) and produced a PDF. The colourful lettering is behind the text of the chapter.

How are you assessing your example? Is it in a PDF? If not, what happens with a PDF please?

William

 

Until December 2022, using a Lenovo laptop running Windows 10 in England. From January 2023, using an HP laptop running Windows 11 in England.

Link to comment
Share on other sites

Alfred: Thanks for the more general explanation. I wish there was more in the documentation about this sort of thing. All I can find is: “Screen - The opposite of Multiply, where the blending result is a combination of the inverse of the top and bottom colour at each pixel position, always producing a lighter value.” which isn’t very informative to someone like me. Once I get to phrases like “the blending result is a combination of the inverse” I get distracted by the birds in the garden.

William: The “problem” I had was just me trying to do something fancy but not using tools correctly and getting myself confused. The layers are drawn in the order they are in on the Layers panel. I had no intention of using PDFs – it was an experiment – so I didn’t check. I imagine what shows on screen is what you should get on PDF (for most intents and purposes, but I suppose there could be exceptions).

Link to comment
Share on other sites

Thanks Alfred. There’s some good information in there – I used Wikipedia earlier – and I especially like the way they explicitly say things like “Screening with black leaves the color unchanged.” Even if I don’t know what else is going on, that at least tells me something I can use. Bookmarked for a more leisurely read later.
I still think the Affinity documentation could be a bit more helpful; most of the blend modes aren’t explained at all. Just listing what is in the menu isn’t the best way to document something.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.