Viz Artist User Guide
Version 5.0 | Published December 20, 2022 ©
To Apply Keying Parameters via Shared Memory and Scripting
Parameters for the Chroma Keyer (including the Precision Keyer) can be applied by using shared memory and Viz Engines internal scripting language. No need to send a lot of commands to the Viz Engine. And in additional, shared memory values can be stored on Graphic Hub.
Sample Script
The following sample explains how to set and apply Chroma Keyer parameters:
sub OnInit()
dim key as string =
"preset1"
'fill shm map with keyer test parameters
system.map[key] =
1
'define base key
system.map[key &
".KeyHueAdjust"
] =
0.2
system.map[key &
".KeySaturationAdjust"
] =
0.21
system.map[key &
".WhitePoint"
] =
0.22
system.map[key &
".BlackPoint"
] =
0.23
system.map[key &
".GrayPoint"
] =
0.24
system.map[key &
".ProcessFGGain"
] =
0.25
system.map[key &
".DenoiseRadius"
] =
2
system.map[key &
".DenoiseSharpen"
] =
0.26
system.map[key &
".BackingPlateRGB"
] = cvertex(
0.27
,
0.28
,
0.29
)
system.map[key &
".Shrink"
] =
3
system.map[key &
".EdgeWidth"
] =
4
system.map[key &
".EdgeBlur"
] =
0.3
system.map[key &
".EdgeLightWrapGain"
] =
0.31
system.map[key &
".SpillLightWrapGain"
] =
0.32
system.map[key &
".LightWrapRGB"
] = cvertex(
0.33
,
0.34
,
0.35
)
system.map[key &
".EdgeLightWrapRGBGain"
] =
0.36
system.map[key &
".SpillLightWrapRGBGain"
] =
0.37
system.map[key &
".LightWrapBGBlur"
] =
0.38
system.map[key &
".CyanGain"
] =
0.39
system.map[key &
".YellowGain"
] =
0.40
system.map[key &
".MagentaGain"
] =
0.41
system.map[key &
".AddShadows"
] =
false
system.map[key &
".InnerShadows"
] =
0.42
system.map[key &
".OuterShadows"
] =
0.43
system.map[key &
".ShadowsGain"
] =
0.44
system.map[key &
".ShadowsOffset"
] =
0.45
system.map[key &
".AddHighlights"
] =
true
system.map[key &
".InnerHighlights"
] =
0.46
system.map[key &
".OuterHighlights"
] =
0.47
system.map[key &
".HighlightsGain"
] =
0.48
system.map[key &
".HighlightsOffset"
] =
0.49
'apply keyer preset to video in
1
System.SendCommand(
"#"
& scene.vizid &
"*VIDEO*VIDEOIN*1*KEYER_PARAMS_SHM SET "
& key)
end sub