LightWrap node

pluginIcon

This documentation is for version 1.0 of LightWrap.

Description

LightWrap helps composite objects onto a bright background by simulating reflections from the background light on the foreground, around its edges. Input A is the foreground image and its matte, and input B the the background to use for the wrapping effect.

The output of LightWrap should then be composited over the background to give the final composite.

Inputs

Input Description Optional
A   No
B   No

Controls

Parameter / script name Type Default Function
Convert to Group / convertToGroup Button   Converts this node to a Group: the internal node-graph and the user parameters will become editable
Diffuse / diffuse Double x: 15 y: 15 Size of the reflections from the background to the foreground element (Intensity controls their intensity). Start by setting Diffuse to zero and adjust intensity to see what colors from the background are being reflected. Then adjust Diffuse, come back to Intensity if necessary, and balance both parameters until the result is satisfactory.
Intensity / intensity Double 0 Brightness of the reflections from the background to the foreground element (Diffuse controls their size). Start by setting Diffuse to zero and adjust intensity to see what colors from the background are being reflected. Then adjust Diffuse, come back to Intensity if necessary, and balance both parameters until the result is satisfactory.
Generate Wrap Only / onlyWrap Boolean Off When checked, the LightWrap in generated but is not merged with the foreground object (disables the Highlight Merge).
Disable luminance-Based Wrap / disableLuma Boolean Off When checked, the LightWrap effect is created uniformly around the edged, rather than being controled by the color of the background.
Enable Glow / enableGlow Boolean Off When checked, the LightWrap is not masked by the foreground object, so that the objects seems to glow.
FGBlur / fgblur Double x: 1 y: 1 Size of the blur applied to the alpha channel of the foreground (i.e. the foreground matte). More blur causes more background to be added to the foreground.
FGBlur Border Conditions / fgblurBoundary Choice Black
Border conditions of the blur applied to the alpha channel of the foreground (i.e. the foreground matte). Use “Black” in most cases, and “Nearest” if the foreground matte should be extended beyond image borders when it touches them.
Black: Dirichlet boundary condition: pixel values out of the image domain are zero.
Nearest: Neumann boundary condition: pixel values out of the image domain are those of the closest pixel location in the image domain.
BGBlur / bgblur Double x: 0 y: 0 Size of the blur applied to the background before merging it with the foreground element and applying the Diffuse blur.
Saturation / saturation Double 1 Color saturation of the LightWrap effect. Advanced color correction parameters are available in the ColorCorrect tab.
Luma Tolerance / lumaTolerance Double 0 Luminance threshold of the LightWrap effect. Luminance values below this do not generate a LightWrap.
Highlight Merge / highlightmerge Choice plus
Merge operation bewteen the foreground object and the background. The default operation is “plus”, which produces a glow effect.
atop: Ab + B(1 - a) (a.k.a. src-atop)
average: (A + B) / 2
color: SetLum(A, Lum(B))
color-burn: darken B towards A
color-dodge: brighten B towards A
conjoint-over: A + B(1-a)/b, A if a > b
copy: A (a.k.a. src)
difference: abs(A-B) (a.k.a. absminus)
disjoint-over: A+B(1-a)/b, A+B if a+b < 1
divide: A/B, 0 if A < 0 and B < 0
exclusion: A+B-2AB
freeze: 1-sqrt(1-A)/B
from: B-A (a.k.a. subtract)
geometric: 2AB/(A+B)
grain-extract: B - A + 0.5
grain-merge: B + A - 0.5
hard-light: multiply if A < 0.5, screen if A > 0.5
hue: SetLum(SetSat(A, Sat(B)), Lum(B))
hypot: sqrt(A*A+B*B)
in: Ab (a.k.a. src-in)
luminosity: SetLum(B, Lum(A))
mask: Ba (a.k.a dst-in)
matte: Aa + B(1-a) (unpremultiplied over)
max: max(A, B) (a.k.a. lighten only)
min: min(A, B) (a.k.a. darken only)
minus: A-B
multiply: AB, 0 if A < 0 and B < 0
out: A(1-b) (a.k.a. src-out)
over: A+B(1-a) (a.k.a. src-over)
overlay: multiply if B < 0.5, screen if B > 0.5
pinlight: if B >= 0.5 then max(A, 2*B - 1), min(A, B * 2.0 ) else
plus: A+B (a.k.a. add)
reflect: A*A / (1 - B)
saturation: SetLum(SetSat(B, Sat(A)), Lum(B))
screen: A+B-AB if A or B <= 1, otherwise max(A, B)
soft-light: burn-in if A < 0.5, lighten if A > 0.5
stencil: B(1-a) (a.k.a. dst-out)
under: A(1-b)+B (a.k.a. dst-over)
xor: A(1-b)+B(1-a)
Use Constant Highlight / useConstant Boolean Off When checked, use a constant color (specified by the Constant parameter) instead of the background for the LightWrap effect.
Constant / constantcolor Color r: 1 g: 1 b: 1 a: 1 Color to use in the LightWrap effect when Use constant highlight is enabled.
Saturation / ColorCorrect1MasterSaturation Color r: 1 g: 1 b: 1 a: 1  
Contrast / ColorCorrect1MasterContrast Color r: 1 g: 1 b: 1 a: 1  
Gamma / ColorCorrect1MasterGamma Color r: 1 g: 1 b: 1 a: 1  
Gain / ColorCorrect1MasterGain Color r: 1 g: 1 b: 1 a: 1  
Offset / ColorCorrect1MasterOffset Color r: 0 g: 0 b: 0 a: 0  
Enable / ColorCorrect1ShadowsEnable Boolean On  
Saturation / ColorCorrect1ShadowsSaturation Color r: 1 g: 1 b: 1 a: 1  
Contrast / ColorCorrect1ShadowsContrast Color r: 1 g: 1 b: 1 a: 1  
Gamma / ColorCorrect1ShadowsGamma Color r: 1 g: 1 b: 1 a: 1  
Gain / ColorCorrect1ShadowsGain Color r: 1 g: 1 b: 1 a: 1  
Offset / ColorCorrect1ShadowsOffset Color r: 0 g: 0 b: 0 a: 0  
Enable / ColorCorrect1MidtonesEnable Boolean On  
Saturation / ColorCorrect1MidtonesSaturation Color r: 1 g: 1 b: 1 a: 1  
Contrast / ColorCorrect1MidtonesContrast Color r: 1 g: 1 b: 1 a: 1  
Gamma / ColorCorrect1MidtonesGamma Color r: 1 g: 1 b: 1 a: 1  
Gain / ColorCorrect1MidtonesGain Color r: 1 g: 1 b: 1 a: 1  
Offset / ColorCorrect1MidtonesOffset Color r: 0 g: 0 b: 0 a: 0  
Enable / ColorCorrect1HighlightsEnable Boolean On  
Saturation / ColorCorrect1HighlightsSaturation Color r: 1 g: 1 b: 1 a: 1  
Contrast / ColorCorrect1HighlightsContrast Color r: 1 g: 1 b: 1 a: 1  
Gamma / ColorCorrect1HighlightsGamma Color r: 1 g: 1 b: 1 a: 1  
Gain / ColorCorrect1HighlightsGain Color r: 1 g: 1 b: 1 a: 1  
Offset / ColorCorrect1HighlightsOffset Color r: 0 g: 0 b: 0 a: 0