Skip to content

CLI examples

webex.exe is an ordinary Windows command-line program. Run it from Command Prompt or PowerShell, normally from the folder containing the executable and your scene. A command can also live in a .bat file, a Python or Node program, a CI job, or any other automation that can launch a process.

Inline -s scripts are convenient for one or two commands. For longer work, put one command per line in a text file and pass it with -S; this avoids shell quoting, supports comments and blank lines, and makes the recipe reusable.

Use the properties reference, content library, and commands reference when adapting these recipes.

First picture or video

./webex.exe -k:ak_xxx -i:scene.3dm -o:render.jpg -s:take_picture

A reusable script can set the resolution first:

./webex.exe -k:ak_xxx -i:scene.3dm -o:render.jpg -S:picture.txt
picture.txt
set_property globals_resolution_w 1920
set_property globals_resolution_h 1080
take_picture
./webex.exe -k:ak_xxx -i:scene.3dm -o:video.mp4 -S:video.txt
video.txt
set_property animation_speed 3
record_video

Production recipes

A square, centered product still in the Resting Right pose:

still.txt
set_property globals_resolution_w 1024
set_property globals_resolution_h 1024
set_property globals_pose_id 2
center_view
set_property render_pipeline_ssr_re_enable 1
take_picture
./webex.exe -k:ak_xxx -i:scene.3dm -S:still.txt

Dress two layers, rotate a sun ambience, and add a soft floor reflection:

look.txt
set_property globals_resolution_w 1280
set_property globals_resolution_h 768
set_material "Metal 01" Yellow Gold 18k
set_material "Gem 01" Diamond Fancy Pink
apply_ambience sun:Ambience17s
set_property globals_ibl_angle 90
set_property globals_floor_mirror_enable 1
set_property globals_floor_mirror_weight 0.1
center_view
take_picture

Record a slow boomerang with a tighter camera:

video.txt
set_property globals_resolution_w 1080
set_property globals_resolution_h 1080
set_material "Metal 01" Rose Gold 18k
set_property render_pipeline_ssr_re_enable 1
set_property globals_pose_id 2
apply_ambience black:Ambience03b
center_view
set_property camera_hfov 19
set_property animation_speed 3
set_property animation_boomerang_enable 1
record_video
./webex.exe -k:ak_xxx -i:scene.3dm -o:my_video -S:video.txt

Rename imported layers before assigning families or materials, because later commands use the new names:

glb.txt
set_property globals_resolution_preset 3
set_property globals_pose_id 2
center_view
set_layer_alias Default 01:Gem 01
set_layer_family Gem 01:gemstone
set_material "Gem 01" Ruby India
set_layer_alias User 04:Metal 01
set_layer_family Metal 01:metal
set_material "Metal 01" Rose Gold 18k
set_layer_alias Default:Metal 02
set_layer_family Metal 02:metal
set_material "Metal 02" Yellow Gold 18k
set_layer_alias Heads:Metal 03
set_layer_family Metal 03:metal
set_material "Metal 03" Platinum 950
apply_ambience sun:Ambience17s
export_dressing scene.webex_dressing
take_picture

Reuse three camera dressings in one run:

sweep.txt
import_dressing camera01.webex_dressing
take_picture
import_dressing camera02.webex_dressing
take_picture
import_dressing camera03.webex_dressing
take_picture
./webex.exe -k:ak_xxx -i:scene.3dm -o:shot_%02d -S:sweep.txt

The %02d value is the command number, so these captures become shot_02.jpg, shot_04.jpg, and shot_06.jpg.

Run once per variation when every output needs an exact name:

render_variations.bat
@echo off
webex.exe -k:ak_xxx -i:scene.3dm -o:scene_yellow_gold -s:"import_dressing base.webex_dressing;set_material \"Metal 01\" Yellow Gold 18k;take_picture"
webex.exe -k:ak_xxx -i:scene.3dm -o:scene_white_gold -s:"import_dressing base.webex_dressing;set_material \"Metal 01\" White Gold 18k;take_picture"

Apply one editor-authored look to a directory of models. Create renders first:

apply_house_look.bat
@echo off
for %%f in (rings\*.3dm) do webex.exe -k:ak_xxx -i:"%%f" -o:"renders\%%~nf" -S:apply.txt
apply.txt
import_dressing house.webex_dressing
take_picture

To reuse only the camera and ambience:

./webex.exe -k:ak_xxx -i:ring.3dm -s:"import_dressing camera,ambience:house.webex_dressing;take_picture"

Found a mistake?

If anything here looks wrong, incomplete, or unclear, please contact us and we will fix it.