Skip to content

Chroma Key

Updated

Makes one color of a video transparent, for green or blue screen footage.

Type
comp-chroma-key
Script class
ChromaKeyComponent
Per entity
One
Version
1.0.0

Read about it in Video and streams: what it does, how to use it from a script, and examples.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
color "auto"
edgeCleanup 0.25 0 ≤ x ≤ 1
edgeShrink 0.5 0 ≤ x ≤ 2
similarity 0.4 0 ≤ x ≤ 1
smoothness 0.15 0 ≤ x ≤ 1
spill 0.6 0 ≤ x ≤ 1

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(ChromaKeyComponent);
if (component) log(component.props);
}