Nodes/ComfyUI-TextureAlchemy/Emission Mask Generator
ComfyUI Node

Emission Mask Generator

Emission maps without an image editor

By amtarr·Created 9 months ago·Updated 4 months ago· 58
Emission Mask Generator
  • source_image
  • emission
mode
strength1.0
threshold0.70
emission_color#FFFFFF
width512
height512
pattern_scale20
seed0

Emission maps are the "this part glows" texture - screens, lava, neon signs, glowing runes. They're dead simple in concept but a pain to make by hand, because you usually have to mask out exactly which pixels glow and then decide how bright they should be. Emission Mask Generator automates the whole thing with three modes, so you can go from "I have an albedo" to "it glows" without touching Photoshop.

The pack added full emission support to its PBR pipeline, and this is the generator node that feeds it - the output plugs into the emission slot of a PBR combiner or saver.

How it works

Pick a mode and it does the rest:

  • brightness_threshold - feeds off a source_image and makes everything brighter than threshold glow. Pixels near the threshold ramp softly instead of hard-cutting, and the glow takes its color from the source image itself. This is the right mode for neon signs or any self-lit pixels already present in your albedo.
  • color_select - you give it a target hex color via emission_color, and it finds every pixel near that color (distance-based, so it's forgiving) and turns them into emission. Great for picking out a specific colored element.
  • procedural - no source image needed. It generates multi-octave noise at pattern_scale, tints it with emission_color, and scales by strength. Useful for lava cracks, energy veins, or any abstract glowing pattern you'd rather not paint.

strength (0–10) is the master intensity on top of whichever mode you pick.

The inputs

The required inputs are just mode and strength. Everything else is optional and mode-dependent: source_image, threshold (default 0.7), emission_color (default #FFFFFF), width/height for the procedural mode, plus pattern_scale and seed. The output is a single emission IMAGE.

Gotchas

The brightness mode needs source_image connected - forget it and it silently falls into the procedural branch, which produces noise instead of your expected glowing pixels. That's the one thing that bites people. Also threshold sits in the 0–1 range of image brightness, so a dark albedo needs a low threshold (like 0.4) to catch anything. And note the color modes are all in image RGB space - there's no tolerance slider beyond the threshold, so a heavily compressed source image can make color_select pick up more than you intended.

Installation

Ships in amtarr/ComfyUI-TextureAlchemy under Add Node → Texture Alchemist → Materials. Install via ComfyUI Manager (search "TextureAlchemy") or:

cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy

Restart ComfyUI. Pure torch math under the hood - no extra dependencies, no models to download.

CategoryTexture Alchemist/Materials

Inputs (9)

NameTypeDefaultDescription
modeCOMBO3 options: brightness_threshold, color_select, procedural
strengthFLOAT1.00–10Emission intensity
source_imageoptIMAGE
thresholdoptFLOAT0.700–1
emission_coloroptSTRING#FFFFFF
widthoptINT51264–8192
heightoptINT51264–8192
pattern_scaleoptFLOAT201–100
seedoptINT00–18446744073709550000

Outputs (1)

NameTypeDescription
emissionIMAGE