Games

Preview a 3D model as a sprite in a style: one view, a few frames, as an inline mp4. Free; nothing is stored (Roles: user). Dev deployment only.

post/games/sprite3d/preview

Request body

request_idstring
user_modelstring

URL of an uploaded GLB (rigged, to animate it). Provide this OR generated_model.

user_model_file_type'glb'
animation_clip_idstring

One of the model's saved animations (an Animation3DClip id) to render.

preset_idstring

An animation preset (/utils/animation-presets) the ML retargets onto the rigged, humanoid model and renders.

crop_loopboolean

With preset_id, trim the preset to the span that loops seamlessly. Omit to follow the preset's own loop flag.

model_animationstring

Name of an animation the model file itself carries. With no animation at all the model renders as a still.

perspective'horizon' | 'low' | 'isometric' | 'high' | 'top' required
direction'S' | 'SW' | 'W' | 'NW' | 'N' | 'NE' | 'E' | 'SE' required

Where the camera stands around a character facing S.

style_idstring required

id of a style from /utils/sprite3d-styles

style_versioninteger

Version of the style; omit for its current one.

style_paramsobject

Overrides of the style's settings, by name, each one of its listed choices (or true/false, or a colour for a colour setting).

keep_horizontal_travelboolean

Keep the animation's ground travel (the character moves across the frame). Off by default.

keep_vertical_travelboolean

Keep the animation's vertical root motion (jumps, bobbing). On by default.

target_frame_sizeinteger

Sprite size in px; default 384.

Response

Success

request_idstring
videostring

The preview as an mp4 data uri (not stored).

widthinteger
heightinteger
num_framesinteger
fpsnumber float
preview_scalenumber float

Changes

Changed in 1 of the 22 revisions of this API.1