/api/thumbnail

Export custom thumbnail image of a model from the replicate pipeline




Get
/api/thumbnail?id={id}&stage={stage}&width={W}&height={H}&fmt={F}&backcol={B}&details={I}&pointsize={ps}&yaw={Y}&pitch={P}&distance={D}


Generate a thumbnail image.
All parameters are optional except id.

id - The id of the replicate object

stage - The stage of the pipeline. ply, refinedply, mesh
(OMIT this parameter for now, to use default PLY generated thumbnail)

width - The width of the thumbnail (16-1024). Default is 128.

height - The height of the thumbnail (16-1024). Default is 128.

fmt - Image format to return. png or jpg. Default is jpg.

backcol - Hex RGB for background colour. eg 000000 (black) or 444444 (darkgrey) or FF00FF (magenta). Default is black.

detail - either "none" or "debug" at present supported. overlaid text info. default is none.

pointsize - for point clouds. size of each point in pixels. Only values 1,2,3 are supported. Default is 1.

yaw - camera yaw in degrees. default is 0. viewing from the front. increasing values move the camera right (anticlockwise)

pitch - camera pitch in degrees. default is 30 raising it slightly above horizon. increasing values move the camera up initially (anticlockwise)

distance - distance of camera from object center as a proportion of its radius. So 2 means the camera will be twice the object radius from the object centre. Default is 2.

EXAMPLES

Default thumbnail of Object 817 (toy wall).
/api/thumbnail?id=817

PLY thumbnail of Object 623 (a calculator) at 512x512
/api/thumbnail?id=623&width=512&height=512&fmt=jpg&distance=1&backcol=444444

PLY thumbnail of Object 1321 at 512x512 with info at specific camera angle and distance.
/api/thumbnail?id=1321&width=512&height=512&fmt=jpg&details=debug&dist=2&yaw=-45&pitch=0&distance=1&backcol=444444

Default thumbnail of an object that doesn't exist.
/api/thumbnail?id=XXXX