kubakub projector blend
Two projectors, one wall, and no bright seam down the middle
- scene_1
- scene_2
- scene_3
- scene_4
- mask_1
- mask_2
- mask_3
- mask_4
- preview
- report
The moment you put a second projector on a building, you get an overlap, and the overlap is twice as bright as everything else. Every mapping show in the world solves this with edge blending - each projector fades out towards its own picture border, and the fade profiles are built so the light sums to a constant. MadMapper and friends do it with a curve you drag. This node does it by computing where the two projectors actually land on the geometry.
That's the interesting bit: it's geometric blending, not a mask you eyeball.
How the input is wired
Required inputs are scene_1 and scene_2 - and these are KUBA_SCENE, the scene output of a kubakub scene render. So the shape of the graph is: same 3D file, one kubakub projector per projector, one kubakub scene render per projector, both scenes into this node. scene_3 and scene_4 are optional, so you can go up to four.
The node works out where on the model each projector's picture lands, finds the surfaces more than one projector reaches, and gives each projector a mask that falls off towards the border of its own picture. A surface only one projector can hit - the side of a window reveal, the return of a pilaster - keeps that projector's full picture, which is the detail a rectangle-based blend mask can't do and the reason this is worth the two scene renders.
The two dials
ramp - how far from its border a picture reaches full strength, as a share of the picture's short side. 0.1 by default, up to 0.5. Larger means softer blends, with one hard constraint: the overlap has to be at least as wide as the ramp. If your two projectors overlap by 5% of the picture and you ask for a 20% ramp, you've asked for a fade that never completes, and you'll get a dark band instead of a bright one. Ramp down, or move the projectors.
gamma - 2.2 by default. Read the tooltip and it makes sense: the masks are made so that the light adds up, not the pixel values. 1 gives you masks in linear light. This matters because displays and projectors are nonlinear; blending pixel values 0.5 + 0.5 does not give you the brightness of 1.0, and if you blend in the wrong space the seam goes grey. Most people leave this at 2.2 and never think about it again, which is the correct outcome.
What comes out
mask_1 through mask_4, one per projector, in that projector's own picture size. Multiply your frames with it before sending them to the projector - or load it as the blend mask in your media server, which is how most shows actually do it, because the server is doing the output and the blend should live in the same place as the geometry.
mask_3 and mask_4 aren't errors when you've only connected two scenes: they come back all white at the size of projector 1, so multiplying changes nothing. That's deliberate, and it means you can leave the multiply nodes in the graph while you add a third projector later.
preview is one picture per projector at the size of the first, showing the clay with what it lights alone and what it shares in orange. Look at this before you render anything. If the overlap area is a thin orange sliver, your ramp has nothing to work with. report gives you, per projector, how much of the model it lights alone and how much it shares - the numbers behind the picture.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/kubakubkub/ComfyUI_KubaNodes
python -m pip install -r ComfyUI_KubaNodes/requirements.txt
Manager → search kubakub nodes; the registry name is comfyui-kubanodes. ComfyUI 0.37.0 or newer, and Blender 4.x for the scene renders this node depends on. The pip line only pulls OpenCV.
Example workflow: example_workflows/projector_blend.json, which does the whole thing on the built-in sample building without any file of yours.
The honest failure modes
Everything downstream has to run per projector. The regions, the plan, the sampler - the README says it plainly: they run once per projector, on its own scene render. That's not a limitation to work around, it's the structure of a multi-projector job, and it's the main reason a two-projector show is more than twice the work of a one-projector show.
A blend mask is not a brightness fix. If a surface is dim because it's far away or hit at a grazing angle, blending doesn't help - that's kubakub brightness compensation, which works in linear light from the scene's per-pixel measurement. Doing one because you meant the other is a classic afternoon lost.
Projector geometry that overlaps in 3D but not on screen. The masks are computed from the model's surface, so two projectors that both reach a wall but whose pictures don't overlap on it get no meaningful ramp. Fix the rig in kubakub projector - that's what the metre-based positioning is for.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| scene_1 | KUBA_SCENE | Projector 1: the scene of its kubakub scene render. | |
| scene_2 | KUBA_SCENE | Projector 2. | |
| ramp | FLOAT | 0.1000.005–0.5 | How far from its border a picture reaches full strength, as a share of its short side. Larger = softer blends (the overlap must be at least this wide). |
| gamma | FLOAT | 2.201–3 | The projectors' gamma: the masks are made so that the light adds up, not the pixel values. 1 = masks in linear light. |
| scene_3opt | KUBA_SCENE | Projector 3. | |
| scene_4opt | KUBA_SCENE | Projector 4. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| mask_1 | MASK | Blend mask of projector 1 (its picture size): 1 = full, less in overlaps. |
| mask_2 | MASK | Blend mask of projector 2 (its picture size). |
| mask_3 | MASK | Blend mask of projector 3. Nothing connected to scene_3: all white (1) at the size of projector 1, so multiplying changes nothing. |
| mask_4 | MASK | Blend mask of projector 4. Nothing connected to scene_4: all white (1) at the size of projector 1. |
| preview | IMAGE | One picture per projector, at the size of the first: the clay with what it lights alone and what it shares (orange). |
| report | STRING | Per projector: how much of the model it lights alone and shares. |