Transform Node Messes Up Alpha Channel Manipulation #57568

Open
opened 2018-11-01 19:08:12 +01:00 by Thomas Downs · 8 comments

System Information
Arch Linux
Nvidia 750ti

Blender Version
Broken: 2.79 (Tried 2.8 as well and I have the same issue)

As referenced here:
https://blenderartists.org/t/filters-unintentionally-crop-transformed-image/1132477/4

When I take an image in the compositor and scale it up 2x or whatever and then separate the RGBA and dilate/erode the alpha and use that to set the alpha on the image, it only works within the size of the original image and not the scaled up image. Also even if I use the R, G, or B, it still only uses the size of the original image and not that of the scaled up one.

problem1.png

Cropped if I try to mess with the alpha after a transform.
problem2.png

Uncropped if I mute my changes to the alpha.
problem3.png

Also I believe that if you scale down

dilatecropissue.blend

**System Information** Arch Linux Nvidia 750ti **Blender Version** Broken: 2.79 (Tried 2.8 as well and I have the same issue) As referenced here: https://blenderartists.org/t/filters-unintentionally-crop-transformed-image/1132477/4 When I take an image in the compositor and scale it up 2x or whatever and then separate the RGBA and dilate/erode the alpha and use that to set the alpha on the image, it only works within the size of the original image and not the scaled up image. Also even if I use the R, G, or B, it still only uses the size of the original image and not that of the scaled up one. ![problem1.png](https://archive.blender.org/developer/F5327471/problem1.png) Cropped if I try to mess with the alpha after a transform. ![problem2.png](https://archive.blender.org/developer/F5327470/problem2.png) Uncropped if I mute my changes to the alpha. ![problem3.png](https://archive.blender.org/developer/F5327469/problem3.png) Also I believe that if you scale down [dilatecropissue.blend](https://archive.blender.org/developer/F5327448/dilatecropissue.blend)
Author

Added subscriber: @tnelsond

Added subscriber: @tnelsond
Member

Added subscribers: @Jeroen-Bakker, @brecht, @lichtwerk

Added subscribers: @Jeroen-Bakker, @brecht, @lichtwerk
Member

I guess this is known limitation of the compositor (but I am not sure).
Workaround is (as you said) to first do the erosion first, then the scaling.

@Jeroen-Bakker, @brecht : could you comment? [not sure if we can close this as a "known limitation"?]

I guess this is known limitation of the compositor (but I am not sure). Workaround is (as you said) to first do the erosion first, then the scaling. @Jeroen-Bakker, @brecht : could you comment? [not sure if we can close this as a "known limitation"?]
Author

Working around it would be easier if the dilate/erode node had an input for step value.

Working around it would be easier if the dilate/erode node had an input for step value.

Added subscriber: @mano-wii

Added subscriber: @mano-wii

This seems to be a problem specific of the Dilate/Erode node.
I think it deserves an investigation before it is considered a Known Issue.
But I fear that no one will work on it for the upcoming 6 months.

This seems to be a problem specific of the `Dilate/Erode` node. I think it deserves an investigation before it is considered a `Known Issue`. But I fear that no one will work on it for the upcoming 6 months.

Added subscriber: @manzanilla

Added subscriber: @manzanilla

I've seen the compositor implementation and seems to me that this behaviour is by design.
When you scale up, the resolution keeps being the same, it just scales the image within the resolution canvas and that's why it gets cropped.
The confusion comes from the fact that dilate/erode is buffered and the other nodes are not.

If you scale up before dilate/erode (or any buffered node), scaling takes effect with the input image resolution after this node finishes and image is cropped (in this case the applied alpha).
If you do scaling after dilate/erode, scaling will be done within the composite resolution which is the output resolution, which in this case is bigger than the input image resolution and that's why it doesn't appear cropped.

I agree this behaviour is very confusing for the user. If all operations were buffered it would just always get cropped which is what should happen taken into account that scaling doesn't resize resolution canvas.
To avoid cropping when scaling up, there could be an option to allow the user to resize the canvas too, but to give the user the power to increase resolution would mean that he can make the compositor hang easily with huge resolutions.

But all this is a compositor design decision.

I've seen the compositor implementation and seems to me that this behaviour is by design. When you scale up, the resolution keeps being the same, it just scales the image within the resolution canvas and that's why it gets cropped. The confusion comes from the fact that dilate/erode is buffered and the other nodes are not. If you scale up before dilate/erode (or any buffered node), scaling takes effect with the input image resolution after this node finishes and image is cropped (in this case the applied alpha). If you do scaling after dilate/erode, scaling will be done within the composite resolution which is the output resolution, which in this case is bigger than the input image resolution and that's why it doesn't appear cropped. I agree this behaviour is very confusing for the user. If all operations were buffered it would just always get cropped which is what should happen taken into account that scaling doesn't resize resolution canvas. To avoid cropping when scaling up, there could be an option to allow the user to resize the canvas too, but to give the user the power to increase resolution would mean that he can make the compositor hang easily with huge resolutions. But all this is a compositor design decision.
Philipp Oeser removed the
Interest
VFX & Video
label 2023-02-10 09:32:15 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#57568
No description provided.