Render Photoreal
render_photorealCreate photorealistic hero images of CAD parts and assemblies in presentation quality. Works with Blender or other renderers without modifying the live model.
Instructions
Photorealistic "hero image" of a part or a whole assembly — presentation quality, unlike render_view's fast software-rasterized preview.
Call render_capabilities first when unsure what is installed. renderer='auto' (default) uses Blender (Cycles, full install, run headless) when it resolves, otherwise POV-Ray (or another FreeCAD Render add-on renderer). Name one to force it: 'Blender' | 'Povray' | 'Luxcore' | 'Appleseed' | 'Cycles' (the stripped standalone build, not Blender) | 'Ospray' | 'Pbrt'. Renders never modify the live model.
What to render: handle (a part, or an assembly handle — every leaf part is
rendered in place) or parts, a list of {handle, appearance?, name?} entries.
Appearance per part: appearances maps an assembly's part names (as
list_assembly_parts reports them) to an appearance; parts[].appearance sets it
inline; material is the fallback for every unassigned part. An appearance is a
card name ('Aluminium', 'Brass', 'Carpaint', 'Emission', 'Glass', 'GlossyPlastic',
'Gold', 'Iron', 'Matte', 'RoughPlastic', ...) or a neutral PBR dict {base?, color
('#rrggbb' or linear [r,g,b]), metallic, roughness, emission, emission_strength,
transmission, ior, coat, finish ('none'|'fdm_layers'|'brushed'),
layer_height_mm}. Unknown cards/fields raise listing the valid ones.
Blender-only (reported under ignored on an add-on renderer): per-part
appearance, scene ('studio': seamless cyclorama, soft key/fill/rim area lights,
contact shadows), quality ('draft' 16 | 'preview' 64 (default) | 'final' 384
samples, OIDN-denoised), device ('auto' GPU-if-present | 'cpu' | 'gpu'), and
output_dir (where render.png + render.blend are written; default a temp dir).
view: 'iso' | 'top' | 'bottom' | 'front' | 'back' | 'left' | 'right' | 'side'.
Returns {png_base64, png_path, renderer, auto_selected, view, material, width,
height}. The Blender backend adds {blend_path, scene, quality, samples, denoised,
device, blender_version, elapsed_s, parts: [{name, material, triangles}]}: open
blend_path in Blender 5.1+ (optionally with Blender's own MCP server connected) to
art-direct the scene further — AnkusDrive does not drive that server. When 'auto'
falls back off Blender the result carries suggestion {renderer, why, install}:
relay its install command to the user verbatim rather than installing anything.
Not installed: Blender/'auto' return {ok: False, renderer, status, reason,
install}; a named add-on renderer raises with install guidance.
Presentation-only: output is not bit-reproducible, so it is kept out of the reliability/golden tests. Renders can take seconds to minutes (extended worker timeout); prefer render_photoreal_submit for quality='final'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | No | iso | |
| parts | No | ||
| scene | No | ||
| width | No | ||
| device | No | ||
| handle | No | ||
| height | No | ||
| quality | No | ||
| material | No | ||
| renderer | No | auto | |
| output_dir | No | ||
| appearances | No |