Bad seams with Keying node #32790

Closed
opened 2012-10-06 07:32:58 +02:00 by David M · 8 comments

%%%Hi all,

the new Keying node has a problem with colored edges after pulling a matte from a "perfect" greenscreen.
The attached file shows the problem.

I believe this can be done better, I will attach a patch soon.

till then, David.
%%%

%%%Hi all, the new Keying node has a problem with colored edges after pulling a matte from a "perfect" greenscreen. The attached file shows the problem. I believe this can be done better, I will attach a patch soon. till then, David. %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

%%%Here is a patch for the problem.

A couple of notes:

This works better because the factor fabsf(1.0f - val) is taken out of the saturation
equation, making it linear. This creates a different problem, unsaturated colors are not
keyed anymore, this is fixed by adding a maximum norm luminance key after the
saturation key. This should also make the overexposure check redundant. Lastly, the
if block is replaced by a CLAMP macro, making it much shorter.

I have done quite a lot of tests of this method, and I feel that keyers in other software
work similarly (especially concerning the linear nature of the key, resulting in clean
mattes in perfect conditions).

thanks, David.%%%

%%%Here is a patch for the problem. A couple of notes: This works better because the factor fabsf(1.0f - val) is taken out of the saturation equation, making it linear. This creates a different problem, unsaturated colors are not keyed anymore, this is fixed by adding a maximum norm luminance key after the saturation key. This should also make the overexposure check redundant. Lastly, the if block is replaced by a CLAMP macro, making it much shorter. I have done quite a lot of tests of this method, and I feel that keyers in other software work similarly (especially concerning the linear nature of the key, resulting in clean mattes in perfect conditions). thanks, David.%%%
Author

%%%Attached an image showing the old key, the source and the new key (in that order).%%%

%%%Attached an image showing the old key, the source and the new key (in that order).%%%

%%%Regarding the patch, I suggest not using macros this way, because this gets expand and the math operations will be done more times. Also means the comments are lost.

Probably this patch needs some good tests on Mango shots, I know Sergey experimented with many formulas so there might be a reason this code is here.%%%

%%%Regarding the patch, I suggest not using macros this way, because this gets expand and the math operations will be done more times. Also means the comments are lost. Probably this patch needs some good tests on Mango shots, I know Sergey experimented with many formulas so there might be a reason this code is here.%%%
Author

%%%Thanks for looking at the patch. I attached a new version that fixes the issue with the macros.
In my opinion the comments are not really that useful, as the first one does not apply anymore,
and the others basically say "clamp to 0-1 range".

I tested this with two of the mango shots, and various other shots in my own projects and I
feel the results are consistently better, especially when combined with a screen subtraction
(hint at my other patch: http://projects.blender.org/tracker/index.php?func=detail&aid=32797&group_id=9&atid=127 ).
%%%

%%%Thanks for looking at the patch. I attached a new version that fixes the issue with the macros. In my opinion the comments are not really that useful, as the first one does not apply anymore, and the others basically say "clamp to 0-1 range". I tested this with two of the mango shots, and various other shots in my own projects and I feel the results are consistently better, especially when combined with a screen subtraction (hint at my other patch: http://projects.blender.org/tracker/index.php?func=detail&aid=32797&group_id=9&atid=127 ). %%%

%%%Hi,

Checked the patch. It behaves better with the scene you've attached, and behaves pretty much the same on mango files. However, I wouldn't consider it behaves much better in plates from holllywood camera works. You could check it on "godiva medium" and "simple shadow extraction" plates from http://www.hollywoodcamerawork.us/greenscreenplates.html i.e.

From what i understand, you can not actually have single formula which would always performs good, perhaps it should be an option which formula to use.%%%

%%%Hi, Checked the patch. It behaves better with the scene you've attached, and behaves pretty much the same on mango files. However, I wouldn't consider it behaves much better in plates from holllywood camera works. You could check it on "godiva medium" and "simple shadow extraction" plates from http://www.hollywoodcamerawork.us/greenscreenplates.html i.e. From what i understand, you can not actually have single formula which would always performs good, perhaps it should be an option which formula to use.%%%

%%%Still not sure its actually a bug, just some case where current formula doesn't work well. I would prefer to have new formula as an option and also would ask to move to the bug tracker for further discussion.%%%

%%%Still not sure its actually a bug, just some case where current formula doesn't work well. I would prefer to have new formula as an option and also would ask to move to the bug tracker for further discussion.%%%

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
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
3 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#32790
No description provided.