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

Procedural Texture is not clipped to parent layer (for curve objects or pixel layers not filling the canvas)


Zero1

Recommended Posts

When a procedural texture is applied to a curve object (eg. a rectangle) and the alpha value is changed (eg. 0.5), i would expect it would only affect the curve object's alpha, however the alpha is also applied to the layers below. When i lower the alpha of the rectangle with a curves adjustment, it only affects the rectangle as expected.

See the screenshot, where on the left, the alpha of a red rectangle is halved with a curves adjustment. The blue background is not affected. However doing the same with the procedural texture (live) filter on the right, the alpha of the blue background is also affected.

Initially I thought this only happened with the Alpha, but the bug also exists with RG or B. Then i rasterized the rectangle and applied the procedural texture again and it still happens. So it looks like the procedural texture (live) filter propagates down for the transparent areas even though it has applied as clipping layer. I would expect, because it is a clipped child it would only affect the parent (like the curves adjustment).

I assume this is a bug unless i am missing something here?

 

PS. Using the latest v2.04 (mac)

SCR-20230201-l2v.png

Link to comment
Share on other sites

  • 2 weeks later...
  • Staff
On 2/2/2023 at 4:17 PM, Lisbon said:

The video may be of interest but the problem remains. Full transparency around the rectangle should not be replaced by 50% opacity black.

I think this is just to do with how you are 'clipping' the Procedural Texture layer to the rectangle layer.  For layer clipping, you need to drag the Procedural Texture Layer over the layer name of the other layer, on the Layers panel, in this case, Rectangle.  When it doesn't work in your recording, you are dragging the Procedural Texture Layer over the Thumbnail Layer, which isn't layer clipping.

If i've misunderstood the issue, please do attach your afphoto file with it in the state where its not working.

Link to comment
Share on other sites

Hi @stokerg

2 hours ago, stokerg said:

When it doesn't work in your recording, you are dragging the Procedural Texture Layer over the Thumbnail Layer, which isn't layer clipping.

This was intentional on my part. Just to show on how Procedural Textures (PT) affect according to their current position.

2 hours ago, stokerg said:

If i've misunderstood the issue, please do attach your afphoto file with it in the state where its not working.

Personally I know how to work around the problem as I demonstrated in the video.
But in the specific case of rectangles like in the @Zero1 example I don't think the area around it should be replaced by some color.
I think that there isn't supposed to be anything around shapes. When I say nothing I am including RGB+A data.
If that were the case the surrounding arround the rectangle would never be replaced by 50% opacity black. Regardless of whether I drop the PT filter in the right position or not.

PT.png.a2841cd53d894d4fd1ed677ee9f26cec.png

(The bottom PT filter is in the wrong position - Transparency arround rectangle replaced by 50% opac. black)

Link to comment
Share on other sites

On 2/1/2023 at 3:27 PM, Zero1 said:

When a procedural texture is applied to a curve object (eg. a rectangle) and the alpha value is changed (eg. 0.5), i would expect it would only affect the curve object's alpha,

This assumptions / expectation is wrong.

When putting a layer into child position (clipping), it will clip only RGB values, but all adjustments and filters which can modify alpha will "escape" the clipping. If you raise alpha above 0, you get color values either based on old values from source, new from filter (blur / distort), or black (zero) by default.

You can try:

  • Curves, channel mixer, levels: choose alpha channel, and set an offset / lift the left node / increase  output black
  • distortion filters like ripple, motion blut etc
  • last but not least the PT filter.

Escaping a base shape is essential functionality, otherwise blur and distortion filters would not work. Some filter, including PT filter, have "preserve alpha" modifier specifically to deactivate if unwanted (but this deactivates inside and outside of parent shape)

Then nesting (alpha modifying) adjustment layers to masking positions, you get rendering issues, this is an actual bug.

 

If you want to clip a PT filter, add the following to the alpha formula:

(.. .your formula ...)*step(0,A)

 

 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

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.

 

Link to comment
Share on other sites

What Affinity lacks of is an option to choose which color/alpha channels gets impacted for any layer type, and layer blending. 

 

When working destructively, you have channels panel.

For non-destructive workflows, you have no comparable function. The alpha channel always gets "special treatment" which cannot be modified. RGB channels can be "excluded" in limited circumstances using channels mixer adjustment with settings to map selected channels to a neutral colour depending on blend mode (like add, average, normal).

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

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.

 

Link to comment
Share on other sites

On 2/1/2023 at 2:27 PM, Zero1 said:

I assume this is a bug unless i am missing something here?

Whether the result should be classed as a bug or not, I don't know, but I can explain what is happening.

A live filter/adjustment operates on an on-the-fly rasterisation of whatever object it is applied to. That raster object covers the entire canvas, and its pixels are black with alpha of zero wherever the source object did not exist. If the filter/adjustment increases the alpha of those hidden black pixels, the pixels become visible to some degree, blending with the underlying scene, unless they are excluded by clipping by the object which is parent to the filter/adjustment.

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.