Roughness/Glossiness Converter
Roughness and glossiness are the same map wearing a hat
- image
- image
Roughness and glossiness are the same measurement with opposite polarity. A rough surface has high roughness and low glossiness; a smooth one, the reverse. Some pipelines (metalness/roughness - Unreal, most modern tools) store the roughness map. Others (specular/glossiness - Unity's legacy standard shader, some DCC exporters) hand you glossiness instead. Roughness/Glossiness Converter flips between them with one line of math: output = 1 - input. That's the whole node.
Which sounds almost too trivial to bother with, and honestly it kind of is - but it saves you from building that inversion yourself every single time you bridge two tools that disagree about polarity. It's the "I got handed a glossiness map but my material wants roughness" problem, solved in one node instead of a Channel Operations detour. If you texture swap between Unity and Unreal assets, you'll use it more than you expect.
How it works
Pure inversion, clamped to 0–1. A pixel at 0.8 roughness becomes 0.2 glossiness, and vice versa. No color space math, no channel juggling - if your input is a valid single-value map (or a full RGB map where all channels happen to be the same), the output is the correct opposite.
There's one honest quirk worth knowing: the mode input ("Roughness to Glossiness" vs "Glossiness to Roughness") is cosmetic. The code comments literally say both use the same formula and the label is there to clarify intent. That's not a bug - it's the math being a genuine inverse. The mode exists so you can read the graph and know what direction you intended. Pick the one that matches what you're doing and don't worry that it doesn't change the math.
Inputs and output
image (the roughness or glossiness texture) and mode (which direction you're converting). One IMAGE out, the inverted map. That's it. If you ever find yourself wiring up a "1 - image" chain of nodes by hand, this is the node that replaces it - and it documents itself in the graph title.
Install
Leputen Utils is lilquail's Windows-oriented texture toolkit. Install with ComfyUI Manager (search "ComfyUI-Leputen-Utils") or:
cd ComfyUI/custom_nodes
git clone https://github.com/lilquail/ComfyUI-Leputen-Utils
Restart ComfyUI. Zero dependencies beyond what the pack already installs - it's a tensor subtraction.
Where people get burned
The most common mistake is inverting the wrong thing - grabbing a metallic or AO map and running it through, producing a nonsense texture. Check that your input is actually roughness/glossiness before you convert. Second, remember this is per-pixel inversion only: it doesn't touch color space, and if your map came from a tool with a non-linear encoding baked in, the inverted values won't perfectly match what the target expects. For the usual case - linear-ish grayscale PBR maps - it's exactly right.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The input roughness or glossiness texture. | |
| mode | COMBO | Roughness to Glossiness | Conversion direction. Both use the same formula (inversion), but the label helps clarify intent. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |