Nodes/ComfyUI-TY-OrbitSphereLight/TY Orbit Sphere Light
ComfyUI Node

TY Orbit Sphere Light

Stop typing light angles. Drag them on a sphere.

By supart·Created 2 months ago·Updated 2 months ago· 5
TY Orbit Sphere Light
    • render
    azimuth0
    elevation45
    intensity1.5
    render_b64

    TY Orbit Sphere Light is a one-trick node, and the trick is good: it renders a clean gray sphere on a gray background, lit from a direction you drag around with your mouse, and hands you a tidy 1024×1024 image. That's it. No models, no API keys, no weights to download. If you're doing relighting work - feeding a light reference into IC-Light, or setting a direction you'll translate into a "sunlight from the left" prompt - this gives you a visual way to pick the light instead of typing numbers into sliders and squinting at the result.

    It's also, honestly, a niche tool inside a niche. The pack sits at zero impressions and there's almost no community talk about it; the one thread that names the upstream project is the original author's Sun-Direction LoRA for Flux 2 Klein. So treat this as a small utility you reach for when you need exactly this artifact, not as an ecosystem must-have.

    How it works

    There are two render paths, and which one runs depends on where you're executing.

    In the ComfyUI canvas, the node's frontend widget (Three.js, bundled locally so it works offline) draws a live preview sphere with three draggable handles - red for azimuth, blue for elevation, yellow for intensity. As you drag, it writes the preview as a base64 PNG into a hidden render_b64 input. Nothing you see in the preview leaks into the final image: the gizmo stays preview-only, and the node checks at execution that render_b64 is a valid data:image before trusting it.

    If that buffer is missing or empty - say you're running via the API, headless, or from a freshly loaded workflow where the preview hasn't rendered yet - a pure-Python fallback kicks in. It raycasts a sphere and ground plane, applies Lambert diffuse plus a tight Blinn specular, softens the cast shadow with a five-sample penumbra, then upscales from 512 to 1024 with a slight blur and brightness lift to match the upstream Sphere-Light-Render-ComfyUI look. Same composition, marginally softer than the canvas path. That fallback being there is the whole reason this node survives API automation at all.

    Inputs and outputs

    There are only three inputs that matter, all sliders:

    • azimuth (0–360): swing the light around the sphere horizontally. 0 is behind-ish; try 180 for the classic key-light-from-front feel.
    • elevation (–30–90): how high the light sits. Below zero gives you that ominous low-key mood.
    • intensity (0.2–3.0): how strong the light is, which also stretches the shadow.

    There's a fourth, render_b64, but the README says it plainly - it's the hidden internal preview buffer the frontend writes. You don't set it by hand. The single output is render (an IMAGE tensor), which wires straight into a SaveImage node or into whatever needs a lighting reference downstream.

    Installing it

    ComfyUI Manager is the easy route - search for "TY Orbit Sphere Light" or the pack title ComfyUI-TY-OrbitSphereLight and install. Or go manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/supart/ComfyUI-TY-OrbitSphereLight.git
    

    Then restart ComfyUI. There's no requirements.txt and no model download - the only non-core dependency is numpy, torch, and PIL, which every ComfyUI install already has. The Three.js runtime ships inside the pack, so you don't even need network at runtime. After restart, add "TY Orbit Sphere Light" and you'll find it under TY/Relight.

    Where people get tripped up

    The most common "issue" is the fallback renderer. If you load a workflow, run it before touching the preview, or execute from the API, you get the Python-rendered version - softer and a bit brighter than the canvas one. That's by design, not a bug; it's the headless safety net. If you care about pixel-exact output, drag the gizmo once before queueing so the buffer is populated.

    Also worth knowing before you build on this: the README and its third-party notices flag that the upstream Sphere-Light-Render repo doesn't expose a LICENSE, and the author notes the adaptation should be verified before any public release. For personal workflows it's a non-issue; for anything you plan to ship, that's your call to make, not the author's.

    If the node doesn't appear after install, check your custom_nodes folder for a ComfyUI-TY-OrbitSphereLight directory and confirm ComfyUI restarted fully. Beyond that there isn't much to break - which is refreshing for a custom node.

    CategoryTY/Relight

    Inputs (4)

    NameTypeDefaultDescription
    azimuthFLOAT00–360
    elevationFLOAT45-30–90
    intensityFLOAT1.50.2–3
    render_b64optSTRING

    Outputs (1)

    NameTypeDescription
    renderIMAGE