Chapter 2: Shader Hints
Created by Sarah Choi (prompt writer using ChatGPT)
Shader Hints for Textiles
Why Shader Hints?
Shader hints are the small pieces of guidance that let a look‑dev artist or shader author rebuild how a fabric responds to light without sitting next to you. For textiles, two hints are disproportionately powerful: weave/knit direction (how fibers are laid out) and specular lobe behavior (what kind of highlight(s) exist and how they stretch). When paired with the big three dials—roughness, sheen, anisotropy—you can move from guesswork to repeatable results across shots, LODs, and platforms.
This article is written for both sides of the pipeline. Concept artists get language and capture methods that communicate intent. Production artists get practical knobs, expected ranges, and validation tests in a typical metal/rough PBR workflow.
A Simple Mental Model
Think of a textile surface as three stacked layers of response:
- Base diffuse/roughness from yarn and micro‑scatter (matte body color).
- Directional specular from organized fibers (warp/weft or knit wale/course).
- Edge/crown energy from micro‑fibers sticking up (the sheen lobe).
If you label the first as roughness, the second as anisotropy + specular, and the third as sheen, you’ve mapped concept language to shader controls.
Weave / Knit Direction: The North Arrow of Cloth
Every textile has a dominant direction that affects highlight shape, wrinkle paths, and wear.
- Woven: two orthogonal directions—warp (longitudinal) and weft (cross). Warp usually has higher tension, tighter twist, and cleaner specular.
- Knit: wale (vertical columns) and course (horizontal rows). Highlights often elongate along the wale. Stretch changes roughness and the apparent anisotropy.
- Pile / Nap: adds a stroke direction (velvet, corduroy, suede). Lighting flips as you brush with/against nap.
Concept‑side hint: On your board, place arrows for warp/wale and mark bias (45°). Call out nap vector when present. Provide a close‑up where the thread traffic is unmistakable.
Production‑side action: Align the anisotropy angle to the provided arrow. If your engine expects radians or texture‑space, set a clear conversion and bake a direction map (a 0–1 ramp that encodes the angle) for complex panels.
Specular Lobe Basics for Textiles
In microfacet terms, a “lobe” is a distribution of reflected light. Textiles commonly exhibit multiple lobes:
- Primary lobe (microfacet specular): The tight highlight that shrinks/grows with roughness. For most non‑coated cloth this is weak but present.
- Anisotropic lobe: The stretched highlight aligned to fiber direction; controlled by anisotropy (0–1) and anisotropy angle.
- Sheen lobe: A broad, grazing‑angle soft halo from fiber tips; controlled by sheen and sometimes sheen tint.
- Fuzz/hair lobe (if supported): Adds backscattering and shadowing for pile; sometimes a dedicated “cloth” shading model.
Hinting strategy: Say which lobes should dominate and where. Example: “Satin: anisotropic lobe dominates at 20–60° view; small primary; minimal sheen.” Or: “Flannel: primary lobe subdued; sheen rim medium; almost no anisotropy.”
Roughness: The Macro Feel
Roughness drives the width and softness of highlights across the whole surface.
- Ranges to expect:
- Satin/charmeuse 0.15–0.30 (tight, energetic highlights).
- Shantung/taffeta 0.20–0.35 (directional + crisp).
- Wool suiting 0.45–0.60 (matte with a subtle rim).
- Poplin/oxford 0.55–0.70 (dry, chalk‑matte).
- Velvet/suede 0.30–0.55 (angle‑dependent, nap‑sensitive).
- Spatial variation: tension ridges appear lower roughness, compression valleys higher. Provide a note if folds should “polish” over time (knees, cuffs).
Concept hint: “Keep body matte; allow slight polish on tension lines and edges.”
Production note: Use a low‑amplitude roughness map (5–10% variance) to avoid a sprayed look; modulate with curvature for fold polish.
Sheen: The Rim Reader
Sheen is the soft halo at grazing angles that separates cloth from plastic.
- Use it for woolens, fleece, brushed cotton, microsuede, velvet.
- Keep it subtle: too much sheen = soapy/greasy.
- Tint toward fabric hue for dyed fibers (wool), or keep near neutral for synthetic microfibers.
Hinting recipe: “Medium sheen visible 60–80° only; clamp at face‑on; do not overpower base color.”
Debug test: Rotate a cloth sphere; the rim should glow softly without a strong core highlight.
Anisotropy: Stretch the Highlight (On Purpose)
Anisotropy encodes highlight elongation along fiber direction.
- Angle: align to warp/wale; 90° off looks wrong immediately (streaks run cross‑grain).
- Amount:
- Satin 0.6–0.9 (long streaks).
- Shantung 0.4–0.7 (directional but broken by slubs).
- Gabardine/wool twill 0.1–0.2 (very subtle).
- Jersey/rib 0.1–0.3 (low, increases under stretch).
Concept hint: “Streaks follow warp along lapels and skirt panels; flip 90° on cross‑cut godets by design.”
Production note: If the garment mixes grain directions, consider a direction/angle map per UV tile or a tangent‑space rotation node to keep alignment per pattern piece.
Mapping Directionality to UVs and Mesh
To keep highlights believable:
- UV seams ≈ pattern seams. When a panel changes grain, split UVs so anisotropy can rotate cleanly.
- Bias cuts (45°) must rotate the anisotropy angle accordingly; label bias zones in the handoff.
- Normals: keep thread‑scale detail in normal maps subtle (don’t clip under tone‑mapping). Add a detail normal at 2–3× tile size for anti‑tiling.
Hint packet: Include a tiny diagram showing each garment piece with its intended grain arrow and anisotropy angle (0°, 45°, 90°), plus the UV island that corresponds to it.
Capturing Hints from Reference (Fast Method)
- Flat, raking, spec test photos of the same swatch (neutral light + grey card).
- Macro at 5–10× to clearly see warp/wale direction and slubs.
- Angle sweep: 0°, 30°, 60° incidence to watch highlight stretch.
- Nap flip: stroke one way, then the other; document the darker vs lighter direction.
- Annotate arrows directly on the image: warp = 0°, weft = 90°, nap →.
Deliverable: a one‑page panel with all arrows and your starter values: R 0.58 ±0.08, Sheen 0.10, Aniso 0.70 @ warp.
Spec Lobe “Personalities” by Fabric Family
Satin / Charmeuse: dominant anisotropic lobe with long streaks; roughness low; sheen minimal; angle = warp. Avoid moiré—prefer larger tiles and gentle detail normals.
Shantung / Dupioni: strong anisotropy broken by slubs; roughness slightly higher than satin; include a low‑frequency noise in roughness to jitter the streak.
Taffeta / Organza: medium‑to‑high anisotropy, very thin; add slight transmission/edge scatter; roughness 0.20–0.35; watch for harsh spec flicker under animation.
Wool Flannel / Melton: broad diffuse; medium sheen at rim; anisotropy low; roughness 0.50±0.10. Edge polish on elbows/seat over time.
Denim / Twill: mostly isotropic body with faint anisotropy along twill line; add directional roughness to emphasize diagonal rib; localized polish at whiskers.
Velvet / Corduroy: nap‑driven response; sheen significant; anisotropy present along wale/rib; simulate view‑dependent darkening when brushed against nap.
Practical Engine Notes (Metal/Rough)
- Metallic: 0.0 unless metallic yarn/foil is explicit (treat as a separate material ID).
- Sheen model: use the engine’s cloth/sheen term if available (it preserves energy at grazing angles).
- Anisotropy support: confirm if your renderer expects a separate direction map or uses tangent‑space rotation. Bake what it needs, not what you wish it had.
- Double‑sided: enable for thin fabrics; add thin‑SSS for backlit edges (organza, voile).
- Tone mapping: roughness reads shift under different curves; validate in your project’s calibration scene.
Debug & Validation Ritual
- Grey‑ball stack: matte grey, white, and chrome spheres next to a cloth sphere. Check highlight shape and rim behavior under the same HDRI.
- Spin test: rotate the cloth sphere; anisotropic streaks must stay aligned to the intended angle and not flip across UV seams.
- Grazing‑angle check: scrub the camera from 70–85° to ensure sheen is present but not overpowering.
- Fold drape: test on a draped plane with a few pinned folds; verify roughness modulation on tension/compression.
Communicating Hints in Words (Copy Blocks)
- “Highlights elongate along warp; set anisotropy 0.75 with angle 0°. Maintain low roughness (0.22). Keep sheen low—rim only.”
- “Body remains matte with medium sheen at grazing. Anisotropy 0.15 aligned to wale. Add 5–10% roughness noise; polish at elbows.”
- “Nap toward hem; scene should darken when viewed against nap. Use sheen 0.30 and aniso 0.40 along rib; clamp face‑on sheen.”
Handoff Checklist (Shader Hints Focus)
Directionality: warp/wale arrows, bias marks, nap vector; angle values (°, radians, or texture ramp instructions).
Spec Lobe Plan: which lobes dominate (primary, anisotropic, sheen), and under what angles.
Starter Values: Roughness (mean + ±band), Sheen (+ tint), Anisotropy (+ angle).
Maps: Albedo (no baked light), Roughness (with subtle variance), Normal/Height (thread‑safe), optional Direction/Angle map, optional Fuzz/Sheen masks.
Validation: screenshots from a shared calibration scene (HDRI name, exposure), cloth sphere + drape test GIF if possible.
Notes: known risks (moiré, flicker), recommended tile size, texel density target per LOD.
Final Thought
If you supply one arrow (direction), one sentence (which lobe wins), and three numbers (roughness, sheen, anisotropy), you’ve already de‑risked 80% of textile shading. Everything else is refinement. Keep the hints short, directional, and testable—and your fabrics will read as intended across concept paintovers, realtime engine shots, and final frames.