LUA Scripts to work with layer transparency

Hier können eigene Artweaver Materialien veröffentlicht und gedownloadet werden - Here you can publish custom Artweaver materials and download them.
Beiträge: 15
Registriert: Do Feb 08, 2007 2:07 pm

LUA Scripts to work with layer transparency

Beitragvon peter » Do Feb 22, 2007 5:54 pm

So, here are another three Lua scripts for you to enjoy.

How to use them: The first script can be invoked by choosing Filter > Transparency > Color Difference Keyer.... This is essentially what most people know as a blue screen, or weather report, effect. You select a channel (typically Blue or Green since they do not interfere with skin tones), and the filter will make eg. the blue parts transparent.

Chances are the results are not perfect. This is where the second filter comes in: Filter > Transparency > Alpha Levels...
This does the same as the Levels command found in Artweaver, except that it is applied to the the alpha channel. This way you can improve the contrast and edges of you transparency. If you use it in conjunction with the color difference keyer filter, you can use this to clean up the mask it generates.
You can also use it to recover the entire layer if you have erased a bit too much.

The third filter is used to expand or contract the transparency. If you used the color difference keyer to knock out your subject and there is still a blue outline around it, you can use this filter to get rid of it. Or if it chopped away too much, you can expand the alpha to make the edges reappear.
If you leave the slider in the center (which is the default), nothing will happen. Drag it to the right to expand the mask, drag it to the left to contract the mask.
The more you move the slider away from the center, the longer it will take to process the image.

Make sure you unlock the layer's transparency in the layers palette before applying any of the filters, otherwise they won't work.

Installation: Install the Lua scripting plugin from the Artweaver website if you have not done so already. Then download the files below and place them in Artweaver's scripts folder, typically C:\Program Files\Artweaver 0.4\Standard\Lua Scripts.

Known Bugs: None

Examples: I found the image somewhere on the internet, it's part of a shot from Star Wars Episode II. The orange color is the layer below, you can use any background you want of course, like another photo for example.

Original Image:

Color Difference keyer applied:

Alpha levels applied to improve contrast in the alpha channel:

In this case the edges were already fine, but as you can see you can expand them if the keyer chopped away too much, or if all you ever wanted was a strange blue border around your subject:

Comments are appreciated of course. Hope this is useful for some of you out there.
Color Difference Keyer.lua
Color Difference Keyer Script
(3.35 KiB) 767-mal heruntergeladen
Alpha Levels Script
(4.14 KiB) 804-mal heruntergeladen
Expand/Contract Script
(3.61 KiB) 789-mal heruntergeladen

Beiträge: 137
Registriert: Do Dez 28, 2006 9:55 am

Beitragvon Troken » Do Feb 22, 2007 8:01 pm

Looks really intresting, I'll look into them at once! Thanks!
Zuletzt geändert von Troken am Di Feb 27, 2007 11:33 am, insgesamt 1-mal geändert.

Beiträge: 148
Registriert: Mi Jun 29, 2005 7:57 pm
Wohnort: Belgium

Beitragvon hanzzz » So Feb 25, 2007 2:45 pm

That's simmply stunning, amazing what one can do with these things, thanks alot for those, I will put them to good use !

Zurück zu „Artweaver user materials“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast