Scratches Noise simulates fine, semi-random etched lines across a surface. Unlike 3D fractal noise, this is a specialized 2D pattern generator that creates layered, anisotropic streaks of varying length, width, and curvature. By stacking multiple rotated grids of pseudo-random wavy lines, it produces dense, multi-directional networks ideal for brushed metal, microscopic wear, or damaged coating effects. Features a custom adaptive filtering engine that ensures smooth, alias-free rendering even with extremely thin lines and low sample counts.
Usage & Behavior
This node is strictly 2D, meaning it requires UV coordinates (or a planar projection) to function correctly. It works by generating a grid of cells, where each cell spawns a single "streak." These grids are then layered and rotated on top of each other. The result is highly customizable, ranging from parallel brushed lines to chaotic, crisscrossing damage.
Key Features
- Anisotropic Structure: Generates directional lines rather than isotropic blobs.
- Layer Stacking: Accumulates rotated grids for complex intersections.
- Adaptive Filtering: Derivative-based anti-aliasing for stable rendering.
Adaptive Stable Filtering
One of the biggest challenges with thin line procedural patterns is aliasing (flickering or jagged lines) when viewed from a distance. Scratches Noise solves this using a robust, derivative-based filtering routine.
The code calculates the partial derivatives of the UV coordinates (dUVdx, dUVdy) to measure the "footprint" of the texture pixel on the screen. It then adaptively softens the scratch profile based on this footprint size. If the derivative is too small, it clamps to a minimum pixel width to prevent disappearance; if too large, it normalizes to prevent instability. This ensures that scratches remain visible and alias-free even at extreme angles or low render sample counts (down to 1 sample per pixel).
Parameters
Geometry Control
- High values: Mix of thin hairlines and thick gouges.
- Low values: Uniform width for all scratches.
- 0.0: Perfectly straight lines (machined look).
- High values: Curly, organic fibers (hair/wool).
Distribution & Layering
Advanced
- 0.0: Disabled (sharpest, but prone to flickering).
- Higher values: Smoother, thicker lines that hold up better at distance.
Quick Recipes
Use these settings for different surface finishes.
Brushed Aluminum
Layers: 2
Waviness: 0.0
Rotation: 0.0
Surface Abrasion
Layers: 8
Layers Var: 0.8
Rotation: (Any)
Curly Wool Fiber
Waviness: 0.8
Width Var: 0.2
Tip Softness: 0.5
uv * ca + (-uv.y, uv.x) * sa is applied per-layer to ensure isotropic distribution of the scratches.
