ComfyUI-TextureAlchemy Introduction
ComfyUI-TextureAlchemy helps you turn an image into a set of textures for a 3D material. Instead of preparing every texture separately, you can extract maps from AI-generated outputs, adjust their appearance, combine them into a single workflow connection, and save the results as a material set.
These textures are commonly called PBR maps. Each map describes one part of how a surface should look:
| Map | What it controls |
|---|---|
| Albedo | The surface’s base color |
| Normal | The appearance of small bumps and surface direction |
| Roughness | Whether reflections look sharp or diffuse |
| Metallic | Which areas behave like metal |
| AO (ambient occlusion) | Darkening in crevices and other sheltered areas |
| Height | Raised and recessed areas, for displacement or related effects |
| Curvature | Edges and crevices that can guide wear effects |
| Transparency | Which areas are see-through |
| Emission | Which areas appear to glow |
The extension is useful when you want to make a photographed surface tile repeatedly, develop variations of a material, add dirt or worn edges, or organize maps for use in a game engine or 3D application. Its nodes appear in ComfyUI under Texture Alchemist, with subcategories for pipelines, normals, color, effects, textures, channels, and maps.
How ComfyUI-TextureAlchemy Works
Think of a PBR material as a stack of instructions for a renderer. One image supplies color; another describes bumps; others describe reflection, shadows, and glow. ComfyUI-TextureAlchemy provides nodes for preparing those instructions and keeping them together.
A typical workflow has four stages:
- Start with an image or existing maps. You might use a photo of stone, an AI-generated surface, or maps you already have.
- Create or process maps. For example, a Marigold-based workflow can supply appearance and lighting outputs to the PBR Extractor. Lotus outputs can be processed into normal or height maps.
- Refine the material. You can correct uneven lighting, change colors, make the image repeat more smoothly, adjust map strength, or add wear.
- Preview and save. A PBR_PIPE carries the maps together between compatible nodes. Split it when you need individual maps, preview it to check your work, or send it to PBR Saver.
A PBR_PIPE is simply a bundle of maps carried through one ComfyUI connection. It helps keep a workflow readable when a material has many components. It does not mean that every map is present: the PBR Combiner accepts optional maps, so you can build a material with only the maps you have.
For example, to make a repeating brick material, you could correct the lighting in a brick photo with Texture Equalizer, use Seamless Tiling Maker to address its edges, extract available PBR maps, add a normal map through PBR Combiner, and inspect the result with PBR Pipe Preview before saving.
ComfyUI-TextureAlchemy Features
Build, adjust, and save a material
- PBR Extractor (Marigold) turns Marigold appearance and lighting outputs into a PBR_PIPE containing extracted material information. You can choose the source for albedo and adjust gamma settings for albedo, metallic and roughness, and lighting and AO. If a map looks too pale or too dark, changing the relevant gamma setting can alter its tonal range.
- PBR Adjuster makes quick brightness, contrast, or inversion changes to individual albedo, AO, roughness, and metallic maps.
- PBR Combiner gathers individual maps into a PBR_PIPE or adds maps to an existing one. Its inputs include albedo, normal, AO, height, roughness, metallic, transparency, and emission. Use it, for example, to add a separately generated height map to an extracted material.
- PBR Pipeline Adjuster changes several parts of a bundled material. Its controls include roughness and metallic strength, normal strength, albedo dimming and saturation, AO influence, and options to invert the normal map’s green channel or transparency. Lowering normal strength can make bumps appear flatter; raising albedo saturation can make colors more vivid.
- PBR Splitter separates a PBR_PIPE into individual maps when you need to edit or connect them separately.
- PBR Pipe Preview passes the pipe through unchanged and provides a batch of its maps for inspection. Place it before saving to catch missing or unexpected results.
- PBR Saver saves the available maps with a shared base name. You can choose PNG, JPG, EXR, or TIFF, set an output folder under
ComfyUI/output, and choose whether numbered outputs are created or existing names are overwritten. For example, a base name ofbrickscan produce files such asbricks_albedo_001.pngandbricks_normal_001.png.
PBR Material Mixer blends two material pipes. Choose a blend mode such as mix, multiply, overlay, add, or screen, then set the blend strength. An optional mask controls where the overlay appears, making it useful for effects such as moss growing on parts of a brick wall.
Work with normal, height, and AO maps
A normal map can make a flat surface look detailed without changing its shape. A height map describes relative high and low areas. These nodes help you create and adjust both:
- Normal Processor (Lotus) processes a Lotus normal output. You can invert its red, green, or blue channels and change the apparent strength of the bumps.
- Normal Map Combiner adds detail from one normal map to another. Its reoriented, whiteout, and linear modes offer different ways to combine the maps;
detail_strengthcontrols how strongly the second map appears. - Normal to Depth Converter estimates a height map from a normal map. Choose
blue_channelfor speed,integrationfor a more involved calculation, orhybridfor a balance. Smoothing and iteration settings affect the result and processing time. - Height to Normal Converter creates a normal map from height information. Choose
sobelfor a balanced result,scharrfor more pronounced detail, orprewittfor a smoother result. - Normal Format Converter (DX↔GL) flips the green channel to switch between DirectX and OpenGL normal-map conventions. This is worth trying when raised details appear recessed in your destination application.
- Normal Format Validator (OGL vs DX) analyzes the green channel and produces a four-panel visualization plus a format estimate and confidence level. A flat or evenly balanced map may produce an ambiguous result, so confirm uncertain cases by viewing the material on a surface.
- Height Processor (Lotus) prepares Lotus depth output as a height map, with inversion and bit-depth options.
- AO Approximator estimates crevice darkening from a height map, optionally using a normal map as well. A larger radius creates broader shading; more samples can improve quality but take longer.
Change color and add surface character
- Color Ramp maps light and dark image values to colors. Its visual widget lets you add, move, recolor, and remove color stops. Presets include grayscale, heat, rainbow, gold, rust, copper, and blue metal. Try it on a height map to turn high and low areas into a stylized color palette.
- Simple Recolor applies a two-color gradient for faster color changes.
- HSV Adjuster changes hue, saturation, and brightness. Use hue shift to make color variations of a material, or reduce saturation toward zero for a grayscale look.
- Curvature Map Generator derives an edge-and-crevice mask from a normal or height map. Its strength and blur controls determine how strongly and smoothly those areas are identified.
- Detail Map Blender adds fine texture to a base map. Select the appropriate map type for normal, roughness, or general-purpose blending, and use an optional mask to restrict the detail.
- Wear & Edge Damage Generator creates a weathered albedo and a wear mask. A curvature map can guide edge wear, while AO can guide dirt into crevices. Adjust overall wear, edge wear, and dirt strength to move from subtle aging to more visible damage.
- Gradient Map (Mask) selects a range of values from an image and turns it into a mask. Set the minimum and maximum values, soften the selection with
smoothness, or invert it to select the opposite areas.
Prepare textures for repeating and resizing
- Texture Equalizer helps reduce uneven illumination, such as a photo that is brighter on one side. Adjust its radius and strength, and use
preserve_colorwhen you want to retain the original hues while correcting brightness. It also outputs an average-color image for inspection. The method is based on a Photoshop texture-equalization technique (https://tolas.wordpress.com/2009/05/26/tutorial-how-to-equalize-textures-in-photoshop/). - Seamless Tiling Maker works on the borders of an image so repetitions join more smoothly. Choose
mirror,blend_edges, oroffset; it also supplies an edge mask for targeted cleanup or inpainting. - Texture Offset shifts or rotates a texture.
repeatwraps content to the opposite edge,clampextends edge pixels, andmirrorreflects them. Offsetting by half the image width or height is a useful way to bring a potential seam into view. - Texture Tiler shows a repeated grid. With
scale_to_inputoff, a 512 × 512 image repeated 3 × 3 becomes 1536 × 1536. With it on, the full grid remains 512 × 512, making the repetition pattern easier to assess at a glance. - Square Maker crops or stretches an image into a square. Cropping keeps proportions but removes some content; scaling keeps all content but can distort it. You can choose the crop position and a shortest-edge, longest-edge, or custom size.
- Smart Texture Resizer targets a resolution in megapixels while making dimensions multiples of a chosen number. Its modes can stay within a target size, approach it, or avoid upscaling. Check the resulting dimensions against your destination application’s requirements.
- Texture Scaler changes image size by a direct multiplier. Its interpolation options include nearest for crisp pixel art and bicubic or Lanczos for smoother photographic resizing.
- Triplanar Projection provides scale and blend-sharpness controls for its projection output. Preview the result in your workflow to decide whether it suits the surface you are preparing.
Making an image square or resizing it does not by itself make its edges seamless. To check a repeating texture, inspect it with Texture Tiler after using Seamless Tiling Maker.
Pack maps into image channels
Channel packing places several grayscale maps into the red, green, blue, and sometimes alpha channels of one image. It can reduce the number of separate texture files, but the channel order must match what your destination material expects.
| Node | Channel layout or purpose |
|---|---|
| Channel Packer (RGB) | Packs up to three grayscale maps; offers custom and named presets |
| Channel Unpacker (RGB) | Extracts selected red, green, and blue channels |
| Channel Packer (ORMA) | Red: AO; green: roughness; blue: metallic; alpha: optional transparency or mask |
| Channel Packer (RMA) | Red: roughness; green: metallic; blue: AO |
| Channel Packer (RMAA) | RMA layout with optional alpha |
| Channel Unpacker (RMA) | Restores roughness, metallic, and AO from an RMA image |
| Color to Grayscale | Converts an image using luminance, average, lightness, or one selected color channel |
| Grayscale to Color | Repeats grayscale values across RGB channels for display or compatible inputs |
For example, ORM places AO in red, roughness in green, and metallic in blue; RMA uses the same three maps in a different order. Consult your destination material’s channel requirements before choosing a preset. The alpha input on ORMA and RMAA is optional and defaults to an opaque value when omitted.
Add glowing areas
An emission map identifies parts of a material that should appear self-illuminated, such as a screen, neon lettering, or hot lava. Add the map through PBR Combiner alongside your other material maps. Use PBR Splitter when you need the emission map as a separate output.
ComfyUI-TextureAlchemy Models
ComfyUI-TextureAlchemy’s documented extraction and processing nodes work with outputs from other ComfyUI model workflows; the source does not list separate downloadable TextureAlchemy models.
| Model workflow | How this extension uses its output |
|---|---|
| Marigold appearance and lighting | PBR Extractor (Marigold) uses both outputs to build a material pipe. The albedo_source setting selects which output supplies the base color. See ComfyUI-Marigold. |
| Lotus normal | Normal Processor (Lotus) adjusts its normal-map output before you add it to a material. See ComfyUI-Lotus. |
| Lotus depth | Height Processor (Lotus) prepares its depth output as a height map. You can also feed a height map into Height to Normal Converter. See ComfyUI-Lotus. |
You can use many of the extension’s editing, tiling, masking, and packing nodes with existing images and maps; those tasks do not depend on starting with Marigold or Lotus outputs.
What’s New with ComfyUI-TextureAlchemy
The supplied documentation identifies emission-map support throughout the PBR pipeline as new in v2.1. This lets you carry glowing areas through the material workflow using the combiner and splitter rather than treating them as an unrelated image.
It also marks several tools as new, including Height to Normal Converter, Normal Format Converter and Validator, HSV Adjuster, Curvature Map Generator, Detail Map Blender, Wear & Edge Damage Generator, Gradient Map (Mask), and a range of texture-resizing and channel-packing nodes. These additions broaden what you can do after extraction: correct a normal-map convention, build wear masks, make material variations, prepare repeating textures, and pack maps for a destination application.
The source does not assign version numbers or dates to those other additions, so they are not presented here as a version-by-version release history.
Troubleshooting ComfyUI-TextureAlchemy
My repeating texture has visible lines or obvious repetition
- Send the image through Seamless Tiling Maker. Start with
blend_edgesand inspect the result. - Connect its output to Texture Tiler at 2 × 2. Look closely at where the four copies meet.
- If a join still needs cleanup, use the tiling maker’s
edge_maskto target that area for inpainting. - If the edges join but the repeated lighting still looks uneven, try Texture Equalizer earlier in the workflow, before making the image seamless.
My texture is too dark, washed out, or has unwanted color shifts
- Preview the image before and after the node where the change appears.
- For extracted maps, adjust the relevant gamma setting in PBR Extractor.
- For a source photo with uneven lighting, start Texture Equalizer with
overlay,radius: 100,strength: 1.0, andpreserve_coloron. Reduce strength for a subtler result. - If equalization makes the output too dark, try a lower strength or radius and inspect its
average_coloroutput. If colors shift unexpectedly, enablepreserve_color. - For deliberate artistic changes, use HSV Adjuster or Color Ramp after the underlying lighting problem is corrected.
My bumps look inverted
- Preview the normal map and, if its source is uncertain, inspect it with Normal Format Validator.
- Try Normal Format Converter (DX↔GL) to flip the green channel.
- Compare the material on a surface in your destination application. A low-confidence or ambiguous validator result needs visual confirmation.
- If the direction is correct but the bumps are too strong, reduce normal strength in Normal Processor or PBR Pipeline Adjuster.
The saved set is missing a map
- Place PBR Pipe Preview immediately before PBR Saver and inspect the maps in the pipe.
- If the missing map was created separately, connect it to PBR Combiner along with the existing pipe.
- Check the individual output with PBR Splitter if you need to trace it through the workflow.
- Save again after confirming that the map reaches the saver.
Frequently asked questions
Do I need every PBR map?
No. PBR Combiner accepts optional maps, so you can assemble the material from the maps you have.
What is the difference between a normal map and a height map?
A normal map describes the direction a surface appears to face at each point, creating the impression of fine bumps. A height map describes relative raised and recessed areas. The extension includes conversion tools, but an estimated conversion may not reproduce information absent from the source.
Which channel-packing layout should I choose?
Choose the layout required by the material in your destination application. ORM and RMA contain the same kinds of maps in different channel orders.
Does adding an emission map make the material glow everywhere?
The map identifies the areas intended to appear emissive. Prepare it so the desired glowing areas are distinct from the rest of the material, then check the result in your destination renderer.
Should I preview before saving?
Yes. PBR Pipe Preview lets you inspect the bundled maps without saving them and helps you spot missing or unsuitable outputs.
Learn More about ComfyUI-TextureAlchemy
- ComfyUI-Marigold provides context for the appearance and lighting outputs used by the Marigold extractor.
- ComfyUI-Lotus provides context for the normal and depth outputs processed by the Lotus-specific nodes.
- Texture equalization in Photoshop (https://tolas.wordpress.com/2009/05/26/tutorial-how-to-equalize-textures-in-photoshop/) explains the image-correction technique cited for Texture Equalizer.
For hands-on learning inside ComfyUI, begin with one image and a short chain: PBR Extractor → PBR Pipe Preview → PBR Saver. Then add one node at a time, previewing after each change. That makes it easier to see what each adjustment contributes to your finished material.
