capture_viewport
Render a camera frame to PNG and save bounding-box and instance-segmentation maps, so you can see the scene and identify which prim is where.
Instructions
Render one frame from a camera at width x height and save 3 files to mcp_output/captures/:
Image (PNG): what the camera sees.
Bounding boxes (TXT): each mesh or shape under /World whose world box lies on the image, its box in pixels, world centre and size.
Instance segmentation (PNG): each prim in a colour of its own, with a legend naming them.
Use it to see the scene and tell which prim is where: the boxes for places, the segmentation for prims that overlap. It renders camera_path, or the viewport's camera when empty, in a render of its own, so the viewport the user sees keeps its camera and size. Aim first with set_camera, at a point or a prim; for one prim from every side, use inspect_prim. An all-black image, or lighting that lights nothing (mode off, or stage with no scene lights) though Kit's grid shows, comes with a warning saying what to change with viewport_light. Without omni.syntheticdata only the image comes: the boxes and segmentation need it.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "capture_viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | Image width in pixels, up to 4096; the camera is rendered at this size | |
| height | No | Image height in pixels, up to 4096; the camera is rendered at this size | |
| camera_path | No | The camera prim to capture from, which must be a camera; the viewport's when empty | |
| include_image | No | Also return the image inline, besides the file (uses more context) |