Settings and Macros/SoftClip Description

From VFXPedia

< Settings and Macros
Revision as of 09:01, 31 March 2012 by Tilt (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Whenever a float image is converted to an integer format, overbright pixels should be compressed gently instead of clipping them. This macro uses an inverse function akin to -1/x to modify values above a given threshold so that no colour channel will ever exceed 1.

Pictures speak more than words:

Image:softclip_graph.png

The exact function is:

 if c > threshold
   c = (-1 / ((c - threshold) / (1 - threshold) + 1) + 1) * (1 - threshold) + threshold

You can also sandwich the node between two invert nodes to clip the blacks.