In this video i will share a method which will speed up your GREEN screen removal workflow. After removing the green, i will share some quick tips on how to use practically with some green spill removal tips.
I hope you liked this video and thanks for watching. Please dont forget to hit the like and subscribe buttons . Thanks you!
Formula used for Alpha
var rd=R*255; var grn=G*255; var bl=B*255; var grphl=max(R,G,B)+0.5; var d=sqrt( pow(rd, 2) + pow(grn - 255, 2) + pow(bl, 2)); var tol1 = tola*255; var tol2 = tolb*255; var abovemax = 355; var dmaxratio=d/tol1; var dmaxfact=trunc(dmaxratio); var correctin=d*(1-dmaxfact); var out1 = correctin+(dmaxfact*abovemax); var dminratio = d/tol2; var dminfact=trunc(dminratio); var out2min = (d-tol2)*(255/(tol1-tol2)); var correctin2=d*dminfact; var out2=(correctin2/(d+grphl))*out2min; var finalout = max( dmaxfact*out1, out2); finalout/255
Formula used for Green
var rd=R*255; var grn=G*255; var bl=B*255; var d=sqrt( pow(rd, 2) + pow(grn - 255, 2) + pow(bl, 2)); var tol1 = tola*255; var tol2 = tolb*255; var abovemax = 355; var dmaxratio=d/tol1; var dmaxfact=trunc(dmaxratio); var correctin=d*(1-dmaxfact); var out1 = correctin+(dmaxfact*abovemax); var dminratio = d/tol2; var dminfact=clamp(trunc(dminratio)); var out2min = (d-tol2)*(255/(tol1-tol2)); var correctin2=d*dminfact; var out2=(correctin2/(d+1))*out2min; var finalout = max( dmaxfact*out1, out2); var green1=grn-(255-d); var green2=dminfact*green1+((1-dminfact)*grn); var greenout =abs( ( (dmaxfact-1)*green2) + (dmaxfact*grn)); greenout/255
PS. After you have added the formulas and the tola/tolb parameters in the procedural live filter dialog, don't forget to add it as preset in your Procedural live filter, so you can reuse it anytime when needed.