Minecraft PBR - Extract Emission
Turning bright pixels into emission
- basecolor
- emission_mask
- emission
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.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| basecolor | IMAGE | — | |
| threshold | FLOAT | 0.850–1 | — |
| knee | FLOAT | 0.100–1 | — |
| bloom_radius | INT | 00–64 | — |
| emission_maskopt | MASK | Restrict emission to this region. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| emission | MASK | — |