Nodes/blender-in-comfyui/Blender Render
ComfyUI Node

Blender Render

Get your 3D scene back into the graph as a real IMAGE tensor

By JayLyu·Created about a year ago·Updated about a year ago· 5
Blender Render
    • blend_path
    • image
    • log
    blend_file_path
    camera_namecamera
    use_cyclesfalse
    samples256
    image_formatPNG
    resolution_x1536
    resolution_y846
    output_folderblender
    output_filenamerender

    Here's where the whole loop pays off. Every other node in this pack works in 3D-land, but ComfyUI lives on 2D images - and Blender Render is the bridge. Point it at the .blend file that BL_Scene_Composer produced, give it a camera, and it renders the scene headless in Blender, reads the PNG back, and hands you a real IMAGE tensor you can feed into an img2img, a ControlNet, an upscaler, or a VAE encode. This is the node that makes "render a product shot, then restyle it with SDXL/Flux" a single graph instead of a copy-paste trip between two apps.

    How it works

    Same architecture as the rest of the pack: a params JSON plus a Blender Python script, executed by a headless Blender with --factory-startup. The script opens your .blend, finds the camera by name (case-insensitive match against camera_name), sets the active camera, configures the engine and resolution, renders a still, and writes the result plus a render_result.json. Back in ComfyUI, the node loads the image, converts it to a float32 tensor in (1, H, W, 3) - the standard ComfyUI IMAGE format - and passes it on.

    Engine choice is the interesting knob. use_cycles defaults to false, which means Eevee Next - fast, good enough for previews, and what most people should start with. Flip it on for Cycles with the samples you set (default 256, up to 4096), which is slower but physically based. Note the composer pre-configures the .blend for Cycles with GPU enabled, so if you render with Eevee you're trading that setup for speed. Both engines render with a forced white world background, so you get clean compositing surfaces either way.

    Inputs and outputs that matter

    • blend_file_path - the .blend from Scene Composer's blend_path output. Required. Accepts absolute or ComfyUI-relative paths.
    • camera_name - defaults to camera. Must match a camera in the file (case-insensitive). If you named it something else in BL_Camera_Creator, set it here.
    • samples - only used when use_cycles is on; Eevee uses it as its TAA sample count.
    • resolution_x / y - up to 2048 on each axis. The defaults (1536×846) are a fine starting point for a 16:9 comp.
    • image_format - PNG or JPEG; PNG keeps alpha-related headroom and quality, JPEG if you're just previewing.

    Three outputs: blend_path (STRING, echoes the input), image (IMAGE - the render, wire this to a PreviewImage), and log (STRING - wire to ShowText|pysssss; the pack's example workflow does exactly this).

    Installing it

    Standard for the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JayLyu/blender-in-comfyui.git
    

    Start ComfyUI with --allow-subprocess (the pack calls Blender via subprocess, which ComfyUI blocks by default) and have Blender 4.4+ available - auto-downloaded into the pack's blender/ folder on Windows/Linux, placed manually on macOS. No extra pip deps beyond ComfyUI's own torch/PIL/numpy.

    Common issues

    The big one: failure returns a black image, not an error. If the blend file is missing or the camera isn't found, you get a black tensor plus an explanation in log. So the first rule is always read the log output - a black render with a happy-looking graph is this node's signature move. Second: a camera-name mismatch produces "Camera 'x' not found" - the match is case-insensitive, so it's usually a rename you forgot to mirror. Third, subprocess failures (wrong --allow-subprocess setup or a missing Blender) also surface as black images, so check those before you debug the scene. And remember the engine split: Eevee is instant-ish, Cycles is a coffee break - at 4096 samples on CPU you'll be waiting a while. Renders are CPU-safe but the composer's scene pre-configures GPU, so check your Blender device settings if Cycles is unexpectedly slow.

    CategoryBlender

    Inputs (9)

    NameTypeDefaultDescription
    blend_file_pathSTRING
    camera_nameSTRINGcamera
    use_cyclesBOOLEANfalse
    samplesINT25632–4096
    image_formatCOMBOPNG2 options: PNG, JPEG
    resolution_xINT1536400–2048
    resolution_yINT846400–2048
    output_folderoptSTRINGblender
    output_filenameoptSTRINGrender

    Outputs (3)

    NameTypeDescription
    blend_pathSTRING
    imageIMAGE
    logSTRING