View Full Version : CHROMAKEY in LW

08-19-2013, 07:07 AM
I've been having difficulty with green screen in LW11.5
I want to make an instanced crowd of actors filmed against green screen. I would rather composite the crowd in and amongst my 3d models and so would prefer to composite in LW11 not AE.
I have tried creating an alpha channel and using it in the transparency channel but always get greenscreen fringing as though the alpha is not fitting the rgb file.
Does anyone know of a CHROMAKEY PLUGIN for LW that would do a good keying job within Lightwave? I am trying to avoid having to composite the crowd into my scene using AE.

08-19-2013, 07:24 AM
You may try the Color Filter node from DPKit,
should work also in DPFilter Image Filter node editor.


08-19-2013, 08:06 AM
Thanks Denis
I added the plugin you suggested, but unfortunately I now get the error message 'Can't Find Node Handler' :-(

08-19-2013, 08:25 AM
Thanks Denis
I added the plugin you suggested, but unfortunately I now get the error message 'Can't Find Node Handler' :-(

First sorry I misnamed it, is called the Color Key node listed in the DPKit\Tools.
may a problem of installation on your side,
or are you talking about Image Filter node editor?


08-19-2013, 10:22 AM
May I ask why you wouldn't do your key in AE first, export as a format that has an alpha channel and then bring into LW and do your work there? That way you can instance to your hearts desire with no messy keying.

08-19-2013, 10:52 AM
Thanks NinoK
will try

08-20-2013, 04:43 PM
Just in case you want to try Denis' suggestion for preview purposes, a quick tut:


In DP Image Filter Node Editor:


Use a gamma corrected version of the foreground as keying source. Keyers work better with gamma-corrected colors, but color blendings should be done in linear light. In this case, YUV color model worked better. Idea is get an uniform black area in the keyed color.


Since other areas are still keyed, we can use a BoxStep node in a way to adjust white and black points. This will help us to recover the foreground area.


We need to soften the edges and get rid of those noise and compression artifacts. There are several ways to do this, in this case I've picked the Soft filter in DP Filter which crashes the blacks as well.


But Soft filter darkens the whites a bit, so we add another BoxStep node to recover a 1.0 value for the white point of our matte (we can check these values with DP Histogram).


This is the result at this point.


Notice that color blendings should be done in linear light, so we should be linearizing the foreground before plugging it in Mixer node. Foreground would blend better with background in such case, but I haven't made that in this quick test so that show better the results of the spill suppressor setup later on.


After adding a background (this could be a Color Layer or actual geometry from the scene) and before setting up the spill suppressor, we are going to color match foreground colors to background ones. Again, there are several ways to do this. In this case I used DP Curve Filter. I've found DP CurveFilter is better than several normalized curve filters in compositing packages because it works with the full dynamic range of the image, so we can use it for tonemapping too.


What a spill suppressor commonly does is to change the hue of the green/blue spill areas, or tint these areas with a color. In this case I've used a kind of tint filter where we get the luminance of the input image, adjust the gamma and tint the areas with greyish-cyanish hues to match the overall background color



08-20-2013, 04:46 PM
Now, a spill suppressor works in the edges of the foreground matte. For getting the edges of our matte, we can use the Sobel filter of DP Filter node. There are other filters that might work better depending on the case, but Sobel works well most of the times.


What we are doing here is taking the resulting matte, compressing the gamma a lot for getting the most area of the edges, filtering through the Sobel filter for getting the edges, blurring this results for adjusting (increasing) the edges size and smooth things out, and expanding the gamma again with the pow node (notice pow values work inversely as a gamma correction node), we adjust the white point of the edges with the BoxStep node (this controls the strength of the edges matte) and finally we clip those values from 0 to 1 so that it can be used as alpha matte.


Rest of the setup are just refinements related with some optical effects and basic color grading. In this case we could add some depth of field with DP DOF - very useful if background is a actual geometry or if you have exported the depth buffer.


Likewise, glare effects can be added with DP Bloom to blend both foreground and background elements. Notice these effects should be added in linear space.


Final color grading can be added with DP Camera Response filter or through color profiles with SG_CCNode or the mix of both. Possibilities here are endless for preview purposes and this is only a quick suggestion about what can be done with DP Filter Node Editors.


Hope you may find it useful,