Render Effect
render_effectCPU-rasterize a .prt particle effect into a PNG contact sheet or separate frames for deterministic, headless preview and iteration without a browser or GPU.
Instructions
CPU-rasterize a .prt effect to PNG image(s): by default one contact-sheet PNG of 16 frames evenly spaced over [0, completion||duration], auto-framed. All builtin + embedded-PNG textures, all five blend modes, flipbook, stretch/velocity-align/flip, per-particle + connect-ribbon TRAILS, and layer draw order are rendered; DISSOLVE is NOT rasterized (a dissolve doc still renders its sprites). Deterministic: frames snap to the same 1/60 trajectory as simulate_effect. Returns image block(s) + a renderHash, the snapped times, the viewport, and the grid. An invalid doc returns validate-shaped errors.
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": "render_effect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | No | The .prt document as a JSON string. | |
| fps | No | Frames at 0, 1/fps, 2/fps … up to the range end (max 240). Overrides `frames`. | |
| seed | No | Override the doc's authored seed. Default: the doc's seed. | |
| times | No | Explicit render times in seconds (snapped to 1/60 boundaries). Max 64 entries, each <= 60s. Overrides frames/fps. | |
| width | No | Frame width in px. Default 256; cap 1024 longest edge. | |
| frames | No | Number of evenly-spaced frames over [0, completion||duration]. Default 16; max 64. | |
| handle | No | A handle from open_effect — use instead of doc to avoid resending the document. | |
| height | No | Frame height in px. Default 256; cap 1024 longest edge. | |
| layout | No | "sheet" (default): one contact-sheet PNG. "separate": one PNG per frame (same caps). | |
| viewport | No | Explicit world-space viewport. Auto-framed from a bounds scan (+12% margin) when omitted. | |
| background | No | Background: "checker" (default), "transparent", or a hex color (#rgb / #rrggbb / #rrggbbaa). | |
| supersample | No | Anti-alias by rendering at 2x/4x then downsampling. Default off (crisp, byte-golden). | |
| overrunSeconds | No | Render past the loop seam: extends the frames/fps time range to duration + overrunSeconds. Looping docs only; ignored (with a warning) otherwise. Explicit `times` already accept any time. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid | Yes | Contact-sheet grid; null in separate mode. | |
| layout | Yes | ||
| viewport | Yes | ||
| warnings | Yes | ||
| frameWidth | Yes | ||
| imageCount | Yes | ||
| renderHash | Yes | hex8 over normalizedDoc + seed + snapped times + size + viewport + bg — distinct from the sim statehash. | |
| frameHeight | Yes | ||
| snappedTimes | Yes | The actual step-snapped render times (seconds). | |
| completionTime | Yes |