[!IMPORTANT] To ensure correct execution and environment compatibility, any agent ingesting this skill MUST adhere to the following rules:
Strictly Use Provided Tools: You MUST use the provided high-level python tools (
render_procedural_scene,render_procedural_dataset,analyze_blend,analyze_dataset) for all Blender rendering and analysis tasks.Prohibition of Custom Python Scripts: Do NOT write custom Python scripts that import
bpy(Blender Python API) or write manual file-writing rendering loops. The environment does not support directbpyimports outside of the provided headless context wrapper.Prohibition of Direct CLI Calls: Do NOT execute raw
blendercommands directly in the shell (e.g.blender -b -P ...). Always use the designated tool calls.Mandatory Discovery Phase: You MUST call
analyze_blendfirst before attempting to render any.blendfile. This is required to discover the exact names of the available Value Nodes, materials, objects, and collections in the scene.Handling Heavy Scenes & Timeouts: For heavy scenes with complex compositing pipelines or large file sizes (e.g. over 200 MB), EEVEE may time out. If EEVEE runs exceed the 60-second limit, pass a custom, larger
timeoutargument torender_procedural_sceneor run production Cycles rendering (which automatically configures Metal GPU on macOS and CUDA elsewhere).Multi-Pass Compositing and Missing Composite Output Nodes: When rendering complex multi-pass blend files (like
plaque_plate.blend) that utilize compositorFile Outputnodes but lack the standardCompositenode:
- The skill automatically detects the missing output node and dynamically creates/links a
Compositefallback node (fully compatible with Blender 4.x and Blender 5.0+ group outputs) so that standard single-frame renders (render_procedural_scene) correctly write the fully fused image to the main output file rather than an empty base plate.- Relative output paths (e.g.,
../output/masks/) configured in the compositor are automatically cleaned and routed under the targetoutput_dir.
$PATH (fully compatible with Blender 5.0+ compositor APIs)No additional configuration required. Ensure blender command is available:
bash
blender --version
Adjusts procedural Value Nodes and renders a frame in Blender.
Parameters:
blend_file (string, required): Absolute path to the .blend fileparameters (object, required): Key-value pairs of Value Node names and float values (e.g., {"GrainScale": 2.5, "Roughness": 0.3})output_path (string, required): Where to save the rendered image (e.g., /path/to/output.png)samples (integer, optional): Cycles samples (default: 128). Ignored for EEVEE.engine (string, optional): Render engine - "CYCLES" (default) or "EEVEE"timeout (integer, optional): Custom timeout in seconds. Defaults: 1800 for CYCLES, 60 for EEVEE.reference_image (string, optional): Complete path to a real-world reference image. Used for computing LPIPS similarity and Naturalness Delta.compute_metrics (boolean, optional): Set to true to compute Naturalness/LPIPS metrics after rendering. Default false.Returns:
{"status": "success", "output": "/path/to/output.png", "log": "...", "engine": "CYCLES", "samples": 128, "metrics": {"naturalness_mean": 0.85, "lpips_alex": 0.12}}{"status": "error", "message": "..."}Examples:
Production quality (CYCLES):
json
{
"blend_file": "/home/user/project/assets/test.blend",
"output_path": "/home/user/output/render_01.png",
"parameters": {
"GrainScale": 3.0,
"DisplacementStrength": 1.5
},
"engine": "CYCLES",
"samples": 256
}
Fast testing (EEVEE):
json
{
"blend_file": "/home/user/project/assets/test.blend",
"output_path": "/home/user/output/test_render.png",
"parameters": {
"GrainScale": 3.0
},
"engine": "EEVEE"
}
Convenience function for fast EEVEE rendering. Same as render_procedural_scene with engine="EEVEE".
Parameters:
blend_file (string, required): Absolute path to the .blend fileparameters (object, required): Key-value pairs of Value Node names and float valuesoutput_path (string, required): Where to save the rendered imageConvenience function for production Cycles rendering. Same as render_procedural_scene with engine="CYCLES" and higher samples.
Parameters:
blend_file (string, required): Absolute path to the .blend fileparameters (object, required): Key-value pairs of Value Node names and float valuesoutput_path (string, required): Where to save the rendered imagesamples (integer, optional): Cycles samples (default: 512)Generates a procedural dataset from any .blend file by applying dynamic randomization rules frame-by-frame and routing compositor file outputs automatically.
[!NOTE] Compositor Path Preservation: The skill automatically detects and preserves any relative output paths configured in the
.blendfile's CompositorFile Outputnodes (e.g.images/,masks/well_masks/, or../output/masks/plaque_masks/), stripping parent traversal prefixes and routing them cleanly under the user-definedoutput_dir.
Parameters:
blend_file (string, required): Absolute path to the .blend file
output_dir (string, required): Absolute path where generated images/masks will be saved
num_images (integer, optional): Number of images to render (default: 2)
randomizations (array of objects, optional): List of randomization rules.
"uniform", "int_range", "boolean", "choice", and "sequence" (cycles through the provided list of range/choices frame-by-frame).engine (string, optional): "CYCLES" (default) or "EEVEE"
samples (integer, optional): Cycles samples per frame (default: 128)
Analyzes a .blend file and returns available Value Nodes that can be manipulated.
Parameters:
blend_file (string, required): Absolute path to the .blend fileReturns: Dict containing:
status (string): "success" or "error"
parameters (object): Contains:
complexity (object): Scene realism evaluation (rating, score, polygon/light counts)value_nodes (object): Available parameter node names, current values, and their assigned materials/node groupscollections (object): Hierarchical tree of scene collections and their direct object membershipsobjects (object): Detailed dictionary of scene objects (type, location, rotation, scale, visibility in render, and assigned materials)materials (object): Detailed dictionary of materials (use_nodes status, user count)blend_file (string): Path to the analyzed file
Computes dataset-wide diversity (Shannon entropy) and average Naturalness across a list of generated images. Together with Naturalness, Diversity allows iterative improvement of the synthetic data's usefulness.
Parameters:
image_paths (array of strings, required): List of absolute paths to images in the datasetReturns: Dict containing status, diversity (overall Shannon entropy across all images), naturalness_mean (average naturalness factor), and individual_metrics (per-image naturalness details).
FeatureCYCLESEEVEEQualityPhotorealisticReal-timeSpeedSlow (minutes)Fast (seconds)Timeout30 minutes1 minuteUse caseProductionTestingSamplesConfigurableN/A
-b flag for securitysubprocess.run(shell=False) with -- separatorFilePurposesrc/synthclaw/blender_skill.pyOpenClaw execution wrapper with engine selectionsrc/synthclaw/analyze_skill.pyDataset metrics and file analysis wrapperscripts/agent_bridge.pyBlender-side Python script (handles both engines)scripts/render_dataset.pyBlender-side script for generic procedural dataset renderingscripts/analyze_blends.pyBlender-side analysis scriptassets/config/render_schema.jsonTool schema for LLM function callingassets/config/render_dataset_schema.jsonTool schema for procedural dataset rendering function callingassets/config/analyze_schema.jsonSchema for blend file analysisassets/config/dataset_analysis_schema.jsonSchema for dataset diversity and naturalness analysis
analyze_blend to see available parameters.compute_metrics=true and a reference_image path.lpips_alex similarity score and naturalness_mean).render_procedural_scene_production (CYCLES) to render the final optimized output.Compatible with Blender 4.0+. Not backwards compatible with 2.7x.