logo Sign In

Post #619564

Author
snicker
Parent topic
Info: New colormatching script
Link to post in topic
https://originaltrilogy.com/post/id/619564/action/topic#619564
Date created
22-Jan-2013, 3:49 AM
snicker,

we need to try to port your clipping removal to Avisynth. Any chance you could provide a tutorial on how you do it? I know you did already in another thread, but I can't seem to find it, and I remember not quite being able to follow it previously. Any chance you could take another stab at explaining it to us?

-G

I'm not sure how you would accomplish this. It's assembled in After Effects and uses an intricate system of layer masks and colour keys and several 3rd party AE plug-ins. You would have to duplicate the functions of these plug-ins to port it to AVISynth.

As for explaining how it works... it's a little convoluted but the basic idea goes like this:

Each colour channel is corrected separately. Below is a simplified version of how the red channel shadow detail is restored (AE layer order).

  • Duplicate source video layer (red channel luma) - clipped shadows keyed
  • Duplicate source video layer (green channel luma) - blend mode 'lighten'
  • Duplicate source video layer (blue channel luma) - blend mode 'lighten'
  • Source video layer (red channel luma)

 

The opacity of the blend channels is set to something like 2%-5%. This is enough to restore editable data (if it exists). There is (a lot) more to it than that but this is the easiest way of describing the basic function.

The individual luma channels are then recombined to form a new composite RGB channel. Further edits can then be made to this new video layer.

The reason for using such low opacity is that if highlight colour clipping is present in any of the blend layers (and it often is) it will be introduced to the source channel and screw with the colour. This can be avoided by keying clipped highlight colours from the blend layers allowing for higher opacities.