Make n variants of a scene (free objects moved, textures swapped) as Scene JSON files
varyGenerate multiple randomized copies of a physics scene for visual and placement diversity, with object jitter, texture/tint changes, variant files, and an optional contact sheet.
Instructions
Make n edited copies of one scene for visual and placement diversity, the same for the same seed: each free object (not robots, static, kinematic or held ones) moves within +-pos in x, y and +-yaw degrees, objects that touch move together, and a draw that overlaps or loses its support is redrawn; each look takes another texture of its family plus a small tint. Writes variant_000.json ... (pass one as scene to build, run or render) and variants.json (moves and textures); sheet adds contact_sheet.png. Example arguments: {"scene": "demo_peg_d12", "n": 4, "pos": 0.01, "yaw": 10, "seed": 3, "out": "variants", "sheet": true}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"scene": "<scene>"
},
"name": "vary"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | variants to make | |
| out | No | folder for variant_000.json ... and variants.json (default: a new temporary folder) | |
| pos | No | start jitter of each free object in x and y, +- m | |
| yaw | No | yaw jitter of each free object, +- degrees | |
| seed | No | same seed, same variants | |
| tint | No | relative colour jitter (0: none) | |
| scene | Yes | a library scene name (alloy list scenes), a .yaml/.json/.xml/.urdf/.usd path, Scene JSON, or a recipe {"objects": [{"add": "ground"}, {"add": "box", "name": "cube", "size": [0.1, 0.1, 0.1], "pos": [0, 0, 0.5], "mass": 1.0}]} | |
| sheet | No | also render contact_sheet.png with alloy.camera, one tile per variant | |
| settle | No | also build each variant on the CPU and run alloy.check this many seconds; redraw it on an error (about 2 s per variant) | |
| library | No | extra card library folders, searched first | |
| textures | No | texture swaps: any look with a family, textured looks only, or none | same-family |
| max_tries | No | draws per variant before giving up | |
| sheet_options | No | contact-sheet tiles {"width": 240, "height": 180, "spp": 4, "quality": "full" | "fast"} |