CM0 Posted September 12, 2023 Share Posted September 12, 2023 Using Affinity for several years and spending hours in it per day, I have been constantly troubled by inexplainable behaviors that when reported never seem to have adequate explanation. Is it a bug or working as intended but in some bizarre way? Well, I just spent many hours over the weekend finally attempting to map out in detail how everything is rendered in hopes to bringing some sanity to my understanding. The exercise has been beneficial in that I can now finally explain many of the oddities; however, I can't confirm whether they are intended, but can point to why they occur. I hope that Affinity could confirm/document the true rending order. This is very important as it helps us to understand how to properly create compositions as well as sort out bugs from simply lack of understanding. The exercise of documenting would also likely bring to light some of the non-intuitive behaviors such that hopefully they could be addressed. It would be great if the rendering were simple, something such as child layers > current layer, FX, blend ranges etc. However, what I discovered is that it is anything but simple. This is my best attempt so far, it may not be perfectly accurate, but has been good enough to explain all of the odd behavior I have seen. Rendering pipeline order and rules Child layers of group (if passthrough) bottom of stack is rendered on top of layer below group layer rasterizing this layer may result in a different blend.use merge down or merge visible to retain original on screen view. (else all other color blend modes) The bottom stack starts as if on top of transparent. this is why for the bottom layer of the group, its blend mode will usually have no effect and blend ranges for underlying will have no effect as there is nothing to blend with. Transparency tool effect and Masks Adjustment layers | Live Effect layers Layer FX ( rendered to temporary FX layer ) Exception - Gaussian blur will result in immediate merge down as well as blend range underlying being applied to source instead. Exception - when combined with of the following then will be applied later after underlying blend ranges Other layer FX Preserve Alpha Current layer is any blend mode other than ‘normal’ Exception - Child layers Effects are applied to the child layers after child step 4. Or in other words, applied after layer FX merge down. So blend ranges underlying blend is not utilized from children when layer FX are rendered. The fully rendered result of children is not used! Blend Ranges ( source blend ) Exception - Gaussian blur disables source blend unless combined with another FX or preserve alpha. Exception - ignored if Live layer is applied to current layer and current layer is an image layer. Layer FX previous rendering from step 2 merged down Blend Ranges ( underlying blend ) Exception - This operation skipped when Gaussian blur enabled unless combined with another FX, preserve alpha or blend mode other than ‘normal’ Exception - ignored if Live layer is applied to current layer and current layer is an image layer. Layer FX ( Gaussian blur exception ) Gaussian blur applied at this step when combined with other FX, preserve alpha or blend mode other than ‘normal’ Merge using blend mode (Multiply, Screen etc) I have found additional oddities, but still can't sort out the rules yet. For example Bevel, outline, outer glow and outer shadow all render in a different way than the other FX in certain conditions, but can't yet articulate the reason. These are some major notable observations from the above: Gaussian blur seems to be the greatest offender of unexpected behavior. So much so it actually changes the rendering order and will completely flip the blend ranges depending on certain conditions. Rendering does not seem to be serial. It is interwoven or forked. See step 4 layer FX. This adds substantial confusion when trying to figure out what is the right order for an effect you imagine. It also makes some combinations impossible. Live FX completely breaks blend ranges applied on a pixel layer. I have refrained from specifically listing anything as a bug although I doubt anyone finds the above as desirable. What I hope is that we could finally officially document what is supposed to happen and from there figure out how to improve this to something that works as desired and is intuitive whether we call it bugs or enhancements we just need solutions. I make a lot of complex compositions and the above always costs me hours of work attempting work arounds for unexpected behaviors. Attached is a test file I used to evaluate much of the above. The key parts is that it has blend ranges for both source and underlying applied in a way that is easily recognizable. There is a character '1' on a blue gradient background and it is blended such that the top of the one is transparent for the source blend ranges and the bottom is transparent due to the bottom blend ranges. Experiment with applying FX directly to the image or parent group in different combinations. Render order testing.afpub Bryan Rieger 1 Quote Link to comment Share on other sites More sharing options...
CM0 Posted September 14, 2023 Author Share Posted September 14, 2023 Has anyone had an opportunity to review or consider? Can we at least start discussion with the Gaussian blur issues? Quote Link to comment Share on other sites More sharing options...
Bryan Rieger Posted September 14, 2023 Share Posted September 14, 2023 @CM0 thanks for sharing this, as I'm often left wondering how and why layer FX render as they do. While this doesn't solve the problems, it does help develop an understanding of what works, what doesn't and how to approach using layer FX. CM0 1 Quote Link to comment Share on other sites More sharing options...
Staff DWright Posted September 15, 2023 Staff Share Posted September 15, 2023 Thank you for the information and I have passed the information along to the relevant team CM0 1 Quote Link to comment Share on other sites More sharing options...
CM0 Posted April 11 Author Share Posted April 11 Any feedback or status on these issues? Could we at least prioritize someone looking into the Gaussian blur bugs as they are the most impactful and break so many use cases? 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.