Nodes/ComfyUI Minecraft PBR/Minecraft PBR - Extract Emission
ComfyUI Node

Minecraft PBR - Extract Emission

Turning bright pixels into emission

By jasonjgardner·Created 3 months ago·Updated 3 months ago· 0
Minecraft PBR - Extract Emission
  • basecolor
  • emission_mask
  • emission
threshold0.85
knee0.10
bloom_radius0

Lava, glowstone, lanterns, a computer screen on a prop block - if your material should emit light, someone has to decide which pixels do. Minecraft PBR - Extract Emission is the shortcut: it luminance-thresholds the basecolor into an emission mask. Feed it the albedo, get a MASK out, wire that into the packer's emission input. It's not a model, just a small, deterministic pass - the same one both packers run internally when you toggle compute_emission.

How it works

The node computes Rec. 709 luminance (weighted red/green/blue, not a naive average) and compares it against threshold (default 0.85). The trick that keeps it from looking like a harsh binary switch is the knee (default 0.1): instead of a hard cutoff, there's a smoothstep band from threshold − knee to threshold + knee, so pixels near the edge fade in gradually instead of popping. There's also an "excess" term - the further a pixel sits above the band, the brighter its emission, rather than everything clamping to the same value.

Two optional refinements:

  • bloom_radius (default 0) - a Gaussian glow that bleeds emission into neighboring dark pixels, for that "light leaks past the edge" look. Zero disables it.
  • emission_mask - a region mask that restricts emission to a chosen area, so bright highlights outside your lava pit don't accidentally start glowing.

The single output is an emission MASK, which plugs into the labPBR packer's optional emission input (or the Bedrock packer's).

Inputs that matter

Really just basecolor plus threshold and knee. Threshold sets where "bright enough to glow" begins; knee softens the boundary. Everything else is optional refinement.

Install

ComfyUI Manager → Install Custom Nodes → search "comfy-ui-minecraft-pbr", install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/jasonjgardner/comfy-ui-minecraft-pbr
# then restart ComfyUI

No model files, no extra dependencies.

Gotchas

Threshold-based emission is greedy by nature: it catches any bright pixel, including specular highlights baked into your albedo. A polished metal floor under a bright sky will end up glowing like an LED, which is probably not what you want. If you're after deliberate light sources only - the lava, not the reflections on it - hand-paint a region mask (or an explicit emission map) and feed that in, using this node's output as the base to work from rather than the final answer. It's a fast, useful heuristic; for hero textures, treat it as a starting point.

CategoryMinecraft PBR

Inputs (5)

NameTypeDefaultDescription
basecolorIMAGE
thresholdFLOAT0.850–1
kneeFLOAT0.100–1
bloom_radiusINT00–64
emission_maskoptMASKRestrict emission to this region.

Outputs (1)

NameTypeDescription
emissionMASK