Media & Canvas

Published Updated
Generate custom image assets, draw dynamic canvas text decals, capture screenshots, and execute background removals.

Media & Canvas operators create, modify, and optimize 2D image and vector resources directly within the runtime engine pipeline.

Background Removal Operator for Image Cutouts#

Operator<DocsSdkOperatorsMediaBackgroundRemoval>: Uses AI plugin pipelines to automatically isolate main subjects and remove image backgrounds.

1. Functional Overview

The Background Removal operator automates transparency mask generation. It accepts an input image payload, executes background removal AI calculations to isolate foreground subjects, and dispatches an alpha-channel cut PNG to showcase custom product photos.

Background Removal

DATA_MEDIA_ITEM.BACKGROUND_REMOVAL
Operator
Operator Type
BACKGROUND_REMOVAL
Operator Group
DATA_MEDIA_ITEM

Background Removal Properties Details

Property & TypeDisplay NameSystem TypeDefault
optimizedFor: string
Optimized For
STRING
DROPDOWN
"PORTRAIT"
returnMask: boolean
Return Mask
BOOL
TOGGLE
false
cropResult: boolean
Crop Result
BOOL
TOGGLE
false
cropPaddingPercent: float
Crop Padding (%)
FLOAT
RANGE SLIDER
0
cropToAspectRatio: boolean
Crop To Aspect Ratio
BOOL
TOGGLE
false
outputAspectRatio: float
Output Aspect Ratio
FLOAT
RANGE SLIDER
1

@Input

@Input & TypeDisplay Name@Input TypeGroup
inputImage: (payload: IMediaItem) => void
Input Image
DATA_MEDIA_ITEMAIR_PROPERTY

@Output

@Output & TypeDisplay Name@Output TypeGroup
outputImage: AirEvent<IMediaItem>
Output Image
DATA_MEDIA_ITEMAIR_PROPERTY
onSuccess: AirEvent<void>
On Success
OPERATOROPERATOR
onFailure: AirEvent<void>
On Failure
OPERATOROPERATOR

Capture Texture Operator for 3D Screenshots#

Operator<DocsSdkOperatorsMediaCaptureTexture>: Takes a high-resolution screenshot frame of a target scene object or viewport camera, exporting it as an optimized PNG/JPEG asset.

1. Functional Overview

The Capture Texture operator provides on-demand frame rendering from the live 3D webGL scene. Triggering the Capture Texture @Input causes the engine to render the target mesh's active frame, encoding it into the specified file format (PNG, JPEG, WebP) with options to automatically download the result locally or feed it as a new optimized image into another pipeline component.

Capture Texture

DATA_MEDIA_ITEM.CAPTURE_TEXTURE
Operator
Operator Type
CAPTURE_TEXTURE
Operator Group
DATA_MEDIA_ITEM

Capture Texture Properties Details

Property & TypeDisplay NameSystem TypeDefault
captureTextureTargetType: "OBJECT"
Capture Texture From
ENUM
OPTION SELECTOR
"OBJECT"
captureTextureTargetUnitId: any
Target Object
STRING_ARRAY
UNIT SELECTOR
[]
useUnitAspectRatio: boolean
Use Unit Aspect Ratio
BOOL
TOGGLE
true
maxDimensionPixels: float
Max Dimension (px)
FLOAT
RANGE SLIDER
1024
outputWidthPixels: float
Width (px)
FLOAT
RANGE SLIDER
1024
outputHeightPixels: float
Height (px)
FLOAT
RANGE SLIDER
1024
mimeType: "image/png" | "image/jpeg" | "image/webp"
MIME Type
ENUM
DROPDOWN
"image/png"
webpQuality: float
WEBP Quality
FLOAT
RANGE SLIDER
0.92
downloadOnCapture: boolean
Download On Capture
BOOL
TOGGLE
false
fileName: string
File Name
STRING
TEXT INPUT
"captured-texture.png"
alwaysUpdate: boolean
Always Update
BOOL
TOGGLE
false

@Input

@Input & TypeDisplay Name@Input TypeGroup
captureTexture: () => void
Capture Texture
OPERATOROPERATOR

@Output

@Output & TypeDisplay Name@Output TypeGroup
outputValue: AirEvent<IMediaItem>
Output Value
DATA_MEDIA_ITEMAIR_PROPERTY

FTP Upload Operator for Remote File Transfer#

Operator<DocsSdkOperatorsMediaFtpUpload>: Transmits local screenshots or generated textures to remote storage servers using FTP.

1. Functional Overview

The FTP Upload operator integrates scenes with remote asset storage systems. It reads image files (such as product screenshots), logs into defined FTP server domains, uploads the payload, and outputs public hosting URL links.

FTP Upload

DATA_MEDIA_ITEM.FTP_UPLOAD
Operator
Operator Type
FTP_UPLOAD
Operator Group
DATA_MEDIA_ITEM

FTP Upload Properties Details

Property & TypeDisplay NameSystem TypeDefault
mediaItemId: IMediaItem
File
MEDIA_ITEM
ELEMENT SELECTOR
""
configId: string
FTP Config
STRING
DROPDOWN
"TEST"
filename: string
File Name
STRING
TEXT INPUT
""
remoteFolder: string
Remote Folder
STRING
TEXT INPUT
""

@Input

@Input & TypeDisplay Name@Input TypeGroup
upload: () => void
Upload
OPERATOROPERATOR
cancel: () => void
Cancel
OPERATOROPERATOR

@Output

@Output & TypeDisplay Name@Output TypeGroup
statusMessage: AirEvent<string>
Status Message
DATA_STRINGAIR_PROPERTY
onSuccess: AirEvent<string>
On Success
DATA_STRINGAIR_PROPERTY
onFailure: AirEvent<string>
On Failure
DATA_STRINGAIR_PROPERTY

Image to PDF Operator for Printable Documents#

Operator<DocsSdkOperatorsMediaImageToPdf>: Encapsulates selected 2D images or canvas snapshots into a printable, single-page PDF document.

1. Functional Overview

The Image To PDF operator builds standardized reports. It reads active scene rendering frames or canvas assets, embeds them inside a PDF document layout containing customized margins, and triggers local print dialog downloads.

Image To PDF

DATA_MEDIA_ITEM.IMAGE_TO_PDF
Operator
Operator Type
IMAGE_TO_PDF
Operator Group
DATA_MEDIA_ITEM

Image To PDF Properties Details

Property & TypeDisplay NameSystem TypeDefault
textureMediaItemId: IMediaItem
Image
MEDIA_ITEM
ELEMENT SELECTOR
""
fileName: string
File Name
STRING
TEXT INPUT
"image.pdf"
unit: "px" | "pt" | "mm" | "cm" | "in"
Units
ENUM
DROPDOWN
"px"
pageFormat: "auto" | "a4" | "letter" | "custom"
Page Format
ENUM
DROPDOWN
"auto"
pageWidth: float
Custom Page Width
FLOAT
RANGE SLIDER
0
pageHeight: float
Custom Page Height
FLOAT
RANGE SLIDER
0
autoOrientation: boolean
Auto Orientation
BOOL
TOGGLE
true
orientation: "p" | "l"
Orientation
ENUM
DROPDOWN
"p"
mode: "page" | "fit" | "fill" | "none"
Mode
ENUM
DROPDOWN
"page"
x: float
X
FLOAT
RANGE SLIDER
0
y: float
Y
FLOAT
RANGE SLIDER
0
width: float
Width
FLOAT
RANGE SLIDER
0
height: float
Height
FLOAT
RANGE SLIDER
0
dpi: float
DPI (Units per Inch)
FLOAT
RANGE SLIDER
72
rotation: float
Rotation (°)
FLOAT
RANGE SLIDER
0
compression: "MEDIUM" | "NONE" | "FAST" | "SLOW"
JPEG Compression
ENUM
DROPDOWN
"MEDIUM"
formatHint: "" | "JPEG" | "PNG" | "WEBP"
Format Hint
ENUM
DROPDOWN
""
crossOrigin: "" | "anonymous" | "use-credentials"
Cross-Origin
ENUM
DROPDOWN
""

@Input

@Input & TypeDisplay Name@Input TypeGroup
createPdf: () => void
Create PDF
OPERATOROPERATOR
download: () => void
Download
OPERATOROPERATOR

@Output

@Output & TypeDisplay Name@Output TypeGroup
outputPdf: AirEvent<IMediaItem>
Output PDF
DATA_MEDIA_ITEMAIR_PROPERTY

Image to SVG Operator for Vector Conversion#

Operator<DocsSdkOperatorsMediaImageToSvg>: Compiles pixel-based bitmap photos into vector-based SVG graphics paths.

1. Functional Overview

The Image to SVG operator traces pixel edges to build scalable shapes. It processes input bitmaps (JPEG/PNG) using customizable edge thresholds, compiling bezier vector coordinates, and outputs scalable SVG graphic assets.

Image to SVG

DATA_MEDIA_ITEM.IMAGE_TO_SVG
Operator
Operator Type
IMAGE_TO_SVG
Operator Group
DATA_MEDIA_ITEM

Image to SVG Properties Details

Property & TypeDisplay NameSystem TypeDefault
textureMediaItemId: IMediaItem
Image
MEDIA_ITEM
ELEMENT SELECTOR
""
convertOnChange: boolean
Convert On Change
BOOL
TOGGLE
false
pathColor: IColor
Path Color
COLOR
COLOR PICKER
"#FFFFFF"
outlineOnly: boolean
Outline Only
BOOL
TOGGLE
true
outlineWidth: float
Outline Width (px)
FLOAT
RANGE SLIDER
1
mode: "spline" | "polygon" | "none"
Curve Mode
ENUM
DROPDOWN
"spline"
cornerThresholdDegrees: int
Corner Threshold (°)
INT
RANGE SLIDER
60
lengthThreshold: float
Segment Length (px)
FLOAT
RANGE SLIDER
4
maxIterations: int
Max Iterations
INT
RANGE SLIDER
10
spliceThresholdDegrees: int
Splice Threshold (°)
INT
RANGE SLIDER
45
filterSpeckle: int
Filter Speckle (px)
INT
RANGE SLIDER
4
invert: boolean
Invert Image
BOOL
TOGGLE
false

@Input

@Input & TypeDisplay Name@Input TypeGroup
convert: () => void
Convert
OPERATOROPERATOR
download: () => void
Download
OPERATOROPERATOR

@Output

@Output & TypeDisplay Name@Output TypeGroup
outputSvg: AirEvent<IMediaItem>
Output SVG
DATA_MEDIA_ITEMAIR_PROPERTY
onSuccess: AirEvent<void>
On Success
OPERATOROPERATOR
onFailure: AirEvent<void>
On Failure
OPERATOROPERATOR

Posterization Texture Operator for Color Bands#

Operator<DocsSdkOperatorsMediaPosterizationTexture>: Reduces the color complexity of an image texture into a specified number of color bands using K-Means clustering.

1. Functional Overview

The Posterization Texture operator reduces the unique colors in an input image down to a specified maximum count, creating a stylized posterized effect. It achieves this color-squishing process using K-Means clustering on the color space of the image.

2. Properties

  • Image (textureMediaItemId): The source image asset to posterize.
  • Convert On Change (convertOnChange): Toggle to automatically trigger the posterization process whenever the input image or settings change.
  • Max Colors (maxColors): The maximum number of color bands to extract from the image using K-Means clustering (range: 2 to 32, default: 8).
  • Bit Depth (bitDepth): The bit depth for the initial color quantization (8 - depth) before running clustering (range: 1 to 8, default: 5).
  • Max Iterations (maxIterations): The maximum number of K-Means clustering iterations to run for color grouping (range: 1 to 50, default: 10).

3. Actions & Triggers

  • Actions:
  • Convert: Manually dispatches the posterization computation.
  • Set Output Colors: Manually updates the output colors.
  • Triggers:
  • Output Texture: Dispatches the stylized, posterized output image.
  • Analysis Colors: Emits the list/palette of extracted colors as a data block.
  • On Success: Fires when the posterization finishes successfully.
  • On Failure: Fires if there is an error during processing.

Posterization Texture

DATA_MEDIA_ITEM.POSTERIZATION_TEXTURE
Operator
Operator Type
POSTERIZATION_TEXTURE
Operator Group
DATA_MEDIA_ITEM

Posterization Texture Properties Details

Property & TypeDisplay NameSystem TypeDefault
textureMediaItemId: IMediaItem
Image
MEDIA_ITEM
ELEMENT SELECTOR
""
convertOnChange: boolean
Convert On Change
BOOL
TOGGLE
true
maxDimension: int
Max Dimension
INT
RANGE SLIDER
512
resizeTexture: boolean
Resize Texture
BOOL
TOGGLE
true
maxColors: int
Max Colors
INT
RANGE SLIDER
8
bitDepth: int
Bit Depth
INT
RANGE SLIDER
8
maxIterations: int
Max Iterations
INT
RANGE SLIDER
10
autoDetectColors: boolean
Auto Detect Colors
BOOL
TOGGLE
true
minColorRatio: float
Min Color Ratio
FLOAT
RANGE SLIDER
0.015
colorMergeThreshold: int
Color Merge Threshold
INT
RANGE SLIDER
30
usePerceptualColorDistance: boolean
Use Perceptual Distance
BOOL
TOGGLE
true
useKMeansPlusPlus: boolean
K-Means++ Initialization
BOOL
TOGGLE
true
enableAlphaErosion: boolean
Enable Alpha Erosion
BOOL
TOGGLE
true
alphaErosionThreshold: int
Alpha Erosion Threshold
INT
RANGE SLIDER
250
autoBakeBlob: boolean
Auto Bake Blob
BOOL
TOGGLE
true
enableEdgeMasking: boolean
Enable Edge Masking
BOOL
TOGGLE
true
edgeGradientThreshold: int
Edge Gradient Threshold
INT
RANGE SLIDER
20

@Input

@Input & TypeDisplay Name@Input TypeGroup
convert: (payload: IMediaItem) => void
Convert
DATA_MEDIA_ITEMAIR_PROPERTY
bakeBlob: (payload: IMediaItem) => void
Bake Blob
DATA_MEDIA_ITEMAIR_PROPERTY
analyze: () => void
Analyze
OPERATOROPERATOR
setOutputColors: (payload: DataBlock[]) => void
Set Output Colors
DATA_BLOCKDATA_BLOCK

@Output

@Output & TypeDisplay Name@Output TypeGroup
outputTexture: AirEvent<IMediaItem>
Output Texture
DATA_MEDIA_ITEMAIR_PROPERTY
analysisColors: AirEvent<DataBlock[]>
Analysis Colors
DATA_BLOCKDATA_BLOCK
analysisColorCount: AirEvent<int>
Analysis Color Count
DATA_INTAIR_PROPERTY
onSuccess: AirEvent<void>
On Success
OPERATOROPERATOR
onFailure: AirEvent<void>
On Failure
OPERATOROPERATOR

Text Image Operator for Dynamic Canvas Decals#

Operator<DocsSdkOperatorsMediaTextImage>: Dynamically compiles formatted HTML/CSS typography, drawing it onto a raw canvas image texture at runtime.

1. Functional Overview

The Text Image operator generates high-quality text canvas decals programmatically. It consumes custom string variables on its Text input, formats it using detailed typography configurations (textColor, backgroundColor, fontFamily, fontSize, textAlign), and outputs a composite 2D image asset through Output Image to be mapped onto 3D models.

Text Image

DATA_MEDIA_ITEM.TEXT_IMAGE
Operator
Operator Type
TEXT_IMAGE
Operator Group
DATA_MEDIA_ITEM

Text Image Properties Details

Property & TypeDisplay NameSystem TypeDefault
textValue: string
Text
STRING
TEXT INPUT
"New text"
generateOnStart: boolean
Generate on Start
BOOL
TOGGLE
false
autoBakeBlob: boolean
Auto Bake Blob
BOOL
TOGGLE
true
fontSize: float
fontSize
FLOAT
TEXT INPUT
128
fontSizeUnit: "px" | "rem"
fontSizeUnit
ENUM
DROPDOWN
"px"
renderHeight: float
Render Height
FLOAT
TEXT INPUT
512
renderWidth: float
Render Width
FLOAT
TEXT INPUT
1024
textColor: IColor
Text Color
COLOR
COLOR PICKER
[1, 1, 1, 1]
backgroundColor: IColor
Background Color
COLOR
COLOR PICKER
[0, 0, 0, 0]
fontFamily: any
Font family
NONE
FONT SELECTOR
{fontMediaItemId: 3662a206-5bc6-4de7-b4ac-9cacda5b5f85, variantName: regular}
textDirection: "left-to-right" | "top-to-bottom" | "right-to-left" | "bottom-to-top"
Direction
ENUM
DROPDOWN
"left-to-right"
verticalAlign: "top" | "middle" | "bottom"
Vertical Alignment
ENUM
DROPDOWN
"middle"
textAlign: any
Align
NONE
TOGGLE BUTTON
"center"
fontStyle: any
Italic
NONE
TOGGLE BUTTON
"normal"
textDecorationUnderline: any
Underline
NONE
TOGGLE BUTTON
"none"
textDecoration: any
Strikethrough
NONE
TOGGLE BUTTON
"none"
letterSpacing: float
Letter
FLOAT
TEXT INPUT
0
letterSpacingUnit: "px" | "em"
letterSpacingUnit
ENUM
DROPDOWN
"px"
lineHeight: float
Line
FLOAT
TEXT INPUT
1
lineHeightUnit: "px" | "em" | "%"
lineHeightUnit
ENUM
DROPDOWN
"px"

@Input

@Input & TypeDisplay Name@Input TypeGroup
bakeBlob: (payload: IMediaItem) => void
Bake Blob
DATA_MEDIA_ITEMAIR_PROPERTY

@Output

@Output & TypeDisplay Name@Output TypeGroup
outputImage: AirEvent<float>
Output Image
DATA_FLOATAIR_PROPERTY
onChange: AirEvent<float>
On Change
DATA_FLOATAIR_PROPERTY

Tiled Texture Operator for Surface Pattern UVs#

Operator<DocsSdkOperatorsMediaTiledTexture>: Multiplies and tiles texture mapping grids across 3D surfaces seamlessly.

1. Functional Overview

The Tiled Texture operator scales repeating patterns on 3D models. It intercepts image assets, applying multiplication factors to the UV coordinates on X/Y axes. Designers configure repeats, margins, and borders to display high-resolution repeated finishes (e.g. fabrics, brickwork).

Tiled Texture

DATA_MEDIA_ITEM.TILED_TEXTURE
Operator
Operator Type
TILED_TEXTURE
Operator Group
DATA_MEDIA_ITEM

Tiled Texture Properties Details

Property & TypeDisplay NameSystem TypeDefault
imageTexture: IMediaItem
Texture
MEDIA_ITEM
ELEMENT SELECTOR
""
color: IColor
Color
COLOR
COLOR PICKER
[1, 1, 1, 1]
colorMix: float
Color Mix
FLOAT
RANGE SLIDER
0
wrappingType: "REPEAT" | "CLAMP" | "MIRROR"
Wrapping
ENUM
DROPDOWN
"REPEAT"
xRepeats: float
Repeats (X)
FLOAT
RANGE SLIDER
4
yRepeats: float
Repeats (Y)
FLOAT
RANGE SLIDER
4
offsetX: float
Offset (X)
FLOAT
RANGE SLIDER
0
offsetY: float
Offset (Y)
FLOAT
RANGE SLIDER
0
matchTextureSize: boolean
Match Texture Size
BOOL
TOGGLE
true
outputWidthPixels: float
Width (px)
FLOAT
RANGE SLIDER
1024
outputHeightPixels: float
Height (px)
FLOAT
RANGE SLIDER
1024

@Output

@Output & TypeDisplay Name@Output TypeGroup
outputImage: AirEvent<IMediaItem>
Output Image
DATA_MEDIA_ITEMAIR_PROPERTY