Nodes/ComfyUI-TextureAlchemy/Anisotropy Map Generator
ComfyUI Node

Anisotropy Map Generator

Brushed metal and brushed hair, generated not photographed

By amtarr·Created 9 months ago·Updated 4 months ago· 58
Anisotropy Map Generator
    • anisotropy
    width512
    height512
    pattern_type
    angle0
    strength1.00
    variation0.10
    seed0

    Some materials have a direction. Brushed metal, satin, and hair all reflect light differently depending on which way the surface is "combed," and renderers capture that with an anisotropy map - a texture that stores a per-pixel direction. Photographing one of those is a pain, so most people fake it procedurally. That's this node's entire job: generate an anisotropy map from nothing.

    It's a niche node in an already niche pack, but if you've ever needed brushed metal and reached for a stock texture, this is the faster road. It's also genuinely zero-cost: pure math, instant result, no assets.

    How it works

    It builds a direction field on a coordinate grid, then encodes it the way PBR renderers expect: the R and G channels store the tangent direction (cos/sin of the angle), and B stores the strength. So a "brushed" surface isn't a pile of parallel scratches - it's a directional vector map, which is exactly what the anisotropy slot of a material wants. The five pattern_type options cover the common cases:

    • brushed_horizontal / brushed_vertical - uniform direction. The default starting point for metal.
    • brushed_circular - angle wraps around a center. Think spun or lathe-finished metal.
    • hair_flow - a wavy, sinusoidal direction field. For cloth and hair strands.
    • custom_angle - you supply the exact direction in degrees via angle.

    The variation slider (0–1) adds random jitter to the direction field, which is the difference between a perfect grid and something that reads as organic brush strokes. strength (0–1) scales how strongly the direction is expressed.

    The inputs

    width, height, pattern_type, angle (0–360, only used by custom_angle), strength, variation, and seed. Output: a single anisotropy IMAGE.

    The honest caveats

    This is a flat, uniform pattern generator - it can't do a mask where only part of the object is brushed, and it can't read an existing texture and figure out its flow. For a full material you'll want to mask or blend it (the pack's Multi-Texture Blender is the obvious partner), and for complex flows you'll want a hand-authored map instead. Also keep in mind that not every engine exposes anisotropy - check that your material model actually has the slot before you build the map. And the "variation" is genuinely random, so remember the seed: if you like a pattern, lock the seed or you'll chase a moving target across re-runs.

    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. No dependencies, no models to download - it generates on the fly.

    CategoryTexture Alchemist/Materials

    Inputs (7)

    NameTypeDefaultDescription
    widthINT51264–8192
    heightINT51264–8192
    pattern_typeCOMBO5 options: brushed_horizontal, brushed_vertical, brushed_circular, hair_flow, custom_angle
    angleFLOAT00–360Brush/flow direction in degrees
    strengthFLOAT1.000–1
    variationFLOAT0.100–1Random variation in direction
    seedINT00–18446744073709550000

    Outputs (1)

    NameTypeDescription
    anisotropyIMAGE