Chroma Keying removing ALL green

Alonzorion wrote on 12/14/2018, 8:09 AM

Is there a way to stop chroma keying on Vegas from draining all the green out of the areas where the green screen ISN'T? As an example here's some images below before, and after chroma keying, as you can see as a result of chroma keying it's made my clothing look unnaturally blue since all the green tones are absent. I tried playing with the sliders but couldn't achieve anything desirable.

Thanks for the help!

Comments

Grazie wrote on 12/14/2018, 8:29 AM

1) Maybe you’ve got Reflected Green Light Spill. Looks like you’ve got your Green Screen close to your back.

2) How did your Black and White Mask look? Always good to check.

Alonzorion wrote on 12/14/2018, 8:53 AM

1) There is quite a lot of green light spill for sure but no other programs aside Vegas seems to drain all the green out of anything other than the target, if that makes sense?

2) The black and white mask is perfect. Very clear black and white!

Thank you Grazie!

Marco. wrote on 12/14/2018, 9:19 AM

There is an issue/bug in the Vegas Pro Chroma Keyer since its first days. It cannot replace certain colors without shifting another color though looking at the black/white mask it seems to be perfectly separated. This is true e.g. for clean green which will also affects cyan to turn blue. And this is what seems to happen in your example. Thus you probably just can't use that chroma keyer.
Instead you could try using Color Corrector Secondary with its alpha mask option which often gives much better results than the legacy Chroma Keyer. Or you need to use a 3rd party plug-in keyer such as the very good Chroma Keyer of Ignite Pro.

Example:

The upper side of the pic is the source frame (a standard color bar). After having used the Chroma Key on the lower side of the pic you see the mask which only affects the green bar.

Now deselecting the mask in the keyer you still would expect only the green bar would affect the frame but actually green gets transparent (expected) but also cyan turns blue (issue/bug).

 

Alonzorion wrote on 12/14/2018, 9:42 AM

I'll try doing the secondary color correction as you mentioned Macro, as for the 3rd party chroma keyer, I'm not terribly familiar with third party plugins but is there any free ones that I could give a go? I'm not bothered enough by it to make a purchase on one! The extreme blueness is only a little jarring hahah.

Marco. wrote on 12/14/2018, 11:10 AM

I'm not aware of any suitable freeware chroma keyer (plug-ins) which doesn't mean there's none available. The best ones I used are these from Boris FX (which once was part of a Vegas Pro bundle), Boris FX Primate Studio, zMatte (included in DFT Digital Film Tools) and Ignite Pro (which is now part of Vegas Pro Suite) and from all of these ones a prefer the Chroma Keyer from Ignite/HitFilm.

Tim L wrote on 12/14/2018, 5:16 PM

Ignite Express is free, and I think includes all the keying elements you need.  I'm not familiar with using them, but perhaps Marco can take a look and confirm if these are the same fx as with Ignite Pro. 

https://fxhome.com/ignite-express

Marco. wrote on 12/14/2018, 6:21 PM

This is a very good point. The one I prefer in many cases – Ignite Pro's "Chroma Key" – is not part of Ignite Express. But speakig about the Ignite Express toolset, both "Difference Key" as well as "Hue & RGB Key" are superior over the native Vegas Pro Chroma Keyer. And in the particular case of the example Alonzorion shared in the very first post, the Ignite Express "Difference Key" offers an almost perfect result without touching any slider.

Alonzorion wrote on 12/18/2018, 8:29 PM

Sorry been away for a few days due to some issues, I tried the Difference Key which was mentioned and it is incredibly good so thank you so much for the help! In other news, I realised I made a mistake of sharpening my recording causing a lot of bright artefacts around the edges which cannot be removed, so I won't do that in future!

Thank you all!

fan-boy wrote on 2/26/2019, 1:23 AM

is it really a bug ? can anyone use the Vegas Test Pattern in Davinci Resolve and Photoshop ? So far , both Vegas and Hitfilm Pro respond in about the same way . In Vegas , when the far right blue\purple bar is Chroma Key Cut , the Pink bars go to Red ! Curves pic has same results as Chroma keying green .

P.S. how come no one ever says to use HSV with (SxV)H gradient color picker , when using Chroma Key ? I just now heard of that . Is that common knowledge ? , to the point where no one talks about it ? Vegas Help does not talk about it either .

Marco. wrote on 2/26/2019, 2:28 AM

What you show in HitFilm is different and expected, imho. It affects the opacity of cyan because the mask isn't strictly set to green only. And while in the HitFilm chromakeyer you could provoke a similar effekt as what happens in Vegas Pro, you then could easily separate cyan by despilling in HitFilm which is impossible in Vegas Pro.

You can re-check there's something going wrong in Vegas Pro by exporting the mask only then using the mask solely which then works fine.

Also, Vegas Pro's internal "Color Corrector (Secondary)" works fine, too. Same mask as "Chroma Key" but expected result then.

Marco. wrote on 2/26/2019, 4:30 AM

@fan-boy
Your observation in HitFilm made me curious because in fact there is a case where even in HitFilm the chromakeyer outputs a clearly defined mask but the result will be affected in colors outside the mask. As mentioned above in HitFilm there is a further option to correct the result.

So maybe you are right. Maybe this happens by mathematically design of a real chroma keyer and what we finally get in Vegas Pro isn't a bug but kind of a poor result caused by a missing feature (which would allow fine tuning the affected area outside the mask).

Musicvid wrote on 2/26/2019, 5:23 AM

There was only a little green in the jacket, and yes it appears to be removed, but not enough to add visible transparency. I suggest you live with it, because you are the only person who will know, or wear a different jacket. Clothes and Chromakey are always in competition.

Cyan (G+B) content goes Blue under green decimation (thus the OPs observation), as does Yellow (R+G) shift to Orange. Combinations of synthetic dyes and fabric UV reflectance make dressing for the shoot more art than science, so a backup wardrobe is a must.

fan-boy wrote on 2/26/2019, 1:17 PM

source pic courtesy of the O.P @Alonzorion , rip'd green screen for testing( been a big help to me )😀

@Marco. "Chroma key in Vegas Pro isn't a bug but kind of a poor result , caused by a missing feature" , yeah , Vegas Chroma key can do some really good cuts . Magix's needs to add those extra tweaks to put Vegas back on top of the game . And thanks for that Hitfilm tip , adjustment .

Above , some classic simple Photoshop tricks . Select Green channel to make mask . Then Multiply blend mode , to make the cut . Color balance of the cut is perfect , this way . Except for the green boarder .

Why doesn't the mask line up with the source image during Multiply ? 3rd pic , last ditch to make a halo .

Musicvid wrote on 2/26/2019, 3:24 PM

That's a nice tight spectrum, fan-boy. Keep 'em coming!

fan-boy wrote on 2/27/2019, 1:08 PM

pic #1 is now the Blue cut . pics 2 and 3 cut Green bar .

Secondary Color Correction cuts the Green color bar perfect , Uniform color does help . I also cut the far right blue bar , perfectly , too , using "Secondary" . One click on the far right blue bar , made a perfect Mask . that cut both blue rectangles .No adjustment needed ( manual , Multiply blend mode )

I fully see why Hitfilm and Davinici have the best Color key functionality ( Avid most likely too ) ,...Exactly what Marco said .

Magix did update the Stabilization plugin . Color key is such a big FX , It should have been enhanced long ago , Sony never got to it ,...will Magix do it ?

said before ,...stop messing with the interface , and update the FX functionality .

fan-boy wrote on 2/27/2019, 9:30 PM

Perfect cut , in Vegas , in less then 1  minute ! with full color retention . ( Review O.P's original Post . )


i call it the  "One Two Punch" , something you may
have heard from  "BioShock" .  Yeah this is some powerful stuff .

Throw roses if you want .

Here it is :

Punch 1 :
open FX Chroma Key on the source Green screen image :
Un-check  to turn  OFF , eye drop the color to cut .
keep  Chroma key  OFF .

Punch 2 :
open  Secondary color correction .
un-check to turn  OFF , eye drop the same color to cut .

Turn both  FX  ON .

The only thing i adjusted  was in Chroma Key .
"Low  Threshold" , as shown in the pic .

Nothing was adjusted in  Secondary color correction ,... and  Wala !

How does this work ?  Perfect color retention and  gloss of the rainbow  hair !
and No  Green  fringe .  How , how , how does this work ?

Secondary color is set as a  Mask ( with  Invert ) .
Chroma key got the  color to cut , but now Chroma key  can't
interact with the main image .
Secondary color correction is a "Mask Guard" ,  "Protector of the Colors"

( Chroma Key has just been enhanced . No need for any update )

Now , Multiply Blend Mode , with the original image . A 2 track composite . 3 tracks
if you want a background .

An original Vegas algorithm , from  fan-boy ( as far as i know )


again ,  Secondary Color has  No  adjustments ( show Mask with Invert Mask )
only "Low Threshold" slider was adjusted , in  Chroma Key .


P.S.  Thanks O.P. @Alonzorion , for that tricky image , that caused much intrigue and perspiration .


The above is the kind of "How To" Help , i would like to have read from Sony .
Click with the eye dropper , doesn't tell anyone much .

Vegas has a lot of core functions that need to be combined to orchestrate a composite
high level function .  Hitfilm Pro is like that too .

extra tip :  search Vegas in-app Help :  "Video Signal Flow Diagram"
View both  images to learn all there is to know , about  compositing in Vegas .

Musicvid wrote on 2/27/2019, 9:38 PM

Unfortunately, the current generation of coders may not understand those "core functions"as well as you, fan-boy. Something to keep in mind, but dont stop testing and reporting!

xberk wrote on 2/27/2019, 11:28 PM

I'm confused. I see the event on Track One and the same event on Track 2 as a Compositing Child. Which track gets Punch One? Which Punch Two?

 

Paul B .. PCI Express Video Card: EVGA VCX 10G-P5-3885-KL GeForce RTX 3080 XC3 ULTRA ,,  Intel Core i9-11900K Desktop Processor ,,  MSI Z590-A PRO Desktop Motherboard LGA-1200 ,, 64GB (2X32GB) XPG GAMMIX D45 DDR4 3200MHz 288-Pin SDRAM PC4-25600 Memory .. Seasonic Power Supply SSR-1000FX Focus Plus 1000W ,, Arctic Liquid Freezer II – 360MM .. Fractal Design case ,, Samsung Solid State Drive MZ-V8P1T0B/AM 980 PRO 1TB PCI Express 4 NVMe M.2 ,, Wundiws 10 .. Vegas Pro 19 Edit

fan-boy wrote on 3/1/2019, 8:36 PM

@xberk

Track 1 gets Chroma Key with Secondary color correction , Both FX are on the Left side of the Big Composite button , and Chroma Key is on the Left side of Secondary Color correction .Track 1 forms a complete Black and White Mask . Track 1 also uses Multiply Blend mode .

Track 2 gets a copy of the original green screen image . Track 2 has No FX . Anything I ever learned about compositing in Vegas , I learnt from Photoshop books . I always say , to learn Vegas , read Photoshop books , in particular , only read Photoshop Elements books that use classic Layers to do photo correction . IF the book only talks about using built in functions like eye droppers to remove stuff , then skip those books . you might need to find Element books on photoshop versions 2 or 3 , where only Layers and blend modes are used to make color and Tone adjustments , the "Manual Labor" way . Photoshop and Vegas are very similar in nature . Photoshop only works with pics on a Layer . while Vegas works on pics and video on a Track . Hitfilm uses Tracks and Layers . I read : Tracks can hold multiple clips . while a Layer can only hold just 1 clip . In Photoshop , 1 image per Layer . Thus , Vegas is technically a Track based editor , but , we can put just 1 clip per track , to simulate a Layer .

 

update March 1 , 2019

**************************
Long Story  short .
Use Chroma key by itself . When done , add  Mask Generator to Track 1 , and select  Alpha channel  ,
assuming Alpha channel is  100 % RGB 255 White . Multiply track 1 with track 2
( Both tracks contain the same source image . Track 2 should be a nested track , child track , cause a background image will be on Track 3 )
Instant color accuracy is achieved . However , a Screen fringe\tinge will occur during
Multiply Blend Mode . For some reason , the Mask of Track 1 does not line up perfectly with the
source image on track 2 , during Multiply Blend Mode . Re-tweak Chroma Key using  Ctrl key
to make fine adjustments , to  reduce the fringe color to an acceptable level .

Summary :  Vegas Chroma Key by itself cuts really good , but color results may not be accurate .
Blocking , with Mask Generator gives perfect  color results , but with a slight color fringe .
( Mask Generator is simpler to use then Secondary Color correction , they both guard the colors from Chroma key's spillage )

Conclusion :  In Vegas , you can't have it all when it comes to  Screen cutting .
Sony didn't fix it . Magix needs to fix it .

I am NOT an expert , but I have gotten better at color cutting , with all this recent practice .

P.S. some of the yap I said about Secondary Color Corrections is un-necessary . Mask check box ON , The 3 categories Luminance Saturation , and Hue can all be OFF . Thus , no need to eye drop in Secondary . Not used . That's the reason why Mask Generator works , too .

If Vegas Chroma key cuts really good , and the colors look ok ,...then done . But , if the cut looks really good with terrible color changes , then include Mask Generator , to preserve perfect colors in the cut image\video . With the side effect of having to re-tweak Chroma key to reduce the now inadvertent color fringe .

**************************

my previous post was a little over rambunctious , I'm ok now 🙃

 

 

Musicvid wrote on 3/1/2019, 8:44 PM

Rambunctious is good; it got me thinking. Learning your theory in PS has put you head and shoulders above the rest, who never quite bothered...

xberk wrote on 3/1/2019, 11:34 PM

I've tried to get this to work. I think it does work if you use the project settings indicated above by fan-boy on 2/27/19 .. Do I have that much right? You must use these project settings?

Paul B .. PCI Express Video Card: EVGA VCX 10G-P5-3885-KL GeForce RTX 3080 XC3 ULTRA ,,  Intel Core i9-11900K Desktop Processor ,,  MSI Z590-A PRO Desktop Motherboard LGA-1200 ,, 64GB (2X32GB) XPG GAMMIX D45 DDR4 3200MHz 288-Pin SDRAM PC4-25600 Memory .. Seasonic Power Supply SSR-1000FX Focus Plus 1000W ,, Arctic Liquid Freezer II – 360MM .. Fractal Design case ,, Samsung Solid State Drive MZ-V8P1T0B/AM 980 PRO 1TB PCI Express 4 NVMe M.2 ,, Wundiws 10 .. Vegas Pro 19 Edit

fan-boy wrote on 3/2/2019, 7:40 PM

@xberk

can't say the final result is perfect ,...but ,...

The Photoshop Elements 15 Book for Digital Photographers by Scott Kelby .
The Photoshop Elements 14 Book for Digital Photographers by Scott Kelby .
The Photoshop Elements  Book for Digital Photographers by Scott Kelby ( year 2003 original )

 

xberk wrote on 3/2/2019, 8:46 PM

THis works in VP14 with 8 bit. As you say, results are same same for 32 bit and 8 bit in VP14 .. but I can't get it to work at all in VP16 with 8 bit. There are extra properties in VP16 .. would they be the problem?

Paul B .. PCI Express Video Card: EVGA VCX 10G-P5-3885-KL GeForce RTX 3080 XC3 ULTRA ,,  Intel Core i9-11900K Desktop Processor ,,  MSI Z590-A PRO Desktop Motherboard LGA-1200 ,, 64GB (2X32GB) XPG GAMMIX D45 DDR4 3200MHz 288-Pin SDRAM PC4-25600 Memory .. Seasonic Power Supply SSR-1000FX Focus Plus 1000W ,, Arctic Liquid Freezer II – 360MM .. Fractal Design case ,, Samsung Solid State Drive MZ-V8P1T0B/AM 980 PRO 1TB PCI Express 4 NVMe M.2 ,, Wundiws 10 .. Vegas Pro 19 Edit

fan-boy wrote on 3/3/2019, 1:11 PM

I uncheck the box near the bottom , The 8 bit is fixed , grayed out , so should be the same as VP14 8 bit . Transform OFF , is how 32 bit Full is used . So all those 8 bit gray settings are the same as for 32 bit Full .

Up the Quality box from Good , to Best . I always use Best . In Audio Tab too , use Best .

Try this new way here in pic 1 pic 2 , that should work in any Vegas . Only uses Chroma key and nothing else . Condensed simplified version , easier to do .

the  O.P.  original  image has  cheek issues in the green screen and in their cut .
Regardless .  Inspect the  O.P.'s  cut , i see lots of black dot artifacts along
the perimeter of the shirt .  Considering that , this cut here is pretty good then .

Can't say if this was an intentional alternate method ( Mask Multiplying ) when using
Chroma key .  Help does not mention it .  Although , Multiplying with a Mask is nothing new .

Anytime there is a check box to : "Show Mask" , isn't just there for our viewing pleasure . We can Multiply Blend Mode , or use any blend mode needed . That "Show Mask" is an Image , like any other media . Use it as media , when needed . That's what pic 1 pic 2 above , is about .

 

Update : added pic 6 , which is the first pic in the list . as the liner notes suggest in pic 6 , Chroma key can dig deep into the edge of the image( track 1 ) . Once gone , it is gone , don't dig to deep . Next , on track 2 , use Secondary Color correction , stack them , more then one if needed . Just be sure Track 2 continues to look like the original source media . Try to de-saturate the fringe with Secondary eye dropper , heavily zooming in . That seems to be it . use Chroma key and Secondary Color correction , but on separate tracks . Secondary color correction is providing de-saturation and smoothing at the fringe . Must eye drop a color at the fringe .

That's Vegas . Orchestrate a composition , to achieve a goal . kind of like Photoshop . Better to read about the Layer or track setup , if it already exists . Otherwise , good lick trying to make an Un-Sharp mask on your own . I know I never could .gotta get that from Kelby's book .

Track 1 : Chroma key( with "Show Mask" ) , track controller Multiply blend mode .

Track 2 : Secondary color correction , use 1 or more , to adjust the fringe . Track 2 image view Must continue to look like the original source . Track 2 becomes the Final Result , after the Multiply with track 1's mask .

Digging too deep : the first cut I show with this new technique , the headset cord is missing . The source pic wasn't too good there anyway . I did dig extra deep to cut the fringe , using Chroma key Threshold sliders . With pic 6 I eased up on those Threshold settings so the headset cord is better , and I cut more fringe on track 2 using Secondary color corrections .