Nodes/radiance/RUDRA Region
ComfyUI Node

RUDRA Region

Stop RUDRA from touching the whole picture — reconstruct only the highlights you asked for

By FXTD-Studios·Created 11 months ago·Updated 9 days ago· 264
RUDRA Region
    • region
    ◄modeHighlights + shadows►
    ◄highlight_from0.75►
    ◄highlight_softness0.10►
    ◄highlight_strength1.00►
    ◄shadow_below0.15►
    ◄shadow_softness0.10►
    ◄shadow_strength1.00►
    ◄band_low0.50►
    ◄band_high0.90►
    ◄band_softness0.05►

    The problem it solves

    SDR → HDR Analytic is a global operation: it inverts the source curve across the whole frame and then does its repair work wherever it finds clipped pixels. Usually you want that. Occasionally you really don't - the sky needs lifting but the faces are perfect, or the new blacks are great and you'd like them untouched.

    RUDRA Region is a little settings node that produces no image at all. It builds a RUDRA_REGION instruction that you plug into the analytic node's region input, and from then on the reconstruction only acts inside a brightness band of the SDR. Everything outside keeps the plain inverse of the source curve, bit for bit. Not "nearly unchanged" - unchanged.

    This is the difference between a grade and a rescue. If you've ever pulled a mask out of a luminance key in Resolve to protect the talent, this is that idea, except the key is free and derived from the SDR luma.

    How it works

    Two modes, both keyed on Rec.709 luma of the source, 0 to 1:

    Highlights + shadows (the default) is two independent ends. Highlights reconstruct from highlight_from upward, shadows below shadow_below, each with its own softness ramp and its own strength. Defaults are 0.75 and 0.15 with a 0.1 ramp, which is a sane "fix the blown bits and let the shadows breathe" starting point.

    Band is one range - band_low to band_high, default 0.5 to 0.9 - for when only part of the tonal range needs help. The strength sliders scale each side of the band rather than the whole thing.

    softness is a ramp width in luma, and it's the control that decides whether you see a seam. Set it to 0 and you get a hard edge exactly where the reconstruction stops - visible as a contour line the instant the fill and the inverse disagree. Ramp it to 0.1 and nobody will know.

    Inputs and outputs

    Required: mode, highlight_from, highlight_softness, highlight_strength, shadow_below, shadow_softness, shadow_strength, band_low, band_high, band_softness. No optional anything, no image in, no mask out.

    One output: region, of type RUDRA_REGION, wired into SDR → HDR Analytic (RUDRA)'s region input.

    Two things worth knowing before you twiddle. First, band_low must be below band_high and the node raises if you get it backwards - it validates and tells you rather than silently doing something odd. Second, strength above 1 is allowed (up to 2), which pushes the reconstruction harder than RUDRA would; that's an override, not a recommended setting.

    Also: it's a pure settings node, so ComfyUI will happily cache it and it costs nothing to leave in the graph. Your only cost is the extra wire.

    Install

    It ships in the Radiance pack - all of it, one clone:

    cd ComfyUI/custom_nodes
    git clone https://github.com/fxtd-studios/radiance
    cd radiance
    python -m pip install -r requirements.txt
    

    ComfyUI Manager → search Radiance → Install does the same thing with fewer keystrokes. Restart ComfyUI and refresh the browser afterwards. Windows portable users: run pip with python_embeded\python.exe, not the system interpreter. Nothing downloads for this node; the requirements.txt dependencies (OpenColorIO, OpenImageIO, OpenCV and friends) are there for the rest of the pack.

    Where it bites

    The big one: pixels outside the region are the plain inverse of the source curve, not "the master you liked". If you'd also cranked the analytic node's highlight_detail, or connected a calibration or clip peaks, those stop applying outside the region too. That's exactly what you asked for, but it can look like the node "broke" the picture if you were expecting a soft falloff to the rest of the grade.

    Second: because the region keys on SDR luma, a saturated red object at low luma and a grey object at the same luma are treated identically. There's no hue selection here. If you genuinely need per-object control, use the analytic node's mask input (or wire an actual mask) rather than pushing this node past what it does.

    Third: set softness to 0 while you're evaluating the region - the hard edge is honest about where the boundary lands, then soften it once you're happy with the level.

    CategoryFXTD STUDIOS/Radiance/HDR

    Inputs (10)

    NameTypeDefaultDescription
    modeCOMBOHighlights + shadowsHighlights + shadows: highlights above one level, shadows below another. Band: one range of SDR brightness.
    highlight_fromFLOAT0.750–1Highlights reconstruct from this SDR luma up (ramp centre).
    highlight_softnessFLOAT0.100–0.5Width of the ramp, in SDR luma (0 is a hard edge).
    highlight_strengthFLOAT1.000–2How much of the highlight reconstruction (1 = as RUDRA does it). In Band mode it scales the band.
    shadow_belowFLOAT0.150–1Shadows reconstruct below this SDR luma (ramp centre).
    shadow_softnessFLOAT0.100–0.5Width of the ramp, in SDR luma (0 is a hard edge).
    shadow_strengthFLOAT1.000–2How much of the shadow reconstruction. In Band mode it scales the band's shadow side.
    band_lowFLOAT0.500–1Band mode: the band's low edge.
    band_highFLOAT0.900–1Band mode: the band's high edge.
    band_softnessFLOAT0.050–0.5Width of the ramp, in SDR luma (0 is a hard edge).

    Outputs (1)

    NameTypeDescription
    regionRUDRA_REGION—