ComfyUI Node

TK View & Light

Turn a 3D widget into a camera prompt

By tackcrypto1031·Created 8 months ago·Updated 6 months ago· 0
TK View & Light
  • image
  • camera_prompt
  • light_prompt
horizontal_angle0
vertical_angle0
zoom5.0
enable_lightfalse
light_horizontal45
light_vertical45
light_color#FFFFFF

If you've ever stared at a blank prompt box trying to remember whether "from the left, elevated, medium" reads better as "left side view" or "three-quarter view", this node is for you. TK View & Light puts a little Three.js 3D viewport right inside the node, and you drag a camera and a light around a scene - it writes the English for you.

The name is a lie, by the way. It doesn't "view" anything you feed it and it "lights" nothing real. It's a prompt generator with a nice 3D handle on top, aimed at 3D-aware generation: product shots, character sheets, multi-angle renders where you want the camera and the key light nailed down before you even hit queue.

How it works

It's a merger of two older ideas - the multi-angle camera logic from ComfyUI-qwenmultiangle and the camera phrasing from ComfyUI-AdvancedCameraPrompts. The Python side is dead simple: it quantizes your angle numbers into buckets and pastes them into a template. Horizontal angle maps to one of eight directions (front view, front-right quarter view, back view…), vertical angle to four shot levels (low-angle, eye-level, elevated, high-angle), and zoom to three distances (wide, medium, close-up).

So dragging the camera to 45° azimuth, 0° elevation, zoom 5 spits out:

front-right quarter view, eye-level shot, medium shot (horizontal: 45, vertical: 0, zoom: 5.0)

The 3D widget itself is a DOM widget written in TypeScript with Three.js, bundled into js/main.js and loaded through the node's WEB_DIRECTORY. Dragging in the viewport writes back to the node's sliders, and vice versa. There's a "Light Mode" toggle that switches your drag from moving the camera to moving the light.

The inputs that matter

Only a few you'll actually set by hand, since the widget does most of the work:

  • horizontal_angle (0–360) and vertical_angle (-90 to 90) - camera azimuth and elevation.
  • zoom (0–10) - maps to wide / medium / close-up.
  • enable_light - the trap. If it's off, light_prompt comes out as an empty string, not a sensible default.
  • light_horizontal, light_vertical, light_color (hex, default #FFFFFF) - where the light points and its color.
  • image (optional) - feed in a reference image and it shows up on a plane in the viewport as a backdrop. Purely visual; it doesn't change the output prompts.

The outputs and what they wire into

Two strings: camera_prompt and light_prompt. Wire them into a CLIP Text Encode (positive), a prompt merger, or whatever combines your prompt blocks - the bundled workflow does exactly that. Nothing exotic.

Installing it

The easy way: ComfyUI Manager → search "TK View & Light" → install → restart. Or the manual way:

cd ComfyUI/custom_nodes
git clone https://github.com/tackcrypto1031/tk_comfyui_view_and_light

Then restart ComfyUI. There are no Python dependencies and no model files - the pyproject lists nothing, and Three.js is compiled into main.js at build time, so you don't even need npm on the runtime side. Find it under the TK Nodes category.

The honest gotchas

  • It's an output node, so the prompt strings only regenerate when you run the graph. Tweaking a slider then looking at the old text is a classic "why isn't it working" moment - queue it.
  • The prompts are templates, not magic. SDXL-lineage models mostly respect "front-right quarter view"; don't expect a base SD 1.5 model to read "high-angle shot" and nail it.
  • The parenthetical (horizontal: 45, vertical: 0, zoom: 5.0) rides along in the string. Most encoders ignore it as prose, but if you're stitching prompts together, strip it if it's polluting your output.
  • This pack is tiny and young - zero community signal, a handful of stars. Don't expect a support team. But that also means it's the rare ComfyUI node with no install surface to break. For a camera-prompt helper that's a pretty good trade.
CategoryTK Nodes

Inputs (8)

NameTypeDefaultDescription
horizontal_angleINT00–360
vertical_angleINT0-90–90
zoomFLOAT5.00–10
enable_lightBOOLEANfalse
light_horizontalINT450–360
light_verticalINT45-90–90
light_colorSTRING#FFFFFF
imageoptIMAGE

Outputs (2)

NameTypeDescription
camera_promptSTRING
light_promptSTRING