Nodes/MKRShift_Nodes/Anisotropy Map
ComfyUI Node

Anisotropy Map

Anisotropy maps for brushed metal, without the shader-science

By criskb·Created 7 months ago·Updated 5 months ago· 0
Anisotropy Map
  • image
  • source_mask
  • mask
  • image
  • mask
  • anisotropy_info
source_mode
direction_mode
direction_angle_deg0.0
center_x0.50
center_y0.50
gradient_radius2.0
normalize_mode
value_min0.000
value_max1.000
percentile_low2.0
percentile_high98.0
detail_radius2.0
detail_strength0.15
gamma1.00
contrast1.10
blur_radius0.0
invert_valuesfalse
mask_feather8.0
invert_maskfalse

Brushed metal and satin are the textures that separate a nice material from a believable one, and the thing that makes them read correctly is anisotropy - the direction light stretches along the surface. x1AnisotropyMap derives that directional map from a base texture so you don't have to paint a flow field by hand. It lives in the Surface/Maps branch of MKRShift Nodes, the same lane that gives you cavity, clearcoat, and roughness derivations before you pack them into a PBR set.

This pack is young - no impressions yet, no Reddit presence I could find - so treat it as fresh but well-structured code. The map nodes in particular follow one clean, repeatable shape: pick a source, derive a scalar, normalize it, mask it.

How it works

The node turns your texture into a two-component flow field. source_mode picks what drives the material response - combined_anisotropy is the built-in heuristic that looks for smooth, metallic, fiber-like regions that want directional highlights. direction_mode then sets the flow: horizontal, vertical, a fixed angle, or computed flows like gradient_tangent (follows stripes, brushing, and weave already in the texture - a strong default), radial, or tangential. gradient_radius controls how much the gradient directions get smoothed.

Here's the part that surprises people: the image output is encoded, not a plain grayscale. R and G hold the direction, B holds the strength. That's the format x1PreviewMaterial's anisotropy input expects, so the intended path is image → x1PreviewMaterial → anisotropy, no hand-remapping. If you just want the scalar strength, grab the mask output instead. anisotropy_info logs the resolved settings.

Inputs that matter

  • direction_mode + direction_angle_deg - the flow direction is the whole look
  • source_mode - combined_anisotropy is the sensible default; the direct channels (luma, saturation, detail) are there when the heuristic misses
  • normalize_mode / percentile_low / percentile_high - the standard MKRShift strength remap; auto_percentile is what you want 90% of the time
  • detail_strength - how strongly local texture breakup suppresses the anisotropic response
  • center_x / center_y - the origin for radial / tangential flows

Installing

ComfyUI Manager → search MKRShift Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

Restart ComfyUI. No models, no requirements.txt - it runs on what ComfyUI already ships.

Where people get burned

  • The image output is not a viewable scalar map - it's the encoded direction map. Previewing it raw looks like noise/color mush. Reach for the mask output for a readable strength map, or plug straight into x1PreviewMaterial.
  • These derivation nodes are all-or-nothing on normalization: if you flip to manual_range, you own value_min/value_max, and a wrong range can clip the whole map to solid black or white.
  • The mask output is the derived strength scalar, not the optional input mask you fed in. Same pack-wide convention, same confusion.

Brushed steel, satin clothing, carbon fiber, anodized parts - any material with a visible machining or weave direction. That's the job this node exists for.

CategoryMKRShift Nodes/Surface/Maps

Inputs (22)

NameTypeDefaultDescription
imageIMAGE
source_modeCOMBO6 options: combined_anisotropy, value, luma, saturation, detail, mask
direction_modeCOMBO7 options: horizontal, vertical, angle, gradient_tangent, gradient_normal, radial, +1
direction_angle_degFLOAT0.0-180–180
center_xFLOAT0.500–1
center_yFLOAT0.500–1
gradient_radiusFLOAT2.00–64
normalize_modeCOMBO3 options: auto_percentile, manual_range, auto_range
value_minFLOAT0.0000–1
value_maxFLOAT1.0000–1
percentile_lowFLOAT2.00–100
percentile_highFLOAT98.00–100
detail_radiusFLOAT2.00.1–64
detail_strengthFLOAT0.150–2
gammaFLOAT1.000.1–4
contrastFLOAT1.100.1–4
blur_radiusFLOAT0.00–128
invert_valuesBOOLEANfalse
mask_featherFLOAT8.00–256
invert_maskBOOLEANfalse
source_maskoptMASK
maskoptMASK

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
anisotropy_infoSTRING