FORUMS: list search recent posts

Remove semitransparent foreground elements - Thoughts on how to approach this [repost from the Adobe Forums]

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Thomas Frenkel
Remove semitransparent foreground elements - Thoughts on how to approach this [repost from the Adobe Forums]
on Sep 13, 2016 at 2:56:22 pm

Hello guys,

I would like to ask for a second opinion on this topic:
https://forums.adobe.com/thread/2207110

I'm either too dull or just misunderstood. The last post should definately clarify, what this is all about. Please enlighten me.


Return to posts index

Dave LaRonde
Re: Remove semitransparent foreground elements - Thoughts on how to approach this [repost from the Adobe Forums]
on Sep 13, 2016 at 4:21:31 pm
Last Edited By Dave LaRonde on Sep 13, 2016 at 5:23:08 pm

While perhaps plausible in theory, it looks like an exercise in futility to me.

Here's a viewpoint in a similar vein: back about 20-25 years ago, video in NTSC-land was commonly 640x480 with 8-bit color, not counting the alpha channel. It's numerically possible to develop an array of every permutation of the color of every pixel. Thus, you could recreate every image ever done in those particular dimensions from that data alone.

Here's an other one: drop some ink into a bowl of swirling water. Since the laws of physics and hydraulics are well-known, it is conceivable to reconstitute the bowl of water and the ink to their original states prior to dropping the ink.

It's POSSIBLE to do them both. Is it practical? Good Luck!

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Thomas Frenkel
Re: Remove semitransparent foreground elements - Thoughts on how to approach this [repost from the Adobe Forums]
on Sep 13, 2016 at 5:58:36 pm

"While perhaps plausible in theory, it looks like an exercise in futility to me.

Here's a viewpoint in a similar vein: back about 20-25 years ago, video in NTSC-land was commonly 640x480 with 8-bit color, not counting the alpha channel. It's numerically possible to develop an array of every permutation of the color of every pixel."


Something similar was stated at the Adobe forums. And I want to believe you. But I just don't understand it technically.

"Here's an other one: drop some ink into a bowl of swirling water. Since the laws of physics and hydraulics are well-known, it is conceivable to reconstitute the bowl of water and the ink to their original states prior to dropping the ink."


This sounds like the process I have in mind is either incredible slow (performance-wise) or demands a lot of finetuning by the user. But I can't see it.

Performance:
As I clarified in my 4th post at the Adobe forums, I don't want to automate this process with algorithms or something like this. It's really just a simple blend mode calculation that would do the job:

this is the normal blending mode calculation:
If you assume 'A' is the top layer, 'B' is the lower layer and their alphas are 'a' and 'b' respectively then the resulting color 'D' is:
D=A*a + B*b*(1-a)

and this is the calculation I have in mind:
D=(B-A*a)/b*(1-a)

Yes, it does have to be calculated for every pixel, but so does the normal blend mode, doesn't it? I'm not much into coding, but this shouldn't make a big difference in render times.


User Input:
When you use this new blend calculation, your bottom layer would be the footage with watermark and the top layer would be your recreation of the watermark with this mode active. Now recreating the object, watermark etc can take some time depending on its complexity. But you can live preview it while masking, drawing or changing the opacity and color...roughly or precisely. To me that'd be pretty handy.


Return to posts index


Dave LaRonde
Re: Remove semitransparent foreground elements - Thoughts on how to approach this [repost from the Adobe Forums]
on Sep 13, 2016 at 6:21:24 pm
Last Edited By Dave LaRonde on Sep 13, 2016 at 6:28:00 pm

Tell you what: just do it. Show us before and after video.
If you're sold on the concept, quit theorizing and start acting. You may have, after all, uncovered a valuable new technique. There may be money to be made by you!

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Kalleheikki Kannisto
Re: Remove semitransparent foreground elements - Thoughts on how to approach this [repost from the Adobe Forums]
on Sep 13, 2016 at 7:36:36 pm

It seems to me you should be able to create a channel-wise curves adjustment based on your formula and apply the resulting curves effect to the watermark area.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Kalleheikki Kannisto
Re: Remove semitransparent foreground elements - Thoughts on how to approach this [repost from the Adobe Forums]
on Sep 14, 2016 at 5:44:27 am
Last Edited By Kalleheikki Kannisto on Sep 14, 2016 at 6:25:08 am

Even better, this simple case is a linear function which means you can use it to calculate the black and white points for the levels adjustment if you know the original color and transparency.

To take this out of the realm of the theoretical, I took your original screen image with the green circle and used the levels adjustment (in Photoshop) to take out the circle. Your formula should solve the black and white points for the levels adjustment for the RGB channels and result in an adjustment that removes the overlaid color.



This means you could use the formula to set the input black and input white values for the RGB channels with the Levels (Individual Controls) Effect.

That's the good news, the bad news is that I don't think it will be significantly easier than directly using the Levels control, at least not in those cases where the original color and transparency values are not known.

But it might be worth a shot.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index


Walter Soyka
Re: Remove semitransparent foreground elements - Thoughts on how to approach this [repost from the Adobe Forums]
on Sep 14, 2016 at 1:37:57 pm

Kalle's on the good track with levels adjustments -- but is normal blend mode mathematically reversible? Let's do a quick thought experiment.

Imagine you have a layer of footage and a black solid over the top of it, blended normally at 99%. Assuming 8bpc, your footage started out with a theoretical range of 0-255 per channel, per pixel. Now, with the black solid blended on top, your composite has a theoretical range of 0-3 per channel, per pixel. If you attempt to reverse the blending operation, an input of "3" from your composite could be anything from 191 to 255. You can't know what that value should be. Any function that maps many input values to the same one output value is irreversible.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Thomas Frenkel
Re: Remove semitransparent foreground elements - Thoughts on how to approach this [repost from the Adobe Forums]
on Sep 14, 2016 at 1:55:41 pm

Kalle's approach doesn't work, if the watermark or foreground object consists of more than one color. But it is a great start that I didn't think of, nonetheless. I wanna dive more into the blending mode stuff ;). Maybe I can develop something with Processing, since introducing new blend modes to After Effects/Photoshop seems impossible.


Walter, what you describe is the quantization, that I already mentioned at the Adobe forums (my 4th post). The formula gets increasingly unprecise, the more opaque the watermark is. And of course it's impossible, when the watermark is at 100%. I guess this is a non-linear thing. In my test with 30% opacity, the value of the green channel was just off by 1/255 and the other colors got reproduced perfectly.


Return to posts index

Kalleheikki Kannisto
Re: Remove semitransparent foreground elements - Thoughts on how to approach this [repost from the Adobe Forums]
on Sep 15, 2016 at 5:28:46 am

[Thomas Frenkel] "Kalle's approach doesn't work, if the watermark or foreground object consists of more than one color. "

Nor does it work if the blending mode is something else than normal. It is for the simplest of cases only, one color, normal blend, with decreasing accuracy as the opacity of the overlay goes up.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index


Thomas Frenkel
Re: Remove semitransparent foreground elements - Thoughts on how to approach this [repost from the Adobe Forums]
on Sep 15, 2016 at 7:19:09 am

I guess it does work with other blending modes, as long as the user can identify them right. Again you, as the user, have to guess which blend mode was used and input that information for the process. In my example I solved the formula of the normal blending mode to "B=" (the color value of the bottom layer). You can do the same with other blending modes too to get the right formula for each case.

Now here are the restrictions that probably occur with this:
- On many modes like "multiply" or "add" color values are clipped to black or white (at least in 8bpc). If that's the case they can't be brought back.
- blend modes that consist of if-else statements can't be reversed.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]