Activity › Forums › Adobe After Effects › Despilling like Keylight with standard AE tools
-
Despilling like Keylight with standard AE tools
Posted by __peter__ on June 6, 2007 at 9:47 pmHello,
is there a way for such high quality despilling like Keylight does, just with on board Aftereffects tools ?
I’ve read “Digital Compositing for Film and Video” by Steve Wright and cleary understand such concepts like green limited by red, but how to do this in AE? There is no such thing as a “math node”If I want to keep the pixel values of blue and red unless it would be higher than green … how to do that in AE ?
As said, I also appreciate any other despilling methods.
Oh yes … you might wonder “why not using keylight ?”
Well, I do, but sometimes it’s not only interesting to understand the underlying principles but that often helped me out when problems arise.
So thank you for any ideas, tips and tricks !
Peter
Darby Edelen replied 18 years, 11 months ago 4 Members · 9 Replies -
9 Replies
-
Chris Zwar
June 6, 2007 at 9:57 pmI’m only thinking out loud, so I could be quite wrong.
But basically the correction itself is probably just a levels adjustment, so depending on whether you’re using blue or green screen just tweak individual channels accordingly.
If you want to get more complex, then apply the levels filter to an adjustment layer, then duplicate your keyed layer and use it as a track-matte for the adjustment layer, perhaps applying a second key to pick out spill colours, or an edge detection plug-in, or other secondary keys to pick out the regions which are giving you grief. This way the adjustment is only being applied to the areas you have keyed out in your duplicate layer.
That may work. Personally, I’d just use the AE “Spill Suppressor”. It’s always done the job for me…
-Chris
-
Darby Edelen
June 6, 2007 at 11:23 pmI have to admit that I haven’t looked at this in depth yet, maybe I’ll get a chance to soon (I don’t work with green screen footage very much). However, given your ‘Math Node’ comment I can recommend that you look at some of the Channels effects. It might be a bit convoluted to get where you want to be, but the tools might be there.
I suggest looking at the Channel>Arithmetic effect. This gives you a range of operations to perform on the Red, Green and Blue channels using arbitrary limiting numbers. Also look at the Channel>Compound Arithmetic effect, this gives the same range of operations to perform on the RGB channels, but bases the operation on a 2nd source layer (add the values of the RGB channels from one to another, subtract, multiply, bitwise logical operators). You could also split the image into 2 pre-comps and use Shift Channels to create one containing the Green channel only and the other containing Red and Blue, or any other combination (if that would be useful).
[_Peter_] “If I want to keep the pixel values of blue and red unless it would be higher than green … how to do that in AE ?”
I’m not familiar enough with the actual formula used in despilling a green screen shot, although I believe I have some books at home I could look to for reference. If I’m able to figure out the operations generally used to despill, I might be able to come up with a more precise prescription for After Effects.
Darby Edelen
DVD Menu Artist
Left Coast Digital
Aptos, CA -
Majorasshole
June 7, 2007 at 12:23 amFrom a strictly untechnical point of view. The one thing other than just spill suppression that Keylight does is take the key color out of the specular reflections in your footage. So if a person was wearing a leather jacket and had a subtle greenish tinting to the shiny spots in the leather it will take that green out. You can simulate this with color correction, but keylight automates the feature.
-
__peter__
June 7, 2007 at 7:08 amThanks so far …
it could also be some kind of a chroma key process just to isolate the regions that need a green reduction. Not to confuse with the principle of difference matte that keylight uses for pulling the matte – as far as I know.
But I am still focusing on that mathematical approach.
So especially for Darby Edelen:One formula could be:
Every pixels green value keeps it’s value UNTIL is is equal or more than the red value for that pixel. If it is more, then limit that green value to the same value than red.I also wonder: Is there a way of using the script language for such math on pixels and chanels ?
Thanks!
Peter
-
Darby Edelen
June 7, 2007 at 3:27 pm[_Peter_] “Every pixels green value keeps it’s value UNTIL is is equal or more than the red value for that pixel. If it is more, then limit that green value to the same value than red.”
I haven’t tried this yet, but I will soon. I think one way you could go about this is by using a Compound Arithmetic effect to pull a ‘matte’ for the areas in which there is more green than red or blue and then use this as a matte for a duplicate layer that reduces the green values in those areas to that of the red… Sounds simple on paper, not sure what it will involve yet in AE.
Darby Edelen
DVD Menu Artist
Left Coast Digital
Aptos, CA -
Darby Edelen
June 7, 2007 at 5:03 pmI think I have a pretty decent result using a combination of the Levels, Shift Channels, Arithmetic and Compound Arithmetic effects. My sample requires 2 pre-comps, one has the green channel only and the other has the red & blue channels shifted to the green channel (the Compound Arithmetic effect is limited to comparing Red to Red, Green to Green, Blue to Blue, and must use all three channels during the operation).
I then subtracted the red & blue channel values from the green channel values, so any areas that have more green than red & blue will become green, then I shifted the green channel to RGB giving me a matte of the channel subtraction. On this matte layer I applied a Levels effect at the top of the effects stack to control the intensity of the despill (higher gamma values = more despill).
I then used this matte layer as a luma matte for an adjustment layer where I applied an Arithmetic effect to subtract 255 from the Green values.
I know, it’s not quite what you wanted as it doesn’t set the green value explicitly to the value of red, but it does give you control over the amount of despill via the levels effect or an optional Null Controller (and isn’t that enough?!) =)
If you want the AEP, I can e-mail it to you.
Darby Edelen
DVD Menu Artist
Left Coast Digital
Aptos, CA -
Darby Edelen
June 7, 2007 at 7:01 pmI went ahead and uploaded an AEP to a file sharing service.
Things to look at while playing with the Despill Controller are the areas in the hair and shadows that have a green tint to them in the source footage.
You can replace the image in the alex-gs composition (random image I found online) with any footage and it should update throughout all of the pre-comps.
https://www.mediafire.com/?2nsdyfxitdo
Darby Edelen
DVD Menu Artist
Left Coast Digital
Aptos, CA -
__peter__
June 7, 2007 at 7:16 pmThanks!
Meanwhile I did something similar. But such big nested compositions are really impractical for a simple despilling. So all in all, I guess there is no simple way in AE. It’s realy a shame, that AE doesn have a real math “node” or effect. It would make it so easy.
Thanks for Your investigations 🙂
Still there is that question, if the scripting language of AE allows such things.
Peter
-
Darby Edelen
June 7, 2007 at 7:35 pm[_Peter_] “But such big nested compositions are really impractical for a simple despilling. So all in all, I guess there is no simple way in AE.”
This is pretty much true, but note that with the pre-composition method all you need to do is replace the footage in the source composition and everything else updates in the final composition.
It’s a more legwork to setup, but once the framework is there it’s drag and drop.
You can save that .aep I uploaded as a .aet if you want and load it for despilling, just replace the footage… Or use keylight (;
Darby Edelen
DVD Menu Artist
Left Coast Digital
Aptos, CA
Reply to this Discussion! Login or Sign Up