(sl)Edge-hammer to reduce light wrap

June 03, 2012

Here’s a quick tip that I learnt at MPC to help integrate composites where light wrap is causing a problem. It’s a fairly common trick, but I have Traian Constantinescu to thank for showing me. He calls it the “(sl)Edge Hammer”, because using a clamp node to perform a colour correct is a pretty brutal technique and “like using a sledge hammer to crack a nut”. It’s certainly a lot more crude than my Colour Smear technique, but is a quick a simple solution that will often get the result needed.


So a lot of the work that MPC did on Prometheus was modifying exterior landscapes (the movie has only just been released, so I’m still quite restricted in what I talk about with regards to VFX. I will post some of my shots later in the year once the footage has been officially released and cleared – until then keep an eye on MPCs website for VFX breakdowns). Many of the plates started with actors shot against a sky, but once the alien landscapes had been digitally added in, they ended up in front of a mountain or other dark background. This often meant that the rear lighting from the sky in the original plate left a halo that wrapped around the actors – a sure giveaway that the background had been altered. There are many ways of approaching how to fix this and this certainly won’t work in all cases, but this was a trick that I found useful on a number of shots.
Let’s start by comping something that roughly shows what I mean.

As you can see – the edges are very bright, but there is no lighting in the background that justifies the light wrap.


Now, where there are areas with a consistent colour, we can isolate the edges and treat them. The first thing to do is create an edge mask that matches the falloff of the light wrap. I’ve used a gizmo called FineEdgeDetect, as it allows for separate control of the inside and outside feathering of your edge detect. Here is the result.

The subjects jacket is an ideal area to treat, as its a fairly consistent tone of red. I add a Clamp node and for the “maximum” value I will use the colour picker to select a value that is close to the edge area of the jacket, but not so close that it is effected by the light wrap. You should spend some time adjusting this colour, as its a balancing act to get a value that isn’t to dark or light. You will also want to keyframe this value over time, as the colour of the jacket will change as the subject moves.

The result is pretty ugly looking, but we now matte that through our edge mask.

If I Merge this back over the comp it gives us a nice consistent tone of jacket colour right up to the edges. As the Clamp uses a single value, it won’t match the entire outline, so I also use a roto to restrict the areas where it is applied.

I then repeat this process several more times for the rest of her jacket, each time sampling a new colour to Clamp to, and using a roto to restrict the edge treatment area.

The end result shows a considerable reduction in the light wrap, and the foreground and background sit together a lot better. The obvious restrictions are that her face and hair not easily treated using the same technique (it works best on areas with little texture).


Using a Clamp is a very destructive technique, as all colour values lower than those sampled will be lost. Use this treatment sparingly! It is also a very quick way of destroying your grain, so be sure to re-grain your treated edges.

You can download the Nuke script and images here to see how I set up the nodes for this demo.

All images are taken from Flickr and used under the Creative Commons licence.

One Response to "(sl)Edge-hammer to reduce light wrap"

Leave a comment