LightWrap node
This documentation is for version 1.0 of LightWrap (fr.inria.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 / |
Button |
Converts this node to a Group: the internal node-graph and the user parameters will become editable |
|
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 / |
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 / |
Boolean |
Off |
When checked, the LightWrap in generated but is not merged with the foreground object (disables the Highlight Merge). |
Disable luminance-Based Wrap / |
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 / |
Boolean |
Off |
When checked, the LightWrap is not masked by the foreground object, so that the objects seems to glow. |
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 / |
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 (black): Dirichlet boundary condition: pixel values out of the image domain are zero.
Nearest (nearest): Neumann boundary condition: pixel values out of the image domain are those of the closest pixel location in the image domain.
|
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 / |
Double |
1 |
Color saturation of the LightWrap effect. Advanced color correction parameters are available in the ColorCorrect tab. |
Luma Tolerance / |
Double |
0 |
Luminance threshold of the LightWrap effect. Luminance values below this do not generate a LightWrap. |
Highlight Merge / |
Choice |
plus |
Merge operation between 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(2*A, B) if A < 0.5, screen(2*A - 1, B) 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, A 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(A, 2*B) if B < 0.5, screen(A, 2*B - 1) if B > 0.5
pinlight: if B >= 0.5 then max(A, 2*B - 1), min(A, B * 2) 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 / |
Boolean |
Off |
When checked, use a constant color (specified by the Constant parameter) instead of the background for the LightWrap effect. |
Constant / |
Color |
r: 1 g: 1 b: 1 a: 1 |
Color to use in the LightWrap effect when Use constant highlight is enabled. |
Saturation / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Contrast / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Gamma / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Gain / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Offset / |
Color |
r: 0 g: 0 b: 0 a: 0 |
|
Enable / |
Boolean |
On |
|
Saturation / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Contrast / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Gamma / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Gain / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Offset / |
Color |
r: 0 g: 0 b: 0 a: 0 |
|
Enable / |
Boolean |
On |
|
Saturation / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Contrast / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Gamma / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Gain / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Offset / |
Color |
r: 0 g: 0 b: 0 a: 0 |
|
Enable / |
Boolean |
On |
|
Saturation / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Contrast / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Gamma / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Gain / |
Color |
r: 1 g: 1 b: 1 a: 1 |
|
Offset / |
Color |
r: 0 g: 0 b: 0 a: 0 |