Nodes/ComfyUI_KubaNodes/kubakub brightness compensation
ComfyUI Node

kubakub brightness compensation

The projector lights near, frontal parts of the building brighter than far or turned-away ones. This darkens the bright parts (and optionally lifts the dim ones) so your content looks equally bright everywhere on the building. Put it last, before the export.

By kubakubkub·Created 15 days ago·Updated 3 days ago· 9
kubakub brightness compensation
  • images
  • scene
  • regions
  • images
  • gain_map
  • report
  • gain
◄matchdim areas►
◄strength1.00►
◄lift_dim_up_to1.00►
◄smooth_px8►
◄grazing_deg60►
Categorykubakub/3d/scene

Inputs (8)

NameTypeDefaultDescription
imagesIMAGEYour finished frames at matrix size (one still or a video batch).
sceneKUBA_SCENEFrom kubakub scene render (the projector's view of the building).
matchCOMBOdim areasdim areas = everything as even as the dimmest parts (most even, darker); average = only the brightest parts come down.
strengthFLOAT1.000–10 = unchanged, 1 = fully even. 0.5-0.7 keeps a little of the natural falloff.
lift_dim_up_toFLOAT1.001–41 = never brighter than your content (safe). Above 1 dim parts get lifted too; their highlights may clip.
smooth_pxFLOAT80–256Softens the gain map (pixels of the projection view), hides small steps.
grazing_degFLOAT600–90Surfaces hit steeper than this (side faces of mouldings) don't set the level: they are dim by nature and would darken everything else.
regionsoptKUBA_REGIONSOne gain per region instead of per pixel, so no gradient inside a window.

Outputs (4)

NameTypeDescription
imagesIMAGEThe compensated frames.
gain_mapIMAGEHow much each part is changed (dark = darkened, colours as in scene measure).
reportSTRINGTarget, how much light is kept overall and how much clips.
gainMASKThe real gain as a mask at the size of your frames (in linear light): white (1) = a gain of 1.0 (unchanged), or the highest gain when lift_dim_up_to is above 1; darker = darkened more. The report says the range.